body {
    background-color: #020617;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* Spotlight Effect */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

.btn-glow {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

/* Grid Background */
.bg-grid {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.popular-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.premium-border {
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.premium-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.premium-border:hover::before {
    opacity: 1;
}

/* Scary/Urgent Animation for Offer */
@keyframes shake-pulse {
    0%, 100% { transform: scale(1); }
    10%, 30%, 50%, 70%, 90% { transform: scale(1.05) rotate(-1deg); }
    20%, 40%, 60%, 80% { transform: scale(1.05) rotate(1deg); }
}
.scary-offer {
    animation: shake-pulse 2s infinite ease-in-out;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Today Only Pulse Animation */
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.today-only-badge {
    animation: pulse-red 2s infinite;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

/* Bonus Tooltip Modal Styles */
.bonus-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-out;
}

.bonus-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bonus-modal-container {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 480px;
    border-radius: 1.25rem;
    position: relative;
    transform: scale(0.95);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.bonus-modal-overlay.active .bonus-modal-container {
    transform: scale(1);
}

.bonus-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.bonus-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.bonus-modal-content {
    padding: 2rem;
    overflow-y: auto;
}

.bonus-modal-header {
    margin-bottom: 1.5rem;
}

.no-scroll {
    overflow: hidden !important;
}

/* Custom indicator for the trigger */
.bonus-tooltip-trigger {
    position: relative;
}

.bonus-tooltip-trigger:hover i {
    transform: scale(1.2);
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

@keyframes text-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.bonus-tooltip-trigger i {
    animation: icon-pulse 2s infinite ease-in-out;
}

.bonus-label-highlight {
    background: linear-gradient(90deg, currentColor 0%, #fff 50%, currentColor 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-shimmer 3s infinite linear;
    position: relative;
    display: inline-block;
}

.bonus-tooltip-trigger:hover {
    filter: brightness(1.2);
}

@media (max-width: 640px) {
    .bonus-modal-content {
        padding: 1.5rem;
    }
}

/* Mobile Screenshot Gallery */
.mobile-gallery-container {
    margin-top: 4rem;
}

.mobile-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .mobile-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .mobile-gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }
}

.mobile-frame {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 9/19;
    background: #020617;
    border: 8px solid #1e293b;
    border-radius: 2.25rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-frame:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #334155;
    box-shadow: 0 25px 30px -5px rgba(59, 130, 246, 0.2);
}

/* Notch simulation */
.mobile-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    height: 18px;
    background: #1e293b;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.mobile-screenshot-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.mobile-screenshot-wrapper img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.mobile-frame:hover img {
    transform: translateY(calc(-100% + 480px)); /* 480px is approx frame height */
}

/* Adjustment for different screen sizes since aspect-ratio is fixed but height varies */
@media (min-width: 1024px) {
    .mobile-frame:hover img {
        transform: translateY(calc(-100% + 550px));
    }
}

@media (max-width: 640px) {
    .mobile-frame:hover img {
        transform: translateY(calc(-100% + 350px));
    }
}

/* ----------------------------------
   GLOBAL MOBILE SYSTEM (320px–768px)
   ---------------------------------- */
@media (max-width: 768px) {
    /* Base Reset */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100% !important;
    }

    section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    /* Typography Scaling */
    h1 {
        font-size: 30px !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 18px !important;
    }

    p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    .text-5xl, .text-7xl {
        font-size: 32px !important;
    }

    .text-lg, .text-xl {
        font-size: 16px !important;
    }

    /* Navbar */
    nav .flex-wrap {
        justify-content: center !important;
        gap: 12px;
    }

    nav .space-x-4 {
        margin-top: 8px;
    }

    /* Hero Section */
    section.relative.pt-32 {
        padding-top: 100px !important;
        text-align: center;
    }

    .hero-glow {
        opacity: 0.5;
    }

    .animate-blob {
        display: none; /* Reduce noise on mobile */
    }

    .reveal.delay-300.flex-col.sm\:flex-row {
        gap: 12px !important;
    }

    .reveal.delay-300.flex-col.sm\:flex-row a {
        width: 100% !important;
        min-height: 48px;
    }

    /* Grid -> Stack System */
    .grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Product Preview / Tabs */
    #product-preview .lg\:flex-row {
        flex-direction: column !important;
    }

    #product-preview .lg\:w-1\/3, 
    #product-preview .lg\:w-2\/3 {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    #preview-tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    #preview-tabs button {
        padding: 8px !important;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }

    #preview-tabs button .text-xs {
        display: none; /* Hide subtext on mobile tabs */
    }

    #preview-content {
        padding: 16px !important;
        min-height: 400px !important;
    }

    .preview-pane .lg\:flex-row {
        flex-direction: column !important;
    }

    .preview-pane .w-64 {
        display: none !important; /* Hide preview sidebar on mobile */
    }

    .preview-pane .w-\[300px\] {
        width: 240px !important;
        margin: 0 auto;
    }

    /* Pricing Section */
    #marketplace .grid-cols-1 {
        gap: 24px !important;
    }

    #marketplace .group {
        width: 100% !important;
    }

    #marketplace .popular-badge,
    .absolute.top-0.left-1\/2.-translate-x-1\/2.bg-brand-600 {
        position: relative !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        text-align: center !important;
        border-radius: 0 !important;
        margin-bottom: -1px;
    }

    #marketplace a.block {
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px !important;
    }

    /* Templates Section */
    #pane-templates .grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        flex-direction: row !important;
        gap: 12px !important;
    }

    /* Mobile Gallery */
    .mobile-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
        flex-direction: row !important;
        gap: 12px !important;
    }

    /* Infrastructure Section */
    .infrastructure-grid,
    section.py-24 .flex-col.md\:flex-row {
        flex-direction: column !important;
        gap: 32px !important;
    }

    /* Footer */
    footer .grid {
        text-align: center !important;
        gap: 32px !important;
    }

    footer .flex-col.md\:flex-row {
        flex-direction: column !important;
        text-align: center !important;
    }

    /* Buttons Global */
    .btn, button, a.px-8 {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
