/*
Modern Enhancements for Invoice Master
Enhanced styling for better UX and visual appeal
*/

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* Global Styles */
body {
    font-family: 'Poppins', 'Inter UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 50%;
    right: -200px;
    transform: translateY(-50%);
    z-index: 1050;
    transition: all 0.3s ease;
}

.theme-switcher.active {
    right: 0;
}

.switcher-trigger {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 25px 0 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.switcher-trigger:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.switcher-wrap {
    background: white;
    padding: 20px;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 200px;
}

.color-switcher ul {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
}

.color-switcher li {
    list-style: none;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.color-switcher li:hover,
.color-switcher li.active {
    transform: scale(1.1);
    border-color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.color-box {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Navigation Enhancements */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, var(--primary), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500 !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.bg-gradient-hero {
    background: linear-gradient(135deg, 
        rgba(0, 229, 255, 0.1) 0%, 
        rgba(29, 233, 182, 0.1) 50%, 
        rgba(255, 255, 255, 1) 100%
    );
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-badge .badge {
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    border: none;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-buttons .btn {
    border-radius: 50px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.hero-buttons .btn:hover::before {
    left: 100%;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-stats .stat-item {
    text-align: center;
    padding: 1rem;
}

.hero-stats h4 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Phone Showcase */
.hero-phones {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 100%; /* Constrain to container width */
    overflow: hidden; /* Prevent horizontal overflow */
    padding: 1rem; /* Add padding for better spacing */
}

.phone-container {
    position: relative;
    margin: 1rem auto;
    padding: 30px;
    max-width: 350px; /* Constrain container width */
    overflow: visible; /* Allow floating cards to show */
}

.phone-wrapper {
    position: relative;
    transform-style: preserve-3d;
    display: block;
    width: 100%; /* Take full container width */
    max-width: 280px; /* Limit wrapper width */
    margin: 0 auto;
}

.phone-image {
    width: 100%; /* Take full wrapper width */
    max-width: 280px;
    height: auto;
    border-radius: 25px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
    position: relative;
    z-index: 1;
    display: block; /* Ensure proper block display */
}

.phone-image:hover {
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.15));
    /* Removed any transform that might affect floating cards */
}

.phone-floating-card {
    position: absolute;
    background: white;
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: float 3s ease-in-out infinite;
    top: 20%;
    right: -20px;
    z-index: 100; /* Increased z-index to ensure visibility */
    pointer-events: none; /* Prevents interference with hover */
    transition: all 0.3s ease;
    opacity: 1; /* Ensure opacity is always 1 */
    visibility: visible; /* Ensure visibility is always visible */
}

.phone-floating-card.card-2 {
    top: 60%;
    left: -20px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Ensure floating cards remain visible during all interactions */
.phone-container:hover .phone-floating-card,
.phone-wrapper:hover .phone-floating-card,
.phone-image:hover ~ .phone-floating-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    opacity: 0.1;
    animation: float-shapes 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-duration: 15s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-duration: 20s;
    animation-direction: reverse;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 10%;
    right: 20%;
    animation-duration: 25s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-duration: 18s;
    animation-direction: reverse;
}

@keyframes float-shapes {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: transparent;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover .icon-box-modern {
    transform: scale(1.1);
}

.hover-shadow:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.icon-box-modern {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-box-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: all 0.3s ease;
}

.icon-box-modern:hover::before {
    opacity: 1;
}

.bg-purple {
    background: linear-gradient(135deg, #aa00ff, #f50057) !important;
}

/* Section Headers */
.section-header {
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--info));
}

/* Call to Action */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--info)) !important;
    position: relative;
    overflow: hidden;
}

.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="60" cy="40" r="1" fill="white" opacity="0.1"/></svg>');
    animation: pattern-move 10s linear infinite;
}

@keyframes pattern-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(100px); }
}

.btn-white {
    background: white !important;
    color: var(--primary) !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background: rgba(255,255,255,0.9) !important;
    color: var(--info) !important;
    transform: translateY(-3px);
}

/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,0 L50,100 L100,0 Z" fill="rgba(0,229,255,0.02)"/></svg>');
    z-index: 0;
}

footer .container {
    position: relative;
    z-index: 1;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,229,255,0.3);
}

.hover-primary {
    transition: all 0.3s ease;
}

.hover-primary:hover {
    color: var(--primary) !important;
    text-decoration: none;
}

/* Utility Classes */
.rounded-lg {
    border-radius: 15px !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-switcher {
        display: none;
    }
    
    .hero-phones {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
        overflow: visible; /* Allow floating cards on mobile */
    }
    
    .phone-container {
        max-width: 250px;
        margin: 1rem auto;
        padding: 20px;
    }
    
    .phone-image {
        max-width: 200px;
        width: 100%;
    }
    
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    .display-3 {
        font-size: 2.5rem !important;
    }
    
    .hero-buttons .btn {
        display: block !important;
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .floating-shapes {
        display: none;
    }
    
    .phone-floating-card {
        display: none;
    }
    
    .section-header::before {
        display: none;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--info));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--info), var(--primary));
}

/* Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    pointer-events: none;
}

.ripple.animate {
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Focus states for accessibility */
.focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 229, 255, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced animations */
.animate__fadeInUp {
    animation-fill-mode: both;
}

.animate__delay-1s {
    animation-delay: 0.2s;
}

.animate__delay-2s {
    animation-delay: 0.4s;
}

.animate__delay-3s {
    animation-delay: 0.6s;
}

.animate__delay-4s {
    animation-delay: 0.8s;
}

/* Improved contrast and readability */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Better spacing */
.section-padding {
    padding: 80px 0;
}

/* Enhanced gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--info) 50%, 
        var(--success) 100%) !important;
}

/* Feature Enhancement Styles */
.feature-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.feature-highlight {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

.feature-highlight:nth-child(1) { animation-delay: 0.1s; }
.feature-highlight:nth-child(2) { animation-delay: 0.2s; }
.feature-highlight:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card:hover .feature-highlight {
    animation-delay: 0s !important;
}

/* Demo Visual Elements */
.feature-demo {
    padding: 15px;
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Invoice Demo */
.demo-invoice-preview {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.demo-invoice-header {
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 4px;
    margin-bottom: 8px;
    animation: pulse-header 2s infinite;
}

.demo-invoice-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-line {
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    animation: loading-lines 1.5s infinite;
}

.demo-line.short {
    width: 60%;
}

@keyframes pulse-header {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes loading-lines {
    0%, 100% { background: #e9ecef; }
    50% { background: #dee2e6; }
}

/* Client Management Demo */
.demo-client-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-client-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    animation: slideInLeft 0.5s ease;
}

.demo-client-item:nth-child(2) {
    animation-delay: 0.2s;
}

.demo-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--success), var(--info));
    animation: avatar-glow 2s infinite;
}

.demo-client-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.demo-name {
    height: 4px;
    background: #6c757d;
    border-radius: 2px;
    width: 80%;
}

.demo-status {
    height: 3px;
    border-radius: 2px;
    width: 40%;
}

.demo-status.paid {
    background: var(--success);
}

.demo-status.pending {
    background: var(--warning);
    animation: pulse-pending 1.5s infinite;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes avatar-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 229, 255, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.4); }
}

@keyframes pulse-pending {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Product Catalog Demo */
.demo-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.demo-product-item {
    background: white;
    border-radius: 6px;
    padding: 6px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
    animation: productFadeIn 0.6s ease forwards;
}

.demo-product-item:nth-child(1) { animation-delay: 0.1s; }
.demo-product-item:nth-child(2) { animation-delay: 0.2s; }
.demo-product-item:nth-child(3) { animation-delay: 0.3s; }

.demo-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.demo-product-image {
    height: 20px;
    background: linear-gradient(45deg, var(--info), var(--purple));
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.demo-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.demo-product-price {
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    width: 70%;
}

@keyframes productFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Currency Demo */
.demo-currency-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.demo-currency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: currencyBounce 0.5s ease forwards;
}

.demo-currency-item:nth-child(1) { animation-delay: 0.1s; }
.demo-currency-item:nth-child(2) { animation-delay: 0.2s; }
.demo-currency-item:nth-child(3) { animation-delay: 0.3s; }

.demo-currency-item.active {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
}

.demo-currency-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.demo-currency-symbol {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 2px;
}

.demo-currency-code {
    font-size: 10px;
    color: #6c757d;
    font-weight: 600;
}

@keyframes currencyBounce {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Template Preview Demo */
.demo-template-preview {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.demo-template-item {
    cursor: pointer;
    transition: all 0.3s ease;
    animation: templateSlide 0.6s ease forwards;
}

.demo-template-item:nth-child(1) { animation-delay: 0.1s; }
.demo-template-item:nth-child(2) { animation-delay: 0.2s; }
.demo-template-item:nth-child(3) { animation-delay: 0.3s; }

.demo-template-item:hover {
    transform: scale(1.1);
}

.demo-template-item.active {
    transform: scale(1.1);
}

.demo-template-thumb {
    width: 24px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.demo-template-thumb.modern {
    background: linear-gradient(135deg, var(--primary), var(--info));
}

.demo-template-thumb.classic {
    background: linear-gradient(135deg, var(--danger), var(--warning));
}

.demo-template-thumb.minimal {
    background: linear-gradient(135deg, var(--success), var(--info));
}

.demo-template-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255,255,255,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.demo-template-item:hover .demo-template-thumb::after,
.demo-template-item.active .demo-template-thumb::after {
    transform: translateY(0);
}

@keyframes templateSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Customization Demo */
.demo-customization {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.demo-color-palette {
    display: flex;
    gap: 4px;
}

.demo-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: colorPop 0.5s ease forwards;
}

.demo-color-dot:nth-child(1) { animation-delay: 0.1s; }
.demo-color-dot:nth-child(2) { animation-delay: 0.2s; }
.demo-color-dot:nth-child(3) { animation-delay: 0.3s; }
.demo-color-dot:nth-child(4) { animation-delay: 0.4s; }

.demo-color-dot:hover {
    transform: scale(1.3);
}

.demo-color-dot.primary { background: var(--primary); }
.demo-color-dot.success { background: var(--success); }
.demo-color-dot.warning { background: var(--warning); }
.demo-color-dot.danger { background: var(--danger); }

.demo-preview-mini {
    flex: 1;
    max-width: 40px;
}

.demo-mini-header {
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
    margin-bottom: 4px;
    transition: background 0.3s ease;
}

.demo-mini-content {
    height: 12px;
    background: #e9ecef;
    border-radius: 2px;
}

@keyframes colorPop {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Interactive Color Change */
.demo-color-dot:hover ~ .demo-preview-mini .demo-mini-header {
    background: currentColor;
}

.demo-color-dot.primary:hover ~ .demo-preview-mini .demo-mini-header { background: var(--primary); }
.demo-color-dot.success:hover ~ .demo-preview-mini .demo-mini-header { background: var(--success); }
.demo-color-dot.warning:hover ~ .demo-preview-mini .demo-mini-header { background: var(--warning); }
.demo-color-dot.danger:hover ~ .demo-preview-mini .demo-mini-header { background: var(--danger); }

/* Interactive Demo Enhancements */
.demo-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    transform: scale(0);
    animation: ripple-demo 0.6s linear;
    pointer-events: none;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
}

@keyframes ripple-demo {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.demo-color-dot.selected {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.hover-shimmer::after {
    animation-duration: 1s !important;
}

.pulse-active {
    animation: pulse-pending 0.8s infinite !important;
}

/* Feature Card Entrance Animation */
.feature-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-demo.active .demo-invoice-header {
    animation-duration: 1s;
}

.feature-demo.active .demo-client-item {
    animation-duration: 0.3s;
}

/* Enhanced Responsive Design for Demos */
@media (max-width: 768px) {
    .demo-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .demo-currency-selector {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .demo-currency-item {
        padding: 6px 8px;
    }
    
    .demo-template-preview {
        gap: 4px;
    }
    
    .demo-customization {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .feature-details {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .feature-demo {
        padding: 10px;
    }
}

/* Ensure floating cards are ALWAYS visible */
.phone-wrapper .phone-floating-card,
.phone-wrapper:hover .phone-floating-card,
.phone-wrapper .phone-image:hover ~ .phone-floating-card,
.phone-wrapper .phone-image:hover + .phone-floating-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    z-index: 1002 !important;
    pointer-events: none !important;
    transform: none !important;
}
