/* ============================================
   SNAPPYNAME - Dark Premium Theme (Google AI Style)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    /* Core Colors */
    --bg-page: #000000;
    --text-primary: #ffffff;
    --text-secondary: #9aa0a6;

    /* Accents */
    --google-blue: #f59e0b;
    /* Amber for buttons */
    --google-blue-dark: #ea580c;
    /* Deeper orange for hover/backgrounds */
    --glow-blue: rgba(245, 158, 11, 0.4);

    /* UI Components */
    --nav-bg: rgba(60, 64, 67, 0.90);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Dimensions */
    --radius-pill: 100px;
    --radius-card: 32px;
    --radius-mockup: 20px;
}

/* ============================================
   PERFORMANCE FIX - Disable backdrop-blur globally
   backdrop-blur is extremely GPU-intensive and causes
   continuous compositor work even when the page is idle.
   ============================================ */
*,
*::before,
*::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */
html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    overflow-x: clip;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 3px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

body {
    margin: 0;
    overflow-x: clip;
    /* Prevent horizontal scroll from glows — clip instead of hidden to preserve sticky */
}

/* Focus Visibility */
*:focus-visible {
    outline: 2px solid var(--google-blue);
    outline-offset: 4px;
}

/* ============================================
   UTILITY COMPONENTS
   ============================================ */

/* 1. Sticky Pill Navigation */
.nav-pill-container {
    position: absolute;
    top: 24px;
    left: 10%;
    transform: none;
    z-index: 50;
    width: auto;
    max-width: 90vw;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: transparent;
    box-shadow: none;
}

.nav-link {
    color: #e8eaed;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-link.active {
    background: #000000;
    color: #ffffff;
}

/* 2. Badges */
.badge-new {
    background: #ffffff;
    color: #202124;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 3. Gradient Text (Gemini Style) */
.text-gradient-gemini {
    background: linear-gradient(77deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    padding-bottom: 0.25em;
    padding-right: 0.05em;
    margin-bottom: -0.25em;
}

.text-gradient-amber {
    background: linear-gradient(77deg, #f59e0b 0%, #ea580c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    padding-bottom: 0.25em;
    padding-right: 0.05em;
    margin-bottom: -0.25em;
}

.text-scale-gradient {
    background: linear-gradient(to right, #ffffff, #9aa0a6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 4. Atmospheric Glows */
.bg-glow-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow-spot {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--glow-blue) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.5;
    /* DISABLED for CPU optimization - blur on large elements is GPU-intensive */
    /* filter: blur(80px); */
}

.glow-top-center {
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 600px;
    background: radial-gradient(ellipse at center,
            rgba(245, 158, 11, 0.5) 0%,
            rgba(245, 158, 11, 0.2) 40%,
            rgba(0, 0, 0, 0) 70%);
    opacity: 1;
    /* DISABLED for CPU optimization */
    /* filter: blur(60px); */
    /* Animation disabled for CPU/GPU optimization */
    /* animation: floatGlow 20s ease-in-out infinite alternate; */
}

.glow-halo {
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1400px;
    height: 900px;
    background: radial-gradient(ellipse at center,
            rgba(245, 158, 11, 0.4) 0%,
            rgba(234, 88, 12, 0.25) 35%,
            rgba(234, 88, 12, 0.1) 60%,
            rgba(0, 0, 0, 0) 80%);
    /* DISABLED for CPU optimization */
    /* filter: blur(100px); */
    opacity: 1;
    mix-blend-mode: screen;
    /* Animation disabled for CPU/GPU optimization */
    /* animation: haloPulse 10s ease-in-out infinite alternate; */
}

@keyframes haloPulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.glow-content-center {
    top: 20%;
    left: 80%;
    transform: translateX(-50%);
    width: 1200px;
    height: 1200px;
    opacity: 0.15;
    /* Animation disabled for CPU/GPU optimization */
    /* animation: floatGlow 30s ease-in-out infinite alternate-reverse; */
}

@keyframes floatGlow {
    0% {
        transform: translate(-50%, 0) scale(1);
    }

    100% {
        transform: translate(-45%, 50px) scale(1.1);
    }
}

/* Features Section Glow */
.features-glow-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow-features-center {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1400px;
    height: 800px;
    background: radial-gradient(ellipse at center,
            rgba(245, 158, 11, 0.38) 0%,
            rgba(234, 88, 12, 0.24) 40%,
            rgba(0, 0, 0, 0) 70%);
    opacity: 1;
    mix-blend-mode: screen;
}

/* RESPONSIVE GLOW SYSTEM */
@media (max-width: 1024px) {

    /* TABLET STACKING (1024px to 769px) */
    .glow-features-center {
        top: 55%;
        width: 900px;
        height: 1200px;
        opacity: 0.8;
    }
}

@media (max-width: 768px) {

    /* MOBILE STACKING (Below 768px) */
    .glow-features-center {
        top: 50%;
        width: 600px;
        height: 2200px;
        opacity: 0.8;
    }
}

@keyframes featuresPulse {
    0% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* 5. Glassmorphism Cards */
.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 32px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

/* ============================================
   BENTO MOCKUP ENHANCEMENTS (Performance-Safe)
   ============================================ */

/* 1. Floating UI Container */
.bento-mockup-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

/* 2. Mini UI Elements */
.ui-element-floating {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    position: absolute;
    /* Use translate3d for GPU acceleration */
    will-change: transform, opacity;
}

/* Specific Card 1: Results animation */
.mini-result-card {
    padding: 12px;
    width: 140px;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    animation: resultAppear 4s infinite;
}

@keyframes resultAppear {

    0%,
    10% {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    15%,
    85% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    90%,
    100% {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
}

.mini-btn-generate {
    background: linear-gradient(to right, #f59e0b, #ea580c);
    border: none !important;
    color: white;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: btnPulse 4s infinite;
}

@keyframes btnPulse {

    0%,
    5%,
    95%,
    100% {
        transform: scale(1);
    }

    8%,
    12% {
        transform: scale(1.05);
        box-shadow: 0 12px 25px rgba(245, 158, 11, 0.5);
    }
}

/* Specific Card 2: Keyword Floating */
.mini-category-popover {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 200px;
    padding: 16px;
    transform: translate3d(0, 0, 0);
    animation: popoverFloat 6s ease-in-out infinite alternate;
}

@keyframes popoverFloat {
    from {
        transform: translate3d(0, 0, 0) rotate3d(1, 1, 0, 2deg);
    }

    to {
        transform: translate3d(0, 20px, 0) rotate3d(1, 1, 0, -2deg);
    }
}

.mini-badge {
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    transition: all 0.2s;
    animation: badgeIn 5s infinite;
}

@keyframes badgeIn {

    0%,
    7% {
        opacity: 0;
        transform: scale(0.8);
    }

    15%,
    88% {
        opacity: 1;
        transform: scale(1);
    }

    94%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Specific Card 3: Counter Animation */
.mini-counter-display {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #f59e0b;
    transition: all 0.3s ease;
}

.counter-value::after {
    content: "3 906";
    animation: countUp 8s steps(1) infinite;
    display: inline-block;
}

@keyframes countUp {

    0%,
    25% {
        content: "124";
        color: #f43f5e;
        text-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
        transform: scale(1.1);
    }

    30%,
    55% {
        content: "3 906";
        color: #f59e0b;
        text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
        transform: scale(1);
    }

    60%,
    100% {
        content: "22 142 880";
        color: #10b981;
        text-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
        transform: scale(1.15);
    }
}

/* ============================================
   BENTO GRID SYSTEM
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 24px;
}

.bento-card-large {
    grid-column: span 8;
    grid-row: span 2;
}

.bento-card-tall {
    grid-column: span 4;
    grid-row: span 3;
}

.bento-card-standard {
    grid-column: span 4;
    grid-row: span 1;
}

.bento-card-wide {
    grid-column: span 8;
    grid-row: span 1;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card-large,
    .bento-card-tall,
    .bento-card-standard,
    .bento-card-wide {
        grid-column: span 1;
        grid-row: auto;
    }
}

/* ============================================
   MOCKUP SYSTEM
   ============================================ */
.mockup-container {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-mockup);
    width: 100%;
    height: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.mockup-header {
    height: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
}

.mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.mockup-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-skeleton {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.skeleton-title {
    width: 60%;
    height: 20px;
}

.skeleton-line {
    width: 100%;
    height: 12px;
}

/* Interactive Mockup Element (Plus button from screenshot) */
.mockup-fab {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--google-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* 6. FAQ Accordion Systems (JavaScript-controlled) */
.faq-accordion .faq-item {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s, border-color 0.5s, box-shadow 0.5s;
}

.faq-accordion .faq-trigger {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
}

.faq-accordion .faq-trigger:focus-visible {
    outline: 2px solid var(--google-blue);
    outline-offset: -2px;
    border-radius: var(--radius-card);
}

/* Grid Hack: animate grid-template-rows for smooth height transitions */
.faq-accordion .faq-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion .faq-item.open .faq-body {
    grid-template-rows: 1fr;
}

.faq-accordion .faq-body-inner {
    /* overflow: hidden is required for the grid hack to work */
    overflow: hidden;
}

/* Icon rotation and color change on open */
.faq-accordion .faq-item.open .faq-icon {
    background: rgba(245, 158, 11, 0.2);
    color: rgb(251, 191, 36);
}

.faq-accordion .faq-item.open .faq-icon svg {
    transform: rotate(180deg);
}

/* 7. Buttons */
.btn-primary-pill {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 48px;
    transition: filter 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-pill:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {

    /* Hide scrollbar on mobile nav but allow scrolling */
    .nav-pill {
        overflow-x: auto;
        max-width: calc(100vw - 32px);
        justify-content: flex-start;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        /* IE/Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .nav-pill::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .nav-pill-container {
        top: 16px;
    }

    #generator-section {
        display: none !important;
    }

    #mobile-fallback {
        display: block !important;
    }
}

@media (min-width: 769px) {
    #generator-section {
        display: block;
    }

    #mobile-fallback {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}