/* =============================================================================
   DINDI & PILVI GAMES — style.css
   Theme-Aware Design System
   All colours flow from CSS custom properties set by setTheme() in main.js.
   No #000000. No hardcoded theme colours outside the :root / theme blocks.
============================================================================= */

/* ─────────────────────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTY DESIGN TOKENS
   Blue is the default; setTheme() overwrites these on <html> at runtime.
───────────────────────────────────────────────────────────────────────────── */
:root {
    /* ── Page background ── */
    --bg-color:           #f0f9ff;

    /* ── Primary theme palette (set per-theme by JS) ── */
    --theme-light:        #e0f2fe;   /* light tint  — backgrounds, fills      */
    --theme-mid:          #bae6fd;   /* mid tint    — borders, inputs          */
    --theme-strong:       #38bdf8;   /* strong tint — active borders, accents  */
    --theme-dark:         #0c4a6e;   /* dark shade  — headings, icon colours   */
    --theme-darker:       #082f49;   /* darkest     — hover states             */
    --theme-text:         #0c4a6e;   /* body text on theme backgrounds         */

    /* ── Semantic / functional colours (theme-neutral) ── */
    --success-color:      #22c55e;
    --danger-color:       #ef4444;
    --danger-dark:        #dc2626;
    --neutral-dark:       #475569;
    --neutral-darker:     #334155;

    /* ── Typography ── */
    --font-main:          'Nunito', system-ui, -apple-system, sans-serif;

    /* ── Shared radii & shadows ── */
    --radius-xl:          30px;
    --radius-lg:          24px;
    --radius-md:          16px;
    --radius-sm:          12px;
    --card-shadow:        0 8px 24px rgba(0,0,0,0.07);
    --card-shadow-hover:  0 16px 32px rgba(0,0,0,0.12);

    /* Aliases kept for backward compatibility with game files */
    --border-radius-lg:   var(--radius-xl);
    --border-radius-md:   var(--radius-lg);

    /* ── Nav logo size ──────────────────────────────────────────────────
       nav height is fixed (54px mobile / 60px desktop, set in the `nav`
       rule below) and includes its own 3px border-bottom (box-sizing:
       border-box), so the real vertical space available to centre the
       logo in is nav-height MINUS 3px:
           mobile:  54px nav → 51px usable
           desktop: 60px nav → 57px usable
       Pick ONE of the three presets below by uncommenting it (comment
       out whichever is currently active) — do not exceed the "usable"
       figures above or the logo will visually touch/overlap the border.

       PRESET A — Comfortable (clear breathing room, safest default) */
    
    --logo-h-mobile:   49px;
    --logo-h-desktop:  55px;
    

    /* Width ceiling — stops a wide/landscape logo from crashing into the
       search box or hamburger icon. Loosened slightly from the old fixed
       190px/230px since a taller logo needs more width to stay in
       proportion. If your logo still looks smaller/shorter than the
       height above suggests, IT IS HITTING THIS CAP — raise it. */
    --logo-maxw-mobile:  210px;
    --logo-maxw-desktop: 260px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. THEME PALETTES
   setTheme() in main.js writes matching --theme-* variables onto :root.
   These body classes are also set so pure-CSS fallback works without JS.
───────────────────────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────────────────
   THEME PALETTE KEY
   --theme-light   = very pale tint  (page bg, card fills)
   --theme-mid     = dot colour      (nav border, search border)
   --theme-strong  = THE brand colour used for all card borders & header band
                     Matches the exact dot colours: blue #bfdbfe, pink #fbcfe8,
                     green #bbf7d0, yellow #fed7aa  — soft, consistent palette.
   --theme-accent  = saturated shade for timer bar, active focus rings
   --theme-dark    = dark shade for text, icon tints, button backgrounds
   --theme-darker  = darkest shade for hover states
   --theme-text    = body-level text colour (never black)
─────────────────────────────────────────────────────────────────────────── */
body.theme-blue {
    --bg-color:      #f0f9ff;
    --theme-light:   #e0f2fe;
    --theme-mid:     #bae6fd;
    --theme-strong:  #bfdbfe;   /* blue dot colour — borders & header band */
    --theme-accent:  #38bdf8;   /* saturated blue  — timer, focus rings    */
    --theme-dark:    #1e3a5f;
    --theme-darker:  #0f2240;
    --theme-text:    #1e3a5f;
}
body.theme-pink {
    --bg-color:      #fdf2f8;
    --theme-light:   #fce7f3;
    --theme-mid:     #fbcfe8;
    --theme-strong:  #fbcfe8;   /* pink dot colour  — borders & header band */
    --theme-accent:  #f472b6;   /* saturated pink   — timer, focus rings    */
    --theme-dark:    #831843;
    --theme-darker:  #500724;
    --theme-text:    #831843;
}
body.theme-green {
    --bg-color:      #f0fdf4;
    --theme-light:   #dcfce7;
    --theme-mid:     #bbf7d0;
    --theme-strong:  #bbf7d0;   /* green dot colour — borders & header band */
    --theme-accent:  #22c55e;   /* saturated green  — timer, focus rings    */
    --theme-dark:    #14532d;
    --theme-darker:  #052e16;
    --theme-text:    #14532d;
}
body.theme-yellow {
    --bg-color:      #fefce8;
    --theme-light:   #fef9c3;
    --theme-mid:     #fde047;
    --theme-strong:  #fed7aa;   /* orange/yellow dot — borders & header band */
    --theme-accent:  #f59e0b;   /* saturated amber   — timer, focus rings    */
    --theme-dark:    #713f12;
    --theme-darker:  #431407;
    --theme-text:    #713f12;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. GLOBAL RESET & BODY
───────────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--theme-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. SESSION TIMER PROGRESS BAR
───────────────────────────────────────────────────────────────────────────── */
.timer-container {
    width: 100%;
    height: 6px;
    background: var(--theme-light);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    transition: background 0.35s ease;
}
#timer-progress {
    height: 100%;
    background: var(--theme-accent, var(--theme-strong));
    width: 100%;
    transition: width 1s linear, background 0.35s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. NAVIGATION
───────────────────────────────────────────────────────────────────────────── */
nav {
    width: 100%;
    height: 54px;
    /* Sit directly below the 6px timer progress bar */
    margin-top: 6px;
    padding: 0 15px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--theme-strong);
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;   /* vertical centring of all nav children */
    position: relative;
    gap: 8px;
    overflow: visible;     /* allow theme-dot hover glow to show */
    transition: border-color 0.35s ease;
}

.nav-left {
    cursor: pointer;
    white-space: nowrap;
    /* Mobile: flex:1 pushes search + hamburger to the far right.
       Desktop: overridden below to flex:0 so the logo only takes its natural width. */
    flex: 1 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.site-logo {
    display: block;
    width: auto;
    height: var(--logo-h-mobile);
    max-width: min(var(--logo-maxw-mobile), 46vw);
    object-fit: contain;
}

/* Search wrapper — collapses to icon-only on mobile; never pushes other nav items */
.search-wrapper-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    /* Width tracks the button (≈44px) + input when open; never shrinks below button */
    width: auto;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}

.search-trigger-btn {
    background: var(--theme-mid) !important;
    border: none !important;
    font-size: 1.1rem !important;
    padding: 6px 10px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    transform: none !important;
    transition: background 0.35s ease !important;
}
.search-trigger-btn:hover {
    background: var(--theme-strong) !important;
    transform: none !important;
}

#game-search {
    width: 0;
    opacity: 0;
    visibility: hidden;
    height: 40px;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    border: 0 solid transparent;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-dark);
    /* Constrain expansion so it can never exceed available nav space */
    max-width: min(170px, calc(100vw - 160px));
}
#game-search::placeholder { color: var(--theme-strong); font-weight: 400; opacity: 0.7; }

.search-wrapper-header.search-open #game-search {
    width: clamp(80px, 26vw, 150px);
    opacity: 1;
    visibility: visible;
    padding: 0 12px;
    border: 2px solid var(--theme-mid);
    background: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE ONLY — hamburger button + full-screen vertical panel
   Hidden on desktop via display:none on #menu-toggle
═══════════════════════════════════════════════════════════════════════════ */

/* Hamburger button — mobile only (hidden on desktop below).
   All global `button { ... }` rules are overridden here with !important
   so the hamburger is never affected by the shared button base style. */
#menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.8rem !important;
    color: var(--theme-dark) !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    border-radius: 0 !important;
    transform: none !important;
    transition: color 0.35s ease !important;
    /* Ensure it is always in the nav flow */
    position: static !important;
}
#menu-toggle:hover {
    background: none !important;
    transform: none !important;
    color: var(--theme-darker) !important;
}

/* ─── Mobile nav panel ────────────────────────────────────────────────────
   Hidden by default. JS adds .active to show it.
   Full-width, covers entire viewport below the nav bar.
   position:fixed is safe here because this element is OUTSIDE <nav>
   (backdrop-filter on <nav> would trap fixed children otherwise).
──────────────────────────────────────────────────────────────────────── */
.nav-right {
    display: none;
    position: fixed;
    /* 6px timer + 54px nav + 3px nav border-bottom = 63px */
    top: 63px;
    left: 0;
    right: 0;
    /* Stretch all the way to the very bottom — no gap when page scrolls */
    bottom: 0;
    z-index: 1005;

    background: var(--theme-light);
    border-top: 3px solid var(--theme-strong);

    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Even rhythm: no padding-top, let first item's padding do the work */
    gap: 0;
    padding: 0 20px 48px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: background 0.35s ease, border-color 0.35s ease;
}

/* Shown when JS adds .active — also lock body scroll */
.nav-right.active {
    display: flex;
}

/* Desktop nav items — hidden on mobile, shown in @media block below */
.nav-right-desktop {
    display: none;
}

/* Links — uniform rows with bottom divider */
.nav-right a {
    display: block;
    width: 100%;
    max-width: 340px;
    text-align: center;
    text-decoration: none;
    color: var(--theme-dark);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 0;
    border-bottom: 1px solid var(--theme-mid);
    transition: color 0.2s ease;
}
.nav-right a:first-child { border-top: 1px solid var(--theme-mid); margin-top: 16px; }
.nav-right a:hover { color: var(--theme-darker); }

/* Parents button — full-width themed pill, same visual weight as links */
#parent-btn {
    display: block;
    width: 100%;
    max-width: 340px;
    text-align: center;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--theme-dark);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    margin: 14px 0 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
#parent-btn:hover { background: var(--theme-darker); transform: scale(1.02); }

/* Theme dot row — same top spacing as the button gap */
.theme-selector {
    display: flex;
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    align-items: center;
    padding: 14px 0 0;
    width: 100%;
    max-width: 340px;
}
.theme-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2.5px solid rgba(0,0,0,0.15);
    cursor: pointer;
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}
.theme-dot:hover {
    box-shadow: 0 0 0 4px rgba(0,0,0,0.18);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP (≥1200px) — hide hamburger, show nav items inline in the nav bar.
   1200px is wide enough to fit logo + search + Terms + Contacts + Parents + dots.
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
    nav {
        height: 60px;
        padding: 0 20px;
        /* Use nowrap so items never stack — they stay on one line and compress */
        flex-wrap: nowrap;
    }

    /* Logo: grows to fill left half, pushing search to the centre */
    .nav-left { flex: 1 1 0; }
    .site-logo {
        height: var(--logo-h-desktop);
        max-width: min(var(--logo-maxw-desktop), 28vw);
    }

    /* Hide mobile-only controls */
    #menu-toggle         { display: none !important; }
    .search-trigger-btn  { display: none !important; }

    /* Search: fixed-width centre piece. Both sides have flex:1 so it stays
       visually centred. flex-shrink:1 lets it compress when space is tight
       rather than forcing a line-break (flex-wrap:nowrap prevents that anyway). */
    .search-wrapper-header {
        position: static;
        transform: none;
        flex: 0 1 200px;
        min-width: 80px;
        width: auto;
        margin: 0;
        max-width: 200px;
        pointer-events: auto;
        justify-content: center;
        overflow: visible;
    }

    /* Always-visible desktop search field */
    #game-search {
        width: 100% !important;
        max-width: 200px !important;
        height: 38px !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 0 16px !important;
        border: 2px solid var(--theme-mid) !important;
        background: white !important;
        margin: 0 !important;
        display: block;
        border-radius: 20px;
        font-size: 0.9rem !important;
    }
    #game-search:focus {
        border-color: var(--theme-accent, var(--theme-strong)) !important;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, var(--theme-strong)) 20%, transparent) !important;
    }

    /* ── Mobile panel: NEVER shown on desktop ── */
    .nav-right,
    .nav-right.active {
        display: none !important;
    }

    /* ── Desktop nav-right-desktop: flex:1, items pushed to the right edge ── */
    .nav-right-desktop {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        height: 100%;
        flex: 1 1 0;
    }

    .nav-right-desktop a {
        text-decoration: none;
        color: var(--theme-dark);
        font-weight: 700;
        font-size: 0.9rem;
        transition: color 0.2s ease;
        white-space: nowrap;
    }
    .nav-right-desktop a:hover { color: var(--theme-darker); }

    #parent-btn-desktop {
        display: inline-flex !important;
        align-items: center !important;
        width: auto !important;
        max-width: none !important;
        padding: 6px 14px !important;
        font-size: 0.88rem !important;
        font-weight: 700;
        border-radius: var(--radius-sm) !important;
        margin: 0 !important;
        background: var(--theme-dark);
        color: white;
        border: none;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.15s ease;
        line-height: 1 !important;
        transform: none !important;
    }
    #parent-btn-desktop:hover { background: var(--theme-darker) !important; transform: scale(1.03) !important; }

    .theme-selector-desktop {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: center;
        padding: 0;
    }
    .theme-selector-desktop .theme-dot {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. PARENT CONTROL ZONE
───────────────────────────────────────────────────────────────────────────── */
#parent-zone {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0,0,0,0.22);
    border: 3px solid var(--theme-mid);
    z-index: 2000;
    text-align: center;
    min-width: 280px;
    transition: border-color 0.35s ease;
}
#parent-zone h2 { color: var(--theme-dark); margin-top: 0; }
#parent-zone p  { color: var(--theme-text); }
#parent-zone input {
    padding: 10px;
    font-family: var(--font-main);
    font-size: 1.2rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--theme-mid);
    width: 100px;
    text-align: center;
    outline: none;
    color: var(--theme-dark);
    transition: border-color 0.2s;
}
#parent-zone input:focus { border-color: var(--theme-strong); }

/* ─────────────────────────────────────────────────────────────────────────────
   7. PAGE VIEWPORTS
───────────────────────────────────────────────────────────────────────────── */
.page {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 70px);
    padding: 20px;
}
.page.active { display: flex; }

#home-page {
    overflow-y: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#home-page::-webkit-scrollbar { display: none; }

#game-page {
    justify-content: flex-start;
    /* Remove horizontal padding so 95vw children align flush to the same edges */
    padding: 0;
    gap: 0;
    overflow-y: visible;
    height: auto;
    min-height: calc(100vh - 70px);
    /* Centre children horizontally */
    align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. WELCOME HERO
───────────────────────────────────────────────────────────────────────────── */
.home-hero {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 5px;
    width: 100%;
    max-width: 600px;
    flex-shrink: 0;
}
.home-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--theme-dark);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}
.home-hero p {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--theme-text);
    opacity: 0.8;
    margin-top: 0;
    margin-bottom: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. GAME GALLERY & CARDS
───────────────────────────────────────────────────────────────────────────── */
.game-gallery {
    width: 100%;
    max-width: 1000px;
    display: grid;
    /* Cards have a fixed max width — they never stretch wider.
       auto-fill + minmax means: fit as many 160px columns as possible,
       each capped at 220px. justify-content centres the row when there
       are fewer cards than columns available. */
    grid-template-columns: repeat(2, minmax(0, 220px));
    justify-content: center;
    gap: 14px;
    padding: 10px 8px 40px;
    overflow: visible;
}
@media (min-width: 480px) {
    .game-gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 220px));
        gap: 18px;
        padding: 10px 15px 40px;
    }
}
@media (min-width: 900px) {
    .game-gallery { gap: 24px; padding: 10px 20px 40px; }
}

.game-card {
    background: white;
    border-radius: 22px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 2.5px solid var(--theme-mid);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.35s ease;
    overflow: hidden;
    /* Fixed height so all cards are uniform — content clips, never pushes */
    height: 210px;
    padding: 0 0 18px;
    position: relative;
    /* Internal layout: stack banner, title, description vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-card:hover {
    transform: translateY(-7px) scale(1.02);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--theme-accent, var(--theme-strong));
}
.game-card:active { transform: scale(0.97); }

.game-card .card-banner {
    width: 100%;
    padding: 20px 0 14px;
    border-radius: 20px 20px 50% 50% / 20px 20px 26px 26px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.game-card .icon {
    font-size: clamp(2.4rem, 7vw, 3.2rem);
    display: block;
    line-height: 1;
}
.game-card h2 {
    margin: 0 10px 4px;
    color: var(--theme-dark);
    font-size: clamp(0.88rem, 2.5vw, 1rem);
    font-weight: 800;
    line-height: 1.25;
    width: 100%;
    /* Single line with ellipsis if title overflows */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
    flex-shrink: 0;
}
.game-card p {
    color: var(--theme-text);
    opacity: 0.75;
    font-weight: 600;
    font-size: clamp(0.74rem, 2vw, 0.82rem);
    margin: 0 12px;
    line-height: 1.4;
    width: 100%;
    padding: 0 8px;
    /* Two lines max, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Tags hidden from user — DOM-present for search */
.card-tags { display: none; }
.tag       { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   10. GAME PAGE — CONTAINER WITH INTEGRATED HEADER BAR
   The header (level indicator + exit button) lives INSIDE the top border of
   #game-container as a thick themed band — visually one unified component.
───────────────────────────────────────────────────────────────────────────── */

/* Outer wrapper — provides the top spacing from the nav */
.game-page-header-spacer {
    width: 95vw;
    max-width: 1000px;
    padding-top: 14px;
    flex-shrink: 0;
}

/* The game container — uniform themed border on all 4 sides, no border tricks */
#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
    border: 4px solid var(--theme-strong);

    width: 95vw;
    max-width: 1000px;
    margin-top: 14px;

    /* ── Strict fixed play area height — games cannot push this taller ──
       height is intentionally set (not just min/max) so the container
       never grows regardless of what the game renders inside it.
       overflow:hidden on the container + overflow-y:auto on .game-content-area
       means any overflow scrolls inside, never escapes. */
    height: clamp(460px, 72vh, 660px);
    min-height: 0;    /* override any inherited min-height */
    max-height: none; /* height alone controls it — no conflict */

    overflow: hidden; /* clip header corners + prevent ANY content escape */
    flex-shrink: 0;
    flex-grow: 0;
    padding: 0;
    position: relative;
    transition: border-color 0.35s ease;
}
#game-container::-webkit-scrollbar,
.area::-webkit-scrollbar { display: none; }

/* ── Header bar — in-flow band at the top of #game-container ── */
.game-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-shrink: 0;
    height: 52px;
    padding: 0 16px;
    /* Pastel dot colour as background — text is dark, always readable */
    background: var(--theme-strong);
    border-radius: calc(var(--radius-xl) - 4px) calc(var(--radius-xl) - 4px) 0 0;
    transition: background 0.35s ease;
}

#level-indicator {
    font-size: clamp(0.82rem, 2.2vw, 1rem);
    font-weight: 800;
    /* Dark themed text — readable on all pastel backgrounds */
    color: var(--theme-dark);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.exit-game-btn {
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 800;
    /* Dark-tinted ghost button on pastel band */
    background: rgba(0,0,0,0.10);
    color: var(--theme-dark);
    border: 2px solid rgba(0,0,0,0.18);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-main);
    margin: 0;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.exit-game-btn:hover {
    background: rgba(0,0,0,0.20);
    border-color: rgba(0,0,0,0.35);
}

/* Inner scroll area — everything below the header band */
.game-content-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: clamp(12px, 3vw, 28px);
}
.game-content-area::-webkit-scrollbar { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   11. GAME LAYOUT — two panels side by side
───────────────────────────────────────────────────────────────────────────── */
.game-layout {
    display: flex;
    flex-direction: row;
    gap: clamp(12px, 3vw, 32px);
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.area {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2.5vw, 18px);
    justify-content: center;
    align-content: center;
    align-items: center;
    min-width: min-content;
    max-width: 100%;
    overflow: visible;
}

.area[style*="--cols"] {
    display: grid;
    grid-template-columns: repeat(var(--cols), max-content);
    justify-content: center;
    align-content: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. ITEM & TARGET TOKENS
───────────────────────────────────────────────────────────────────────────── */
.item {
    --item-size: clamp(52px, 10vw, 78px);
    width: var(--item-size);
    height: var(--item-size);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(28px, 6.5vw, 48px);
    user-select: none;
    cursor: grab;
    z-index: 10;
    touch-action: none;
}
.item.dragging { transform: scale(1.1); opacity: 0.9; z-index: 1000; }

/* Shape colours — these are game-content colours, intentionally vivid */
.circle  { border-radius: 50%;  background-color: #ef4444; }
.square  { border-radius: 12px; background-color: #3b82f6; }
.triangle { background-color: #eab303; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.diamond  { background-color: #a855f7; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.hexagon  { background-color: #ec4899; clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }

.target {
    --item-size: clamp(52px, 10vw, 78px);
    width: var(--item-size);
    height: var(--item-size);
    flex-shrink: 0;
    border: 3px dashed var(--theme-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-light);
    transition: all 0.2s ease, border-color 0.35s ease;
    border-radius: 15px;
}
.target.circle-target  { border-radius: 50%; }
.target.square-target  { border-radius: 12px; }
.target.triangle-target { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); background-color: var(--theme-light); border: none; }
.target.diamond-target  { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); background-color: var(--theme-light); border: none; }
.target.hexagon-target  { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); background-color: var(--theme-light); border: none; }
.target.emoji-target    { border: 3px dashed var(--theme-mid); border-radius: 20px; }

.target.triangle-target, .item.triangle,
.target.diamond-target,  .item.diamond,
.target.hexagon-target,  .item.hexagon {
    --item-size: clamp(52px, 10vw, 78px);
    width: var(--item-size);
    height: var(--item-size);
}

.ghost   { font-size: clamp(24px, 7vw, 50px); opacity: 0.2; filter: grayscale(100%); }
.message { margin-top: 10px; font-weight: 800; font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--success-color); height: 40px; text-align: center; }

#target-slots .game-card {
    padding: clamp(10px, 2vw, 20px) !important;
    font-size: clamp(1.2rem, 3vw, 2rem) !important;
    border-width: 3px !important;
}

@keyframes pop {
    0%   { transform: scale(1);    }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1);    }
}
.matched-pop { animation: pop 0.4s ease-out; }

/* ─────────────────────────────────────────────────────────────────────────────
   13. WIN / LEVEL-UP OVERLAY — modal card, not full-screen
───────────────────────────────────────────────────────────────────────────── */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    /* Soft scrim behind the modal */
    background: color-mix(in srgb, var(--theme-light) 60%, transparent);
    backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    transition: background 0.35s ease;
}

/* The actual modal card */
#overlay .overlay-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 4px solid var(--theme-strong);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    padding: clamp(24px, 5vw, 48px) clamp(24px, 6vw, 56px);
    max-width: 480px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: border-color 0.35s ease;
}

#overlay-title {
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 800;
    color: var(--theme-dark);
    margin: 0;
    line-height: 1.15;
}
#overlay-msg {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--theme-text);
    margin: 0;
    font-weight: 700;
}

/* Single emoji displayed BELOW the message */
.overlay-emoji {
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    line-height: 1;
    margin: 4px 0 0;
    user-select: none;
}

.overlay-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   14. TIME-UP / SESSION EXPIRY OVERLAY — modal card style
───────────────────────────────────────────────────────────────────────────── */
#time-up-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--theme-light) 70%, transparent);
    backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    transition: background 0.35s ease;
}

/* Inner card — reuses overlay-card pattern */
#time-up-overlay .time-up-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 4px solid var(--theme-strong);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    padding: clamp(24px, 5vw, 48px) clamp(24px, 6vw, 56px);
    max-width: 500px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: border-color 0.35s ease;
}

#time-up-overlay h1 {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 800;
    color: var(--theme-dark);
    margin: 0;
}
#time-up-overlay p {
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    color: var(--theme-text);
    margin: 0;
    max-width: 400px;
    line-height: 1.6;
}

.time-up-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 6px;
}
.btn-finish   { background: var(--danger-color);  font-size: 1.1rem; }
.btn-finish:hover { background: var(--danger-dark); }
.btn-complete { background: var(--theme-dark); font-size: 1.1rem; }
.btn-complete:hover { background: var(--theme-darker); }

/* ─────────────────────────────────────────────────────────────────────────────
   15. GDPR CONSENT BANNER
───────────────────────────────────────────────────────────────────────────── */
#gdpr-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--theme-dark);
    color: white;
    padding: 12px 20px 14px;
    z-index: 4000;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 0.88rem;
    font-family: var(--font-main);
    line-height: 1.5;
    border-top: 3px solid var(--theme-strong);
    transition: background 0.35s ease, border-color 0.35s ease, opacity 0.4s ease;
}

/* Main row: text + Accept button side by side */
.gdpr-main-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#gdpr-banner p {
    margin: 0;
    flex: 1 1 260px;
    text-align: center;
    color: rgba(255,255,255,0.88);
}
#gdpr-banner strong { color: white; }

/* Inline "Details" toggle — looks like a link-button */
.btn-gdpr-details {
    display: inline;
    background: none;
    border: none;
    padding: 0 0 0 6px;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--theme-light);
    cursor: pointer;
    text-decoration: underline dotted;
    vertical-align: baseline;
    line-height: inherit;
    border-radius: 0;
    min-width: unset;
}
.btn-gdpr-details:hover  { color: white; text-decoration: underline; background: none; }
.btn-gdpr-details:focus-visible { outline: 2px solid var(--theme-light); border-radius: 2px; }

.gdpr-btns { display: flex; gap: 8px; flex-shrink: 0; }
.btn-gdpr-accept {
    padding: 8px 22px;
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0;
    background: var(--theme-strong);
    color: white;
    border-radius: 8px;
}
.btn-gdpr-accept:hover { background: var(--theme-mid); color: var(--theme-dark); }

/* Expandable detail panel */
.gdpr-detail-panel {
    margin-top: 10px;
    padding: 10px 14px 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.82);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}
.gdpr-detail-panel ul {
    margin: 0 0 6px 0;
    padding-left: 18px;
}
.gdpr-detail-panel li {
    margin-bottom: 4px;
}
.gdpr-detail-panel strong { color: white; }
.gdpr-detail-footer {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.58);
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────────────────────
   16. SHARED BUTTON BASE
───────────────────────────────────────────────────────────────────────────── */
button {
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--theme-dark);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: var(--font-main);
    margin: 6px;
    transition: transform 0.2s, background 0.2s;
}
button:hover    { transform: scale(1.05); background: var(--theme-darker); }
button.secondary { background: var(--neutral-dark); }
button.secondary:hover { background: var(--neutral-darker); }

/* ─────────────────────────────────────────────────────────────────────────────
   17. GAME INFO PANEL — SEO & AdSense content
   Sits below #game-container. Matches game-container border exactly.
───────────────────────────────────────────────────────────────────────────── */
#game-info-container {
    width: 95vw;
    max-width: 1000px;
    margin: 14px 0 20px;   /* 0 horizontal margin — centred by #game-page align-items:center */
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
    /* Identical border to #game-container — 4px same strong colour */
    border: 4px solid var(--theme-strong);
    padding: clamp(18px, 4vw, 36px);
    font-family: var(--font-main);
    color: var(--theme-text);
    line-height: 1.7;
    transition: border-color 0.35s ease;
}
#game-info-container h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-dark);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--theme-mid);
}
#game-info-container h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-dark);
    margin: 16px 0 6px;
}
#game-info-container p {
    font-size: 0.9rem;
    color: var(--theme-text);
    margin: 0 0 10px;
}
#game-info-container ul {
    padding-left: 1.4em;
    margin: 0 0 10px;
}
#game-info-container li {
    font-size: 0.9rem;
    color: var(--theme-text);
    margin-bottom: 4px;
}
#game-info-container .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
#game-info-container .info-chip {
    background: var(--theme-light);
    border: 2px solid var(--theme-mid);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--theme-dark);
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   18. CONTACT PAGE
───────────────────────────────────────────────────────────────────────────── */
#contact-page {
    justify-content: flex-start;
    padding: 28px 16px 60px;
    overflow-y: auto;
}

.contact-card {
    width: 100%;
    max-width: 560px;
    background: white;
    border-radius: var(--radius-xl);
    border: 4px solid var(--theme-strong);
    box-shadow: var(--card-shadow);
    padding: clamp(24px, 5vw, 48px) clamp(20px, 5vw, 44px);
    transition: border-color 0.35s ease;
}

.contact-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 800;
    color: var(--theme-dark);
    margin: 0 0 8px;
    text-align: center;
}

.contact-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--theme-text);
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.6;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.contact-field label {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--theme-dark);
    letter-spacing: 0.02em;
}

.contact-field input,
.contact-field textarea {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--theme-dark);
    background: var(--theme-light);
    border: 2px solid var(--theme-mid);
    border-radius: var(--radius-lg);
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.35s ease;
    resize: vertical;
    width: 100%;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: var(--theme-accent, var(--theme-strong));
    background: white;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, var(--theme-strong)) 20%, transparent);
}

/* Invalid state — shown after a submit attempt on an empty required field */
.contact-field input.invalid,
.contact-field textarea.invalid {
    border-color: var(--danger-color);
    background: #fff5f5;
}

.contact-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    background: var(--theme-dark);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    margin: 6px 0 0;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    line-height: 1;
}
.contact-submit-btn:hover  { background: var(--theme-darker); transform: scale(1.02); }
.contact-submit-btn:active { transform: scale(0.98); }
.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-result {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    display: none;   /* shown by JS after submit */
}
.contact-result.success {
    display: block;
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: #166534;
}
.contact-result.error {
    display: block;
    background: #fff5f5;
    border: 2px solid #fca5a5;
    color: #991b1b;
}

/* ─────────────────────────────────────────────────────────────────────────────
   19. FILTER & SORT SYSTEM
   Desktop: dropdown panels below nav, opened by nav link clicks.
   Mobile:  options embedded as vertical list inside the .nav-right mobile panel.
───────────────────────────────────────────────────────────────────────────── */

/* ── Desktop Filter link — same look as the other nav links ── */
#filter-btn-desktop {
    /* inherits all styles from .nav-right-desktop a — no overrides needed */
}
/* Highlight the arrow and text when a filter is active */
#filter-btn-desktop.filter-active {
    color: var(--theme-accent, var(--theme-strong)) !important;
    font-style: italic;
}

/* ── Desktop Sort link ── */
#sort-btn-desktop {
    /* inherits from .nav-right-desktop a */
}
#sort-btn-desktop.sort-active {
    color: var(--theme-accent, var(--theme-strong)) !important;
    font-style: italic;
}

/* ── Desktop dropdown panels (filter + sort share same base style) ── */
.filter-panel,
.sort-panel {
    position: fixed;
    /* top/right are set dynamically by JS to anchor under their button */
    z-index: 1010;
    background: white;
    border: 2.5px solid var(--theme-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0,0,0,0.13);
    padding: 10px 12px 12px;
    min-width: 200px;
    max-width: 380px;
    transition: border-color 0.35s ease;
}

/* .open overrides the element's inline style="display:none" */
.filter-panel.open,
.sort-panel.open { display: block !important; }

/* ── Desktop filter panel: 2-column grid (category tags | age tags) ── */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

/* Column heading label inside the filter grid */
.filter-col-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--theme-dark);
    opacity: 0.55;
    padding: 2px 14px 6px;
    white-space: nowrap;
}

/* "All" row spans both columns, sits above the grid */
.filter-all-row {
    margin-bottom: 2px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--theme-mid);
}

/* ── Filter options share the same look as sort options ── */
.filter-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-main);
    background: transparent;
    color: var(--theme-dark);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
    margin: 0;
    box-shadow: none;
    transform: none;
    line-height: 1.4;
    white-space: nowrap;
}
.filter-option:hover {
    background: var(--theme-light);
    color: var(--theme-darker);
    transform: none !important;
}
.filter-option.active {
    background: var(--theme-dark);
    color: white;
}
.filter-option.active:hover {
    background: var(--theme-darker);
    color: white;
}

/* Thin divider between the two grid columns */
.filter-grid-col:first-child {
    border-right: 1px solid var(--theme-mid);
    padding-right: 6px;
}
.filter-grid-col:last-child {
    padding-left: 6px;
}

/* ── Shared tag pill ROW (mobile filter tags only now) ── */
.mobile-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Sort options list — VERTICAL stack inside both desktop panel and mobile ── */
.sort-options-list,
.mobile-sort-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Sort option button — full-width row item */
.sort-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-main);
    background: transparent;
    color: var(--theme-dark);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
    margin: 0;
    box-shadow: none;
    transform: none;
    line-height: 1.4;
    white-space: nowrap;
}
.sort-option:hover {
    background: var(--theme-light);
    color: var(--theme-darker);
    transform: none !important;
}
.sort-option.active {
    background: var(--theme-dark);
    color: white;
}
.sort-option.active:hover {
    background: var(--theme-darker);
    color: white;
}

/* ── Filter pills shared between desktop and mobile ── */
.filter-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-main);
    background: var(--theme-light);
    color: var(--theme-dark);
    border: 2px solid var(--theme-mid);
    border-radius: 99px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
    user-select: none;
    white-space: nowrap;
}
.filter-tag-pill:hover {
    background: var(--theme-mid);
    border-color: var(--theme-strong);
    transform: scale(1.05);
}
/* Active / selected pill */
.filter-tag-pill.active {
    background: var(--theme-dark);
    border-color: var(--theme-dark);
    color: white;
    transform: scale(1.05);
}
/* "All" pill — always first */
.filter-tag-pill.all-pill { order: -1; }

/* ── Mobile filter section (inside .nav-right panel) ── */
.mobile-filter-section,
.mobile-sort-section {
    width: 100%;
    max-width: 340px;
    padding: 6px 0 8px;
}
/* Mobile filter tags container now holds the same grid as desktop — block layout */
.mobile-filter-tags {
    display: block;
    width: 100%;
}
/* Inside the mobile panel the filter-option rows are slightly taller for touch */
.mobile-filter-section .filter-option {
    padding: 10px 14px;
    font-size: 0.92rem;
}
.mobile-sort-options .sort-option {
    text-align: center;
    border: 2px solid var(--theme-mid);
    border-radius: var(--radius-sm);
    background: var(--theme-light);
    margin-bottom: 0;
}
.mobile-sort-options .sort-option.active {
    background: var(--theme-dark);
    border-color: var(--theme-dark);
    color: white;
}

/* Highlight the Filter / Sort links when expanded or active */
#mobile-filter-link.filter-open,
#mobile-filter-link.filter-active,
#mobile-sort-link.sort-open,
#mobile-sort-link.sort-active {
    color: var(--theme-accent, var(--theme-strong)) !important;
    font-style: italic;
}

/* ── Active filter indicator bar below gallery ── */
.filter-active-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--theme-light);
    border: 2px solid var(--theme-mid);
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--theme-dark);
    margin-bottom: 12px;
    animation: filterDropIn 0.18s ease;
}
.filter-active-bar button {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    margin: 0 !important;
    font-size: 0.82rem !important;
    color: var(--theme-dark) !important;
    cursor: pointer !important;
    font-weight: 800;
    border-radius: 99px !important;
    transform: none !important;
    transition: color 0.15s ease !important;
    line-height: 1 !important;
}
.filter-active-bar button:hover {
    color: var(--danger-color) !important;
    background: none !important;
    transform: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   20. POPULAR BADGE
───────────────────────────────────────────────────────────────────────────── */
.popular-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--theme-dark);
    color: white;
    font-size: 0.64rem;
    font-weight: 800;
    font-family: var(--font-main);
    padding: 3px 7px;
    border-radius: 99px;
    white-space: nowrap;
    z-index: 2;
    letter-spacing: 0.02em;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* ─────────────────────────────────────────────────────────────────────────────
   21. ABOUT US PAGE
───────────────────────────────────────────────────────────────────────────── */
.about-section {
    width: 100%;
    margin-bottom: 24px;
}
.about-section h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-dark);
    margin: 0 0 8px;
}
.about-section p {
    font-size: 0.98rem;
    color: var(--theme-text);
    line-height: 1.65;
    margin: 0;
}
.about-back {
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INTRO BANNER
───────────────────────────────────────────────────────────────────────────── */
#intro-banner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto 40px;

    /* Responsive spacing without excessive mobile padding */
    padding: clamp(36px, 6vw, 60px) clamp(18px, 4vw, 40px);

    background: linear-gradient(
        135deg,
        var(--theme-light) 0%,
        #ffffff 100%
    );

    border-radius: var(--radius-xl);
    border: 2px solid var(--theme-mid);
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    box-shadow: var(--card-shadow);
}

/* Animated background layer */
.banner-visuals {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Individual floating emoji */
.floating-emoji {
    position: absolute;
    left: var(--pos-x);
    top: var(--pos-y);

    display: block;
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1;
    opacity: 0.4;
    user-select: none;

    animation-name: emojiFloat;
    animation-duration: 8s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: var(--delay);

    /* Centre each emoji around its configured position */
    transform: translate(-50%, -50%);
    will-change: transform;
}

@keyframes emojiFloat {
    0%,
    100% {
        transform: translate(-50%, -50%)
                   translateY(0)
                   rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%)
                   translateY(-20px)
                   rotate(15deg);
    }
}

/* Text layer */
.banner-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.banner-title {
    margin: 0;

    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;

    color: var(--theme-dark);
}

.banner-subtitle {
    width: 100%;
    max-width: 850px;
    margin: 10px auto 20px;
    padding: 0 4px;

    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.55;

    color: var(--theme-text);
    opacity: 0.85;
}

.banner-divider {
    width: 60px;
    height: 5px;
    margin: 0 auto;

    background: var(--theme-strong);
    border-radius: 10px;
}

/* Small-screen adjustments */
@media (max-width: 600px) {
    #intro-banner {
        margin: 14px auto 28px;
        padding: 34px 16px;
    }

    .banner-content {
        max-width: 100%;
    }

    .banner-subtitle {
        max-width: 100%;
        line-height: 1.45;
    }

    /* Keep emojis decorative and away from the main text */
    .floating-emoji {
        font-size: 1.35rem;
        opacity: 0.25;
    }
}

/* Respect accessibility settings */
@media (prefers-reduced-motion: reduce) {
    .floating-emoji {
        animation: none;
    }
}