/* ===========================================================================
   components.css — Casino Design System: per-component styles
   ---------------------------------------------------------------------------
   Every rule references tokens from tokens.css. No raw hex values.
   =========================================================================== */


/* ======================================== HEADER ===================== */

/* The casino-header wraps the legacy .nav-cyber. We keep the legacy class
   so existing JS (data-nav-toggle, data-user-toggle) keeps working, and
   selectively re-skin it with .casino-nav side-by-side. */

.casino-theme .casino-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-overlay);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.casino-theme .casino-header .casino-nav {
    /* Reset legacy .nav-cyber styles we want to override. */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
    padding: var(--space-3) var(--space-5);
}

.casino-theme .casino-header .nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-gap: var(--space-5);
    align-items: center;
}

/* Hamburger no longer needed since the bottom tab bar IS the menu. */
.casino-theme .casino-header .hamburger { display: none !important; }

.casino-theme .casino-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: var(--fs-lg);
    color: var(--text-primary);
    letter-spacing: 0.02em;
    text-decoration: none;
}
.casino-theme .casino-brand:hover { opacity: 1; color: var(--text-primary); }
.casino-theme .casino-brand .logo-orb {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle at 30% 30%, var(--accent-primary), #009947 70%);
    box-shadow: 0 0 16px var(--accent-primary-glow), inset 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Rounded-square brand mark — modern casino logo treatment (betre-game style)
   but rendered in the casino-green palette instead of lavender. */
.casino-theme .casino-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-primary), #00b85d 80%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--accent-primary-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.casino-theme .casino-brand:hover .casino-brand-mark {
    transform: rotate(-4deg) scale(1.05);
    box-shadow: 0 6px 16px var(--accent-primary-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.casino-theme .casino-brand-mark svg {
    width: 22px;
    height: 22px;
}
.casino-theme .casino-brand-text {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: var(--fs-md);
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* .casino-nav-links removed 2026-05-17 — primary nav moved to bottom tab
   bar (.casino-bottom-nav). Legacy .nav-links class is hidden via theme.js
   on this template path; no styles defined here so the header collapses
   to just brand + right cluster. */

.casino-theme .casino-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Balance pill (top-right of header for authenticated users) */
.casino-theme .balance-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease-out);
}
.casino-theme .balance-pill:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-green);
    color: var(--text-primary);
}
.casino-theme .balance-pill-icon { color: var(--accent-primary); font-size: var(--fs-sm); }
.casino-theme .balance-pill-amt {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--accent-primary);
}
.casino-theme .balance-pill-ccy {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* Primary deposit CTA */
.casino-theme .cta-deposit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-pill);
    background: var(--accent-primary);
    color: #002814;
    font-weight: 800;
    font-size: var(--fs-sm);
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
}
.casino-theme .cta-deposit:hover {
    color: #002814;
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-1px);
}

/* Re-skin legacy user-pill so it matches casino tokens */
.casino-theme .user-pill {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 4px var(--space-3) 4px 4px;
    color: var(--text-primary);
    gap: var(--space-2);
}
.casino-theme .user-pill:hover { border-color: var(--accent-primary); }
.casino-theme .user-pill .avatar {
    background: var(--accent-primary);
    color: #002814;
    font-weight: 800;
}
.casino-theme .user-pill-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
}
.casino-theme .user-menu {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
}
.casino-theme .user-menu a {
    color: var(--text-secondary);
    transition: all var(--dur-fast) var(--ease-out);
}
.casino-theme .user-menu a:hover {
    background: var(--bg-base);
    color: var(--accent-primary);
}

/* Anonymous-state buttons */
.casino-theme .casino-btn-primary {
    background: var(--accent-primary) !important;
    color: #002814 !important;
    border: 0 !important;
    padding: var(--space-2) var(--space-5) !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}
.casino-theme .casino-btn-primary:hover {
    box-shadow: var(--shadow-glow-green) !important;
    transform: translateY(-1px);
}
.casino-theme .casino-btn-ghost {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-strong) !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 600 !important;
}
.casino-theme .casino-btn-ghost:hover {
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

/* Header responsive: collapse middle nav-links via the legacy hamburger */
@media (max-width: 1024px) {
    .casino-theme .casino-header .nav-inner {
        grid-template-columns: auto auto auto;
    }
    .casino-theme .balance-pill-ccy { display: none; }
    .casino-theme .user-pill-name   { display: none; }
}

@media (max-width: 900px) {
    /* Collapse the center nav-links on small screens — the legacy hamburger
       button (.hamburger in nav-cyber) is the trigger, but its toggling is
       handled by theme.js. For now we just hide the middle list so the
       header doesn't overflow horizontally. */
    .casino-theme .casino-header .casino-nav-links { display: none; }
    .casino-theme .casino-header .nav-inner { grid-template-columns: auto 1fr auto; }
}

@media (max-width: 768px) {
    .casino-theme .casino-header .casino-nav { padding: var(--space-2) var(--space-3); }
    .casino-theme .cta-deposit { padding: var(--space-2) var(--space-3); }
    .casino-theme .casino-right { gap: var(--space-2); }
}

@media (max-width: 600px) {
    /* Tightest budget — strip text from the Deposit CTA so it becomes an
       icon-only pill. Balance pill keeps just the amount. */
    .casino-theme .balance-pill { padding: var(--space-1) var(--space-3); gap: 4px; }
    .casino-theme .cta-deposit {
        padding: var(--space-2);
        width: 36px; height: 36px;
        justify-content: center;
    }
    .casino-theme .cta-deposit i { margin: 0; }
    /* Hide the literal "Deposit" text by collapsing the text node — the
       icon stays visible. */
    .casino-theme .cta-deposit { font-size: 0; }
    .casino-theme .cta-deposit i { font-size: var(--fs-md); }
}


/* ======================================== BOTTOM NAV (mobile-first) === */
/* Fixed bottom tab bar — designed for mobile + the planned Telegram
   Mini App conversion. Always visible; safe-area-aware on notched
   devices via env(safe-area-inset-bottom). */

.casino-theme .casino-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    background: var(--bg-overlay);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.casino-theme .casino-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--space-2) var(--space-1);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out);
    min-height: 56px;
    border-top: 2px solid transparent;
}
.casino-theme .casino-tab i {
    font-size: 18px;
    transition: transform var(--dur-fast) var(--ease-out);
}
.casino-theme .casino-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}
.casino-theme .casino-tab:hover i { transform: translateY(-1px); }
.casino-theme .casino-tab.active {
    color: var(--accent-primary);
    border-top-color: var(--accent-primary);
    background: rgba(1, 255, 129, 0.06);
}
.casino-theme .casino-tab.active i {
    filter: drop-shadow(0 0 6px var(--accent-primary-glow));
}

/* Push page content so it doesn't hide behind the bottom nav. ~64px
   nav + a little breathing room. Footer ends up scrollable above the
   bar — see CASINO-MAIN ADJUSTMENT section further down. */
.casino-theme {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0));
}

/* Featured center tab (Games) — always visually emphasized.
   Mimics the raised primary-action button common in Telegram Mini Apps
   and native mobile bottom-nav patterns. */
.casino-theme .casino-tab-featured {
    color: var(--accent-primary);
    position: relative;
    overflow: visible;
}
.casino-theme .casino-tab-featured i {
    /* Raised pill that floats above the bar */
    width: 52px;
    height: 52px;
    margin-top: -22px;
    margin-bottom: 4px;
    border-radius: var(--radius-pill);
    background: var(--accent-primary);
    color: #002814;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 18px var(--accent-primary-glow),
                0 2px 6px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: 3px solid var(--bg-base);
    animation: casino-fab-pulse 3.4s var(--ease-out) infinite;
    transition: transform var(--dur-fast) var(--ease-out);
}
.casino-theme .casino-tab-featured:hover { color: var(--accent-primary); }
.casino-theme .casino-tab-featured:hover i { transform: translateY(-2px) scale(1.04); }
.casino-theme .casino-tab-featured.active {
    border-top-color: transparent;
    background: transparent;
}
.casino-theme .casino-tab-featured.active i {
    box-shadow: 0 0 0 4px rgba(1, 255, 129, 0.25),
                0 6px 22px var(--accent-primary-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Cramped layout — tighten labels on small phones */
@media (max-width: 380px) {
    .casino-theme .casino-tab { font-size: 9px; padding: var(--space-2) 2px; }
    .casino-theme .casino-tab i { font-size: 16px; }
    .casino-theme .casino-tab-featured i {
        width: 48px;
        height: 48px;
        margin-top: -20px;
        font-size: 20px;
    }
}


/* ======================================== FLOATING SUPPORT FAB ============= */
/* Round chat-bubble button. Always reachable; sits above the bottom nav
   on every page, with safe-area-inset awareness so it doesn't collide
   with notched-device home-indicator zones. */

.casino-theme .casino-fab {
    position: fixed;
    right: var(--space-4);
    /* Bottom nav (~64px) + breathing room (~16px) + safe-area inset */
    bottom: calc(64px + var(--space-4) + env(safe-area-inset-bottom, 0));
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    background: var(--accent-primary);
    color: #002814;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 18px var(--accent-primary-glow),
                0 2px 6px rgba(0, 0, 0, 0.5);
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
    animation: casino-fab-pulse 3.4s var(--ease-out) infinite;
}
.casino-theme .casino-fab:hover {
    color: #002814;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 24px var(--accent-primary-glow),
                0 4px 10px rgba(0, 0, 0, 0.6);
}
.casino-theme .casino-fab:active { transform: translateY(0) scale(0.97); }
.casino-theme .casino-fab i {
    font-size: 22px;
}

@keyframes casino-fab-pulse {
    0%, 100% { box-shadow: 0 6px 18px var(--accent-primary-glow),
                           0 0 0 0 var(--accent-primary-glow),
                           0 2px 6px rgba(0, 0, 0, 0.5); }
    60%      { box-shadow: 0 6px 18px var(--accent-primary-glow),
                           0 0 0 12px rgba(1, 255, 129, 0),
                           0 2px 6px rgba(0, 0, 0, 0.5); }
}

@media (max-width: 480px) {
    .casino-theme .casino-fab { width: 52px; height: 52px; }
    .casino-theme .casino-fab i { font-size: 20px; }
}


/* ======================================== FOOTER ===================== */

.casino-theme .casino-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-10);
    padding: var(--space-8) var(--space-5) var(--space-5);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.casino-theme .casino-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: var(--space-8);
}

.casino-theme .casino-footer-col h6.casino-footer-title {
    color: var(--text-primary);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: var(--space-4);
    font-weight: 700;
}

.casino-theme .casino-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-gap: var(--space-2);
}
.casino-theme .casino-footer-links a {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: color var(--dur-fast) var(--ease-out);
}
.casino-theme .casino-footer-links a:hover { color: var(--accent-primary); }

.casino-theme .casino-pay-icons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.casino-theme .casino-pay-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: var(--fs-xs);
    color: var(--text-primary);
    font-weight: 600;
}
.casino-theme .casino-pay-icon i { color: var(--accent-primary); }

.casino-theme .casino-footer-fineprint {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    margin: 0;
}

.casino-theme .casino-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.casino-theme .casino-badge-18 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--state-loss);
    color: #fff;
    font-weight: 800;
    font-size: var(--fs-xs);
}
.casino-theme .casino-badge-license {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: var(--fs-xs);
    color: var(--text-secondary);
}
.casino-theme .casino-badge-license strong { color: var(--accent-gold); margin-left: 4px; }

.casino-theme .casino-footer-bottom {
    max-width: 1320px;
    margin: var(--space-6) auto 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

@media (max-width: 768px) {
    .casino-theme .casino-footer-inner {
        grid-template-columns: 1fr;
        grid-gap: var(--space-6);
    }
    .casino-theme .casino-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* ======================================== HERO ====================== */

.casino-theme .casino-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-subtle);
    padding: var(--space-9) var(--space-7);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-card);
}

/* CSS-only animated gradient using accent green, very low opacity, slow drift */
.casino-theme .casino-hero-bg {
    position: absolute;
    inset: -20% -20% -20% -20%;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 24%, var(--accent-primary-glow), transparent 45%),
        radial-gradient(circle at 82% 76%, rgba(0, 194, 255, 0.16), transparent 50%),
        radial-gradient(circle at 50% 100%, var(--accent-primary-glow), transparent 45%);
    opacity: 0.5;
    animation: casino-hero-drift 18s var(--ease-out) infinite alternate;
    z-index: 0;
}

@keyframes casino-hero-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(2%, -2%) scale(1.04); }
    100% { transform: translate(-2%, 2%) scale(1); }
}

.casino-theme .casino-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    /* Single column since the stat cards block is hidden. To restore a
       two-column split layout (hero text + stat cards on the right),
       change to "grid-template-columns: 1.2fr 1fr". */
    grid-template-columns: 1fr;
    grid-gap: var(--space-7);
    align-items: center;
}

.casino-theme .casino-hero-text { display: flex; flex-direction: column; gap: var(--space-3); }

.casino-theme .casino-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    align-self: flex-start;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: rgba(1, 255, 129, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.casino-theme .casino-hero-title {
    font-size: var(--fs-5xl);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: var(--space-1) 0;
    color: var(--text-primary);
    /* subtle green-tinted gradient on type */
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.casino-theme .casino-hero-sub {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    max-width: 56ch;
    margin: 0;
}

.casino-theme .casino-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.casino-theme .casino-cta-primary,
.casino-theme .casino-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: var(--fs-md);
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: all var(--dur-fast) var(--ease-out);
}

.casino-theme .casino-cta-primary {
    background: var(--accent-primary);
    color: #002814;
    box-shadow: var(--shadow-glow-green);
}
.casino-theme .casino-cta-primary:hover {
    color: #002814;
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.casino-theme .casino-cta-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}
.casino-theme .casino-cta-ghost:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Player-care / responsible-play strip under the hero CTAs. */
.casino-theme .casino-hero-care {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-4);
    background: rgba(1, 255, 129, 0.06);
    border: 1px solid rgba(1, 255, 129, 0.25);
    border-radius: var(--radius-md);
    max-width: 60ch;
}
.casino-theme .casino-hero-care-icon { font-size: 20px; line-height: 1.4; }
.casino-theme .casino-hero-care-text {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.casino-theme .casino-hero-care-text strong { color: var(--state-loss); }
.casino-theme .casino-hero-care-text a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(1, 255, 129, 0.4);
    text-underline-offset: 2px;
}
.casino-theme .casino-hero-care-text a:hover { text-decoration-color: var(--accent-primary); }

/* ---- Stat cards (right side of hero) ------------------------------------- */
.casino-theme .casino-hero-stats {
    display: grid;
    grid-gap: var(--space-3);
}

.casino-theme .casino-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-base) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
    animation: casino-stat-pulse 5s var(--ease-out) infinite;
}
.casino-theme .casino-stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}
.casino-theme .casino-stat-card:nth-child(2) { animation-delay: 0.6s; }
.casino-theme .casino-stat-card:nth-child(3) { animation-delay: 1.2s; }

@keyframes casino-stat-pulse {
    0%, 100% { box-shadow: var(--shadow-card); }
    50%      { box-shadow: 0 6px 20px rgba(1, 255, 129, 0.12), var(--shadow-card); }
}

.casino-theme .casino-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.casino-theme .casino-stat-value {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.casino-theme .casino-stat-foot {
    font-size: var(--fs-xs);
    margin-top: var(--space-1);
}

/* Responsive: stack hero, scroll stat cards horizontally on mobile */
@media (max-width: 900px) {
    .casino-theme .casino-hero { padding: var(--space-7) var(--space-5); }
    .casino-theme .casino-hero-inner { grid-template-columns: 1fr; grid-gap: var(--space-5); }
    .casino-theme .casino-hero-title { font-size: var(--fs-3xl); }
    .casino-theme .casino-hero-sub   { font-size: var(--fs-md); }
    .casino-theme .casino-hero-stats {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-3);
        padding-bottom: var(--space-2);
        scrollbar-width: thin;
    }
    .casino-theme .casino-stat-card {
        flex: 0 0 220px;
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    .casino-theme .casino-hero-ctas { width: 100%; }
    .casino-theme .casino-cta-primary,
    .casino-theme .casino-cta-ghost { flex: 1; justify-content: center; }
}


/* ======================================== HOW IT WORKS (3-step funnel) ===== */

.casino-theme .casino-howitworks {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-card);
}

.casino-theme .casino-howitworks-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    max-width: 880px;
    margin: 0 auto;
}

.casino-theme .casino-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    flex: 0 0 auto;
    min-width: 140px;
}

.casino-theme .casino-step-circle {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xl);
    box-shadow: 0 0 0 4px rgba(1, 255, 129, 0.08),
                0 4px 16px var(--accent-primary-glow);
    transition: transform var(--dur-base) var(--ease-out);
}
.casino-theme .casino-step:hover .casino-step-circle {
    transform: translateY(-2px) scale(1.04);
}
.casino-theme .casino-step-circle-gold {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.08),
                0 4px 16px rgba(255, 184, 0, 0.25);
}

.casino-theme .casino-step-label {
    font-size: var(--fs-md);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.casino-theme .casino-step-sub {
    font-size: var(--fs-xs);
}

/* Dotted line between steps (mimics betre-game's dotted connector) */
.casino-theme .casino-step-link {
    flex: 1 1 auto;
    height: 0;
    border-top: 2px dashed var(--border-strong);
    margin-bottom: var(--space-7); /* aligns with center of circles above text */
    min-width: 24px;
}

@media (max-width: 720px) {
    .casino-theme .casino-howitworks { padding: var(--space-5) var(--space-3); }
    .casino-theme .casino-howitworks-track {
        flex-direction: column;
        gap: var(--space-3);
    }
    .casino-theme .casino-step-link {
        width: 2px;
        height: 22px;
        border-top: 0;
        border-left: 2px dashed var(--border-strong);
        margin: 0;
    }
    .casino-theme .casino-step { min-width: 0; }
}


/* ======================================== LIVE WINS TICKER =========== */

.casino-theme .casino-livewins {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.casino-theme .casino-livewins-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    color: var(--accent-primary);
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.casino-theme .casino-livewins-dot {
    width: 8px; height: 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: casino-livewins-blink 1.4s var(--ease-out) infinite;
}
@keyframes casino-livewins-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.casino-theme .casino-livewins-rail {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

.casino-theme .casino-livewins-track {
    display: flex;
    gap: var(--space-6);
    animation: casino-livewins-scroll 45s linear infinite;
    width: max-content;
}

@keyframes casino-livewins-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.casino-theme .casino-livewin-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    font-size: var(--fs-sm);
    flex-shrink: 0;
}

.casino-theme .casino-livewin-avatar {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-pill);
    background: var(--accent-primary);
    color: #002814;
    font-size: var(--fs-xs);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.casino-theme .casino-livewin-user {
    font-weight: 700;
    color: var(--text-primary);
}

.casino-theme .casino-livewin-game {
    font-size: var(--fs-xs);
}

.casino-theme .casino-livewin-amt {
    font-weight: 800;
    font-size: var(--fs-sm);
}

.casino-theme .casino-livewin-time {
    font-size: var(--fs-xs);
}

/* Pause animation on hover so users can read items */
.casino-theme .casino-livewins:hover .casino-livewins-track { animation-play-state: paused; }

@media (max-width: 768px) {
    .casino-theme .casino-livewins { padding: var(--space-2) var(--space-3); gap: var(--space-3); }
    .casino-theme .casino-livewins-label { font-size: 10px; letter-spacing: 0.12em; }
    .casino-theme .casino-livewin-game,
    .casino-theme .casino-livewin-time { display: none; }
}


/* ======================================== GAME GRID ================= */

.casino-theme .casino-games-container { padding-top: var(--space-4); }

.casino-theme .casino-games-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.casino-theme .casino-games-title {
    color: var(--text-primary);
    font-size: var(--fs-2xl);
    font-weight: 800;
    margin: 0;
}
.casino-theme .casino-games-count { margin: var(--space-1) 0 0; font-size: var(--fs-sm); }

.casino-theme .casino-games-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    min-width: 280px;
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.casino-theme .casino-games-search i { color: var(--text-muted); margin-right: var(--space-2); }
.casino-theme .casino-games-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}
.casino-theme .casino-games-search-input {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    outline: none;
    font-size: var(--fs-sm);
    font-family: var(--font-ui);
}
.casino-theme .casino-games-search-input::placeholder { color: var(--text-muted); }

.casino-theme .casino-games-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.casino-theme .casino-games-pill {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    font-family: var(--font-ui);
}
.casino-theme .casino-games-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.casino-theme .casino-games-pill.active {
    background: var(--accent-primary);
    color: #002814;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-green);
}
.casino-theme .casino-games-pill[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.casino-theme .casino-games-tip {
    margin-bottom: var(--space-4);
    font-size: var(--fs-sm);
}

/* Card overrides — keep existing .game-card markup intact, re-skin to tokens. */
.casino-theme .casino-game-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-card);
    backdrop-filter: none;
}
.casino-theme .casino-game-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-4px);
}
.casino-theme .casino-game-card .game-icon {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    transition: transform var(--dur-base) var(--ease-out);
}
.casino-theme .casino-game-card:hover .game-icon { transform: scale(1.03); }

/* Corner status tag — sits over top-left of card */
.casino-theme .casino-game-tag {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 2;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.casino-theme .casino-game-tag-live {
    background: var(--accent-primary);
    color: #002814;
}
.casino-theme .casino-game-tag-warn {
    background: var(--state-pending);
    color: #2a1a00;
}
.casino-theme .casino-game-tag-new {
    background: var(--accent-secondary);
    color: #002a3d;
}

/* Filtered-out: hide via [hidden] which JS sets */
.casino-theme .casino-game-card[hidden],
.casino-theme .col-md-6[hidden],
.casino-theme .col-lg-4[hidden] { display: none !important; }


/* ======================================== AUTH FORMS ================ */
/* login.html / signup.html / logout.html / profile.html all reuse:
   .auth-shell, .auth-card, .auth-title, .auth-subtitle, .auth-field,
   .field-icon, .auth-row, .remember, .forgot, .auth-btn, .auth-divider,
   .auth-link-secondary, .auth-error. We re-skin here without touching
   the templates (except where Prompt 7 explicitly required a tweak). */

.casino-theme .auth-shell,
.casino-theme .auth-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-7) var(--space-4);
    min-height: 60vh;
}

.casino-theme .auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-7) var(--space-7) var(--space-6);
    box-shadow: var(--shadow-card);
}

.casino-theme .auth-title {
    color: var(--text-primary);
    font-size: var(--fs-2xl);
    font-weight: 800;
    margin: 0 0 var(--space-1);
    letter-spacing: -0.01em;
}
.casino-theme .auth-subtitle {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    margin: 0 0 var(--space-5);
}

.casino-theme .auth-error {
    background: rgba(255, 61, 90, 0.10);
    border: 1px solid var(--state-loss);
    color: var(--state-loss);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.casino-theme .auth-field {
    position: relative;
    margin-bottom: var(--space-4);
}
.casino-theme .auth-field label {
    display: block;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-2);
    font-weight: 700;
}
.casino-theme .auth-field input,
.casino-theme .auth-field select,
.casino-theme .auth-field textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-9);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: var(--fs-md);
    outline: none;
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.casino-theme .auth-field input:focus,
.casino-theme .auth-field select:focus,
.casino-theme .auth-field textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}
.casino-theme .auth-field input::placeholder { color: var(--text-muted); }
.casino-theme .auth-field .field-icon {
    position: absolute;
    left: var(--space-4);
    top: 38px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--dur-fast) var(--ease-out);
}
.casino-theme .auth-field input:focus ~ .field-icon { color: var(--accent-primary); }

/* signup form errors */
.casino-theme .auth-field ul.errorlist,
.casino-theme form.signup-form ul.errorlist {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 61, 90, 0.10);
    border: 1px solid var(--state-loss);
    border-radius: var(--radius-sm);
    color: var(--state-loss);
    font-size: var(--fs-xs);
}
.casino-theme .help-text,
.casino-theme .helptext {
    display: block;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    margin-top: var(--space-1);
    line-height: 1.4;
}

.casino-theme .auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 var(--space-4);
    font-size: var(--fs-sm);
}
.casino-theme .auth-row .remember {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    cursor: pointer;
}
.casino-theme .auth-row .remember input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--bg-base);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    position: relative;
}
.casino-theme .auth-row .remember input[type=checkbox]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
.casino-theme .auth-row .remember input[type=checkbox]:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #002814;
    font-size: 11px;
    font-weight: 900;
}
.casino-theme .auth-row .forgot {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--fs-sm);
}
.casino-theme .auth-row .forgot:hover { color: var(--accent-primary); }

.casino-theme .auth-btn {
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: var(--accent-primary);
    color: #002814;
    border: 0;
    border-radius: var(--radius-pill);
    font-size: var(--fs-md);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease-out);
}
.casino-theme .auth-btn:hover {
    color: #002814;
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-1px);
}
.casino-theme .auth-btn.cancel-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    margin-top: var(--space-3);
}
.casino-theme .auth-btn.cancel-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: none;
}
.casino-theme .auth-btn.logout-btn {
    background: var(--state-loss);
    color: #fff;
}

.casino-theme .auth-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: var(--space-5) 0 var(--space-3);
    position: relative;
}
.casino-theme .auth-divider::before,
.casino-theme .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-subtle);
}
.casino-theme .auth-divider::before { left: 0; }
.casino-theme .auth-divider::after  { right: 0; }

.casino-theme .auth-link-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: all var(--dur-fast) var(--ease-out);
}
.casino-theme .auth-link-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

@media (max-width: 480px) {
    .casino-theme .auth-card { padding: var(--space-5) var(--space-4) var(--space-5); }
    .casino-theme .auth-title { font-size: var(--fs-xl); }
}


/* ======================================== CASINO-MAIN ADJUSTMENT ===== */
/* Override base.css default padding-top since the sticky header is part of
   the flow, not absolute. Just ensures sensible breathing room. */
.casino-theme .casino-main {
    padding-top: var(--space-5);
    padding-bottom: var(--space-10);
}
@media (max-width: 768px) {
    .casino-theme .casino-main {
        padding-top: var(--space-4);
    }
}
