/* Extreme Mobile-First Native App Styling for Jojo Play */
:root {
    --app-bg: #0A0D14;
    --app-surface: #121722;
    --app-surface-light: #1A2232;
    --gold: #F59E0B;
    --gold-glow: rgba(245, 158, 11, 0.4);
    --emerald: #10B981;
    --danger: #EF4444;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 16px);

    /* Dynamic Safe Area & Header Height Calculation */
    --header-pt: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
    --header-pb: 10px;
    --header-content-h: 40px;
    --header-total-h: calc(var(--header-content-h) + var(--header-pb) + var(--header-pt));
}

/* 1. iPhones with Dynamic Island (iPhone 14 Pro, 14 Pro Max, 15, 15 Plus, 15 Pro, 15 Pro Max, 16 series) */
@media screen and (-webkit-min-device-pixel-ratio: 2) and (min-device-height: 850px) and (max-device-width: 440px) {
    :root {
        --header-pt: max(60px, calc(env(safe-area-inset-top, 59px) + 8px));
        --header-pb: 10px;
        --header-content-h: 40px;
    }
}

/* 2. iPhones with standard Notch (iPhone X, XS, 11 Pro, 12, 12 Pro, 13, 13 Pro, 14, 14 Plus) */
@media screen and (-webkit-min-device-pixel-ratio: 2) and (min-device-height: 800px) and (max-device-height: 849px) and (max-device-width: 430px) {
    :root {
        --header-pt: max(48px, calc(env(safe-area-inset-top, 44px) + 6px));
        --header-pb: 9px;
        --header-content-h: 38px;
    }
}

/* Dynamic Island & Notch Hardware Overrides via JS Detection */
html.has-dynamic-island {
    --header-pt: max(60px, calc(env(safe-area-inset-top, 59px) + 8px)) !important;
    --header-pb: 10px !important;
    --header-content-h: 40px !important;
}

html.has-notch {
    --header-pt: max(48px, calc(env(safe-area-inset-top, 44px) + 6px)) !important;
    --header-pb: 9px !important;
    --header-content-h: 38px !important;
}

/* Landscape Mode: Inset flips to sides, top returns to comfortable minimal */
@media (orientation: landscape) {
    :root, html.has-dynamic-island, html.has-notch {
        --header-pt: max(6px, env(safe-area-inset-top, 6px)) !important;
        --header-pb: 6px !important;
        --header-content-h: 36px !important;
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: #05070B;
    color: #F3F4F6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
    overflow-x: clip;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
    min-height: 100%;
}

/* Force hide all hidden modals and containers */
.hidden {
    display: none !important;
}

/* Mobile App Chassis Frame */
.mobile-app-shell {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--app-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--header-total-h) !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 16px));
}

/* Rock-Solid Fixed App Header Pinned to Top with Full Visibility */
.app-header {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 480px !important;
    height: var(--header-total-h) !important;
    min-height: var(--header-total-h) !important;
    z-index: 55 !important;
    background: #0E131E !important;
    background: linear-gradient(180deg, rgba(16, 22, 34, 0.99) 0%, rgba(10, 13, 21, 0.99) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.05) inset !important;
    padding-top: var(--header-pt) !important;
    padding-bottom: var(--header-pb) !important;
    padding-left: max(8px, env(safe-area-inset-left, 8px)) !important;
    padding-right: max(8px, env(safe-area-inset-right, 8px)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    gap: 4px;
}

/* Header Left & Right Layout Balance */
.header-left {
    min-width: 0;
    flex-shrink: 1;
}

.header-right {
    flex-shrink: 0;
}

.header-audio-dock {
    backdrop-filter: blur(8px);
}

.header-audio-dock button {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;

/* Custom Mini Scrollbars */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Custom Inner Scrollbar for Tables & Lists */
.custom-inner-scrollbar {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.45) rgba(255, 255, 255, 0.03);
}

.custom-inner-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-inner-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.custom-inner-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.45);
    border-radius: 4px;
}

.custom-inner-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.75);
}

/* Live Payouts Mini Marquee */
.mobile-marquee {
    overflow: hidden;
    white-space: nowrap;
    background: #06080E;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    font-size: 11px;
}

.mobile-marquee-content {
    display: inline-flex;
    animation: mobile-marquee-run 26s linear infinite;
}

@keyframes mobile-marquee-run {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================ */
/* FIXED BOTTOM APP NAVIGATION BAR (ERGONOMIC 5-TAB MOBILE DOCK) */
/* ============================================================ */
.bottom-app-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 64px;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(16, 22, 34, 0.95) 0%, rgba(9, 13, 20, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-tab-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #8E9BAE;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.015em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 0 4px;
    text-decoration: none;
}

/* Luminous Top Active Indicator Bar */
.nav-tab-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 32px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.8), 0 0 4px rgba(245, 158, 11, 0.4);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.nav-tab-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Custom Active Top Bar Indicators */
.nav-tab-item#nav-lobby-btn.active::before {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.8), 0 0 4px rgba(245, 158, 11, 0.4);
}

.nav-tab-item#nav-deposit-btn.active::before {
    background: linear-gradient(90deg, #10B981, #34D399);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.8), 0 0 4px rgba(52, 211, 153, 0.4);
}

.nav-tab-item#nav-withdraw-btn.active::before {
    background: linear-gradient(90deg, #06B6D4, #38BDF8);
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.8), 0 0 4px rgba(56, 189, 248, 0.4);
}

.nav-tab-item#nav-history-btn.active::before {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.8), 0 0 4px rgba(167, 139, 250, 0.4);
}

.nav-tab-item#nav-promo-btn.active::before {
    background: linear-gradient(90deg, #EF4444, #F59E0B);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.8), 0 0 4px rgba(245, 158, 11, 0.4);
}

/* Icon Container Box */
.nav-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
}

.nav-svg-icon {
    width: 21px;
    height: 21px;
    stroke: #8E9BAE;
    stroke-width: 1.85;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease, filter 0.2s ease;
}

.nav-tab-item .nav-label {
    line-height: 1.1;
    transition: color 0.18s ease;
}

/* Active Highlight States */
.nav-tab-item.active {
    color: #FBBF24;
}

.nav-tab-item.active .nav-svg-icon {
    stroke: #FBBF24;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.45));
}

.nav-tab-item#nav-deposit-btn.active {
    color: #34D399;
}

.nav-tab-item#nav-deposit-btn.active .nav-svg-icon {
    stroke: #10B981;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.5));
}

.nav-tab-item#nav-withdraw-btn.active {
    color: #38BDF8;
}

.nav-tab-item#nav-withdraw-btn.active .nav-svg-icon {
    stroke: #06B6D4;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.5));
}

.nav-tab-item#nav-history-btn.active {
    color: #A78BFA;
}

.nav-tab-item#nav-history-btn.active .nav-svg-icon {
    stroke: #8B5CF6;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.5));
}

.nav-tab-item#nav-promo-btn.active {
    color: #FBBF24;
}

.nav-tab-item#nav-promo-btn.active .nav-svg-icon {
    stroke: #F59E0B;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
}

/* Tactile Tap Down */
.nav-tab-item:active {
    transform: scale(0.92);
}

/* Micro Badges */
.nav-micro-badge {
    position: absolute;
    top: -4px;
    right: -11px;
    font-size: 7.5px;
    font-weight: 900;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 9999px;
    background: #EF4444;
    color: white;
    letter-spacing: 0.02em;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.nav-micro-badge.promo-badge {
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.nav-micro-badge.aviator-badge {
    border-radius: 9999px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #DC2626, #F59E0B);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.85);
    pointer-events: none;
    letter-spacing: 0.04em;
    animation: aviator-badge-pulse 2s infinite ease-in-out;
}

@keyframes aviator-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(220, 38, 38, 0.85);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.95);
    }
}

/* Cashier / Wallet Switcher Header Tabs */
.cashier-nav-tab {
    transition: all 0.18s ease;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.cashier-nav-tab:active {
    transform: scale(0.95);
}

/* Dynamic Header Profit & Pulse Animations */
#header-balance-pill {
    transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#header-balance-pill.glow-profit {
    border-color: #10B981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6), inset 0 0 8px rgba(16, 185, 129, 0.3) !important;
    transform: scale(1.06);
}

#header-balance-pill.glow-loss {
    border-color: #EF4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
}

#header-balance-delta.animate-float {
    animation: delta-float-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes delta-float-up {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.85);
    }
    20% {
        opacity: 1;
        transform: translateY(-2px) scale(1.05);
    }
    80% {
        opacity: 1;
        transform: translateY(-8px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-16px) scale(0.9);
    }
}

/* Quick Story / Action Avatar Carousel */
.stories-carousel {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 12px;
    padding: 8px 14px;
    -webkit-overflow-scrolling: touch;
}
.stories-carousel::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.story-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #F59E0B, #10B981);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease;
}

.story-ring:active {
    transform: scale(0.92);
}

.story-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #111622;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.story-label {
    font-size: 10px;
    font-weight: 700;
    color: #CBD5E1;
    margin-top: 4px;
    text-align: center;
    max-width: 60px;
    line-height: 1.1;
}

/* =================================================== */
/* HIGHLY INTERACTIVE GAME CARDS (HERO OF FIRST PAGE) */
/* =================================================== */
.game-hero-card {
    background: linear-gradient(145deg, #131926 0%, #0F1420 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-hero-card:active {
    transform: scale(0.985);
}

.game-hero-card.whot-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.3) 0%, transparent 60%),
                linear-gradient(145deg, #0D211A 0%, #071410 100%);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.18), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.ludo-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(99, 102, 241, 0.35) 0%, transparent 60%),
                linear-gradient(145deg, #13172E 0%, #090C1A 100%);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.aviator-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(239, 68, 68, 0.35) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
                linear-gradient(145deg, #1F0D15 0%, #11070C 100%);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.fruity-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(236, 72, 153, 0.35) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
                linear-gradient(145deg, #240E1B 0%, #14070F 100%);
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.chess-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.35) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
                linear-gradient(145deg, #0B192A 0%, #07101C 100%);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.slots-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.4) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(239, 68, 68, 0.2) 0%, transparent 60%),
                linear-gradient(145deg, #261608 0%, #150C04 100%);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.fruit-slash-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.4) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(234, 179, 8, 0.15) 0%, transparent 60%),
                linear-gradient(145deg, #281406 0%, #150A03 100%);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.22), 0 10px 25px rgba(0, 0, 0, 0.6);
}

.game-hero-card.spin2win-card-theme {
    background: radial-gradient(circle at 90% 10%, rgba(220, 38, 38, 0.45) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.25) 0%, transparent 60%),
                linear-gradient(145deg, #2A0D10 0%, #150608 100%);
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.28), 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Category Filter Tabs */
.lobby-cat-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94A3B8;
    user-select: none;
    -webkit-user-select: none;
}

.lobby-cat-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.lobby-cat-tab.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-color: #F59E0B;
    color: #0F172A;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

/* =================================================== */
/* 2 PER ROW GAMES GRID & PURE GAME SHOWCASE TILES     */
/* =================================================== */
.games-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.games-grid-2col .game-hero-card {
    padding: 12px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 248px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.games-grid-2col .game-hero-card:active {
    transform: scale(0.97);
}

/* Dedicated Game Visual Showcase Stage */
.game-visual-artwork {
    height: 90px;
    border-radius: 14px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.game-visual-artwork.aviator-artwork {
    background: radial-gradient(circle at 75% 25%, rgba(239, 68, 68, 0.35) 0%, transparent 65%), #0A0D16;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.game-visual-artwork.whot-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.25) 0%, transparent 70%), #0A1612;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.game-visual-artwork.ludo-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 70%), #0D0E1F;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.game-visual-artwork.fruity-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.3) 0%, transparent 70%), #1B0C18;
    border: 1px solid rgba(236, 72, 153, 0.35);
}

.game-visual-artwork.chess-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.3) 0%, transparent 70%), #0A1324;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.game-visual-artwork.slots-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.35) 0%, transparent 70%), #1F1407;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.game-visual-artwork.fruit-slash-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.35) 0%, transparent 70%), #1E0F05;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.game-visual-artwork.spin2win-artwork {
    background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.45) 0%, transparent 70%), #1C090D;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.games-grid-2col .mini-card-fan {
    padding: 0;
    min-height: auto;
}

.games-grid-2col .mini-card-fan .fan-card {
    width: 38px;
    height: 56px;
    border-radius: 6px;
    padding: 2px 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.games-grid-2col .mini-card-fan .fan-card.c1 {
    margin-right: -13px;
}

.games-grid-2col .mini-card-fan .fan-card.c3 {
    margin-left: -13px;
}

.games-grid-2col .mini-ludo-interactive {
    gap: 10px;
    padding: 0;
    min-height: auto;
}

.games-grid-2col .interactive-dice-preview {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    padding: 4px;
    background: linear-gradient(145deg, #FFFFFF 0%, #F1F5F9 100%);
    border: 2px solid #E2E8F0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(99, 102, 241, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.95);
    transform: rotate(-5deg);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.games-grid-2col .interactive-dice-preview:hover {
    transform: rotate(0deg) scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(99, 102, 241, 0.6);
}

.game-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8.5px;
    font-weight: 700;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.2;
}

.aviator-history-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.aviator-history-scroll::-webkit-scrollbar {
    display: none;
}

.radar-preview-box {
    height: 70px;
    background: radial-gradient(circle at 85% 25%, rgba(239, 68, 68, 0.3) 0%, transparent 65%), #0A0E18;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

/* Interactive Mini Fanned Whot Cards */
.mini-card-fan {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 500px;
    padding: 10px 0;
}

.fan-card {
    width: 48px;
    height: 72px;
    background: #FFFFFF;
    border-radius: 7px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3px 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.fan-card.c1 {
    transform: rotate(-14deg) translateY(4px);
    margin-right: -14px;
    z-index: 1;
}
.fan-card.c2 {
    transform: translateY(-4px) scale(1.08);
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), 0 0 12px rgba(245, 158, 11, 0.5);
}
.fan-card.c3 {
    transform: rotate(14deg) translateY(4px);
    margin-left: -14px;
    z-index: 1;
}

.fan-card:hover, .fan-card:active {
    transform: translateY(-16px) scale(1.18) !important;
    z-index: 10;
}

/* Interactive Mini Ludo Rolling Dice & Tokens */
.mini-ludo-interactive {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 0;
}

.interactive-dice-preview {
    width: 52px;
    height: 52px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), inset 0 0 5px rgba(0,0,0,0.15);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 5px;
    cursor: pointer;
    border: 2px solid #E2E8F0;
    transition: transform 0.15s ease;
}

.interactive-dice-preview:active, .interactive-dice-preview.rolling {
    animation: dice-shake 0.35s ease infinite;
}

/* Stake Selection Chips */
.stake-chip {
    padding: 7px 4px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
}

.stake-chip.active, .stake-chip:active {
    background: #F59E0B;
    color: #0A0D14;
    border-color: #F59E0B;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Next-Gen Mobile Bottom Sheet Drawer Modal (Ultra-Modern UI/UX) */
.bottom-sheet-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 70;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 1;
    pointer-events: auto;
    animation: sheetBackdropFadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bottom-sheet-modal.hidden {
    display: none !important;
    pointer-events: none !important;
}

.bottom-sheet-content {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, #182233 0%, #101623 35%, #0B0E17 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 16px));
    box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.92), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
    max-height: 90vh;
    max-height: calc(90dvh - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    touch-action: pan-y;
    animation: sheetSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.bottom-sheet-modal.closing {
    animation: sheetBackdropFadeOut 0.22s ease-in forwards !important;
    pointer-events: none !important;
}

.bottom-sheet-modal.closing .bottom-sheet-content {
    animation: sheetSlideDown 0.22s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

@keyframes sheetBackdropFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes sheetBackdropFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes sheetSlideUp {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes sheetSlideDown {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100%);
    }
}

/* Tactile Interactive Drag Pill Handle */
.drag-handle {
    width: 44px;
    height: 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.28);
    margin: 0 auto 12px;
    cursor: grab;
    touch-action: none;
    transition: background 0.15s ease, transform 0.15s ease, width 0.15s ease;
}

.drag-handle:active, .drag-handle.dragging {
    background: #F59E0B;
    transform: scaleY(1.3);
    width: 52px;
    cursor: grabbing;
}

/* Whot Mobile Felt Table */
.mobile-felt {
    background: radial-gradient(circle at center, #065F46 0%, #064E3B 65%, #022c22 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.85);
    border: 4px solid #78350F;
    border-radius: 20px;
}

/* Mobile Whot Cards */
.whot-card {
    width: 64px;
    height: 96px;
    background: #FFFFFF;
    color: #1F2937;
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whot-card:active {
    transform: translateY(-10px) scale(1.05);
}

.whot-card.playable {
    box-shadow: 0 0 0 3px #F59E0B, 0 0 16px rgba(245, 158, 11, 0.9);
    animation: mobile-card-pulse 1.3s infinite alternate;
}

@keyframes mobile-card-pulse {
    0% { box-shadow: 0 0 0 2px #F59E0B, 0 0 6px rgba(245, 158, 11, 0.5); }
    100% { box-shadow: 0 0 0 3.5px #F59E0B, 0 0 18px rgba(245, 158, 11, 0.95); }
}

.whot-card-back {
    width: 58px;
    height: 86px;
    background: linear-gradient(135deg, #1E3A8A 0%, #1E1B4B 100%);
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.whot-card-back::before {
    content: "WHOT";
    font-weight: 900;
    font-size: 11px;
    color: #F59E0B;
    letter-spacing: 1.5px;
    transform: rotate(-35deg);
    opacity: 0.7;
}

/* Card Shape Colors */
.shape-circle { color: #DC2626; fill: #DC2626; }
.shape-triangle { color: #0284C7; fill: #0284C7; }
.shape-cross { color: #7C3AED; fill: #7C3AED; }
.shape-square { color: #059669; fill: #059669; }
.shape-star { color: #D97706; fill: #D97706; }
.shape-whot { color: #B45309; fill: #F59E0B; }

/* Hand Horizontal Swipe Tray */
.mobile-hand-scroll {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px 6px;
    -webkit-overflow-scrolling: touch;
}
.mobile-hand-scroll::-webkit-scrollbar {
    display: none;
}

/* 3D Rolling Dice */
.dice-cube {
    width: 62px;
    height: 62px;
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 0 6px rgba(0,0,0,0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 7px;
    border: 2px solid #CBD5E1;
    transition: transform 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.dice-cube.rolling {
    animation: dice-shake 0.35s ease infinite;
}

@keyframes dice-shake {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    50% { transform: rotate(12deg) scale(1.05); }
    75% { transform: rotate(-10deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

.dice-dot {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 35% 35%, #EF4444 0%, #B91C1C 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 3px rgba(239, 68, 68, 0.4);
    border-radius: 50%;
    margin: auto;
}

/* Mobile Ludo Board */
.mobile-ludo-wrapper {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    background: #FFFFFF;
    border: 4px solid #1E293B;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    margin: 0 auto;
}

.ludo-token {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
    cursor: pointer;
    transition: all 0.2s ease;
}

.ludo-token.selectable {
    filter: drop-shadow(0 0 10px #F59E0B);
    transform-box: fill-box;
    transform-origin: center;
    animation: token-bounce 0.6s infinite alternate ease-in-out;
}

@keyframes token-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-7px); }
}

.touch-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease-out, filter 0.1s ease-out, opacity 0.1s ease-out;
}

/* Universal ultra-responsive button tactile feedback & zero mobile delay */
button, [role="button"], .touch-btn, .leave-match-btn, .shape-option-btn, .quick-emote-btn, .stake-chip, .game-tab-btn, .nav-tab-item, .whot-card {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

button:active:not(:disabled), .touch-btn:active:not(:disabled), .leave-match-btn:active, .shape-option-btn:active, .quick-emote-btn:active {
    transform: scale(0.96);
    filter: brightness(1.08);
}

/* =================================================== */
/* FRUITY HUNT 5x5 MINEFIELD INSTANT CASH GAME STYLES  */
/* =================================================== */
.fh-crates-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.fh-crate-tile {
    aspect-ratio: 1 / 1;
    perspective: 800px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    touch-action: manipulation;
}

.fh-crate-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 14px;
}

.fh-crate-tile.revealed .fh-crate-inner {
    transform: rotateY(180deg);
}

.fh-crate-tile.uncovering .fh-crate-inner {
    transform: scale(0.9);
}

.fh-crate-tile.fh-tile-bounce .fh-crate-inner {
    animation: fh-crate-bounce 0.3s ease;
}

@keyframes fh-crate-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(0.9) translateY(2px); }
    100% { transform: scale(1); }
}

.fh-crate-front, .fh-crate-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Unopened Wooden/Metallic Mystery Crate */
.fh-crate-front {
    background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fh-crate-tile:hover .fh-crate-front {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.fh-crate-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fh-crate-tile:hover .fh-crate-icon {
    transform: scale(1.15) rotate(4deg);
}

/* Back Faces for Revealed Tile */
.fh-crate-back {
    transform: rotateY(180deg);
}

/* Safe Fruit Revealed */
.fh-crate-tile.safe-fruit .fh-crate-back {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(6, 78, 59, 0.95) 100%);
    border: 2px solid #10B981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}

/* Rotten Trap Hit */
.fh-crate-tile.trap-fruit .fh-crate-back {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.45) 0%, rgba(127, 29, 29, 0.95) 100%);
    border: 2px solid #EF4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.fh-crate-tile.busted-tile {
    animation: fh-busted-shake 0.45s ease-in-out;
}

@keyframes fh-busted-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px) rotate(-3deg); }
    40% { transform: translateX(6px) rotate(3deg); }
    60% { transform: translateX(-4px) rotate(-2deg); }
    80% { transform: translateX(4px) rotate(2deg); }
}

.fh-fruit-emoji {
    font-size: 24px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    animation: fh-fruit-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fh-fruit-pop {
    0% { transform: scale(0.4) rotate(-20deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.fh-fruit-name {
    font-size: 7.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: #A7F3D0;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

.fh-crate-tile.dimmed-reveal {
    opacity: 0.4;
}

.fh-floating-win {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 900;
    color: #F59E0B;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #F59E0B;
    padding: 1px 7px;
    border-radius: 9999px;
    pointer-events: none;
    z-index: 25;
    animation: fh-float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

@keyframes fh-float-up {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.7); }
    30% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -24px) scale(0.9); }
}

/* Active Trap Selector Button */
.fh-trap-btn.active {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%) !important;
    color: #FFFFFF !important;
    border-color: #EF4444 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
    font-weight: 900 !important;
}

.fh-preset-btn.active {
    background: #F59E0B !important;
    color: #0F172A !important;
    border-color: #F59E0B !important;
    font-weight: 900 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

#fh-live-teaser {
    background: linear-gradient(135deg, rgba(18, 24, 38, 0.95) 0%, rgba(10, 14, 22, 0.95) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

#fh-live-teaser b {
    color: #F59E0B;
}

/* ============================================================ */
/* ANIMATED BRAND LOGO & APP SPLASH LOADER                      */
/* ============================================================ */
.loader-logo-ring {
    animation: loader-spin-glow 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loader-spin-glow {
    0% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4)); }
    50% { transform: rotate(180deg) scale(1.06); filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.8)); }
    100% { transform: rotate(360deg) scale(1); filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4)); }
}

.loader-logo-pulse {
    animation: loader-pulse-breath 1.8s ease-in-out infinite;
}

@keyframes loader-pulse-breath {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3)); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.7)); }
}


/* ============================================================ */
/* MASTER CHESSBOARD ARENA & INTERACTIVE TILES                  */
/* ============================================================ */
.chess-arena-wrapper {
    width: 100%;
    max-width: min(100%, 390px, calc(100dvh - 300px));
    margin: 0 auto;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.chess-board-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0B0E17;
    border: 2.5px solid #2A364F;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.15);
    position: relative;
    touch-action: none;
}

.chess-board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
    touch-action: none;
}

.chess-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    touch-action: none;
}

.chess-square.light {
    background-color: #E2D6B5;
}

.chess-square.dark {
    background-color: #A67C43;
}

.chess-square.selected-square-highlight {
    background-color: rgba(245, 158, 11, 0.8) !important;
}

.chess-square.last-move-highlight {
    background-color: rgba(234, 179, 8, 0.42) !important;
}

.chess-square.in-check-highlight {
    background: radial-gradient(circle, #EF4444 0%, rgba(239, 68, 68, 0.45) 60%, transparent 80%) !important;
}

.chess-square.drag-target-hover {
    background-color: rgba(16, 185, 129, 0.65) !important;
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.9);
}

.chess-piece-wrapper {
    width: 88%;
    height: 88%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.1s ease;
}

.chess-piece-wrapper.piece-dragging-hidden {
    opacity: 0.25;
}

/* Floating Ghost Piece for Touch & Mouse Drag */
.chess-dragging-piece {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) scale(1.18);
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.75));
    will-change: left, top;
}

.chess-move-dot {
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.85);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
    position: absolute;
    pointer-events: none;
    z-index: 3;
    animation: chess-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes chess-dot-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.18); opacity: 1; }
}

.chess-capture-ring {
    position: absolute;
    inset: 6%;
    border: 3px solid rgba(239, 68, 68, 0.9);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6) inset;
    pointer-events: none;
    z-index: 3;
    animation: chess-ring-pulse 1.2s ease-in-out infinite;
}

@keyframes chess-ring-pulse {
    0%, 100% { transform: scale(0.96); opacity: 0.85; }
    50% { transform: scale(1.02); opacity: 1; }
}

.chess-coord-file {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 8.5px;
    font-weight: 900;
    font-family: monospace;
    line-height: 1;
    pointer-events: none;
    opacity: 0.85;
    z-index: 5;
}

.chess-square.light .chess-coord-file,
.chess-square.light .chess-coord-rank {
    color: #8C6430;
}

.chess-square.dark .chess-coord-file,
.chess-square.dark .chess-coord-rank {
    color: #F3EBD8;
}

.chess-coord-rank {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 8.5px;
    font-weight: 900;
    font-family: monospace;
    line-height: 1;
    pointer-events: none;
    opacity: 0.85;
    z-index: 5;
}

/* ============================================================ */
/* 777 VEGAS SLOTS CABINET, REELS & MECHANICAL LEVER            */
/* ============================================================ */
.slots-cabinet-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding-right: 28px; /* Dedicated clearance for mechanical lever on mobile */
    padding-left: 8px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.slots-marquee-header {
    background: linear-gradient(180deg, #3A101C 0%, #1A070D 100%);
    border: 2px solid #F59E0B;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 10px 14px;
    position: relative;
    overflow: hidden;
}

.slots-marquee-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: slots-marquee-shimmer 3s infinite;
}

@keyframes slots-marquee-shimmer {
    0% { left: -100%; }
    50%, 100% { left: 160%; }
}

.slots-chassis {
    background: linear-gradient(180deg, #180B12 0%, #0D0509 100%);
    border-left: 3px solid #F59E0B;
    border-right: 3px solid #F59E0B;
    border-bottom: 3px solid #F59E0B;
    border-radius: 0 0 20px 20px;
    padding: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), inset 0 2px 10px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* 3x3 Glass Window with Payline Rulers (22px 1fr 1fr 1fr 22px) */
.slots-reels-window {
    background: #060204;
    border: 2px solid #331521;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 20px 1fr 1fr 1fr 20px;
    gap: 4px;
    padding: 6px 4px;
    box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.9), 0 0 15px rgba(239, 68, 68, 0.15);
    position: relative;
    overflow: hidden;
}

/* Payline ruler indicators */
.slots-payline-ruler {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    z-index: 10;
    padding: 2px 0;
}

.payline-tag {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #14090F;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #6B7280;
    font-size: 8.5px;
    font-weight: 900;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.18, 0.9, 0.32, 1.25);
}

.payline-tag.active-winner {
    background: #F59E0B !important;
    color: #0F172A !important;
    border-color: #FEF08A !important;
    box-shadow: 0 0 8px #F59E0B, 0 0 16px rgba(245, 158, 11, 0.9) !important;
    transform: scale(1.22);
    animation: payline-tag-bounce 0.6s ease-in-out infinite alternate;
}

@keyframes payline-tag-bounce {
    0% { transform: scale(1.12); }
    100% { transform: scale(1.28); }
}

/* Dynamic SVG Paylines Laser Overlay */
.slots-paylines-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.payline-laser {
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px currentColor);
    stroke-dasharray: 8 4;
    animation: laser-dash 0.8s linear infinite;
}

@keyframes laser-dash {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -24; }
}

/* Individual Reel Column */
.slots-reel-column {
    background: linear-gradient(180deg, #150A10 0%, #1F0E17 50%, #150A10 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    height: 216px;
    position: relative;
    box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.8), inset 0 -8px 14px rgba(0, 0, 0, 0.8);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Suspense Tension Spin (Reel 2 Near-Jackpot) */
.slots-reel-column.reel-tension {
    border-color: #F59E0B !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8) inset, 0 0 16px rgba(245, 158, 11, 0.8) !important;
    animation: reel-tension-pulse 0.35s ease-in-out infinite alternate;
}

@keyframes reel-tension-pulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.3); }
}

/* Reel Strip with 3 Visible Rows */
.slots-reel-strip {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    will-change: transform;
}

.slots-reel-strip.reel-spinning {
    animation: reel-spinning-loop 0.16s linear infinite;
    filter: blur(2.2px);
}

@keyframes reel-spinning-loop {
    0% { transform: translateY(0); }
    50% { transform: translateY(-16%); }
    100% { transform: translateY(0); }
}

.slots-reel-strip.reel-settled {
    animation: reel-mechanical-snap 0.38s cubic-bezier(0.18, 0.9, 0.32, 1.25);
}

@keyframes reel-mechanical-snap {
    0% { transform: translateY(-28px); }
    65% { transform: translateY(7px); }
    100% { transform: translateY(0); }
}

.slot-cell {
    flex: 1;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    position: relative;
    transition: all 0.25s ease;
}

.slot-cell:last-child {
    border-bottom: none;
}

.slot-cell.slot-cell-winner {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.38) 0%, transparent 80%);
    border-color: #F59E0B !important;
    animation: slot-cell-win-pulse 0.75s ease-in-out infinite alternate;
}

@keyframes slot-cell-win-pulse {
    0% { transform: scale(0.96); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)); }
    100% { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(245, 158, 11, 1)); }
}

/* Mechanical Physical Lever */
.slots-lever-arm {
    position: absolute;
    right: 2px;
    top: 40px;
    width: 24px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    z-index: 15;
    touch-action: none;
}

.slots-lever-arm:active {
    cursor: grabbing;
}

.slots-lever-base {
    width: 14px;
    height: 22px;
    background: linear-gradient(90deg, #71717A, #3F3F46);
    border-radius: 4px;
    border: 1px solid #A1A1AA;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.slots-lever-rod {
    width: 6px;
    height: 55px;
    background: linear-gradient(90deg, #FFFFFF, #CBD5E1, #64748B);
    border-radius: 3px;
    transform-origin: bottom center;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
}

.slots-lever-knob {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #EF4444 0%, #B91C1C 60%, #7F1D1D 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.9), inset 0 2px 5px rgba(255, 255, 255, 0.6);
    margin-top: -8px;
    transition: transform 0.22s ease;
}

.slots-lever-arm.lever-pulled .slots-lever-rod {
    transform: rotate(40deg) scaleY(0.72);
}

.slots-lever-arm.lever-pulled .slots-lever-knob {
    transform: translateY(28px) scale(0.88);
}

/* ============================================================ */
/* MOBILE RESPONSIVE MEDIA QUERIES & PLATFORM ADAPTATIONS       */
/* ============================================================ */

/* Global Mobile Form Controls: Prevent iOS Safari Auto-Zoom */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 1. Mobile Shell Adaptations (<= 480px) */
@media screen and (max-width: 480px) {
    .mobile-app-shell {
        border-left: none;
        border-right: none;
        box-shadow: none;
        max-width: 100%;
        min-height: 100dvh;
    }

    .bottom-app-nav {
        max-width: 100%;
        border-left: none;
        border-right: none;
    }

    .bottom-sheet-content {
        max-width: 100%;
    }
}

/* 2. Compact Mobile Devices (<= 380px, e.g. iPhone 12/13 mini, Tecno, Infinix, etc.) */
@media screen and (max-width: 380px) {
    :root {
        --header-pt: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
        --header-pb: 8px;
        --header-content-h: 38px;
    }

    /* Header layout tightening */
    .app-header {
        padding-left: 6px !important;
        padding-right: 6px !important;
        gap: 3px !important;
    }

    #header-username {
        max-width: 52px !important;
        font-size: 10.5px !important;
    }

    #header-vip-tag {
        font-size: 7px !important;
        max-width: 55px !important;
    }

    #header-balance {
        font-size: 10.5px !important;
    }

    #header-balance-pill {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .header-btn-text {
        font-size: 10px !important;
    }

    .header-audio-dock button {
        width: 22px !important;
        height: 22px !important;
        font-size: 10px !important;
    }

    /* 2-Column Games Grid on Compact Viewports */
    .games-grid-2col {
        gap: 8px;
    }

    .games-grid-2col .game-hero-card {
        padding: 10px 8px;
        border-radius: 16px;
        min-height: 236px;
    }

    .games-grid-2col .game-visual-artwork {
        height: 78px;
        margin: 6px 0;
    }

    .game-feature-pill {
        font-size: 7px;
        padding: 1px 4px;
    }

    /* Fruity Hunt Crate Grid */
    .fh-crates-grid {
        gap: 5px;
        max-width: 300px;
    }

    .fh-crate-inner {
        border-radius: 10px;
    }

    .fh-crate-icon,
    .fh-fruit-emoji {
        font-size: 20px;
    }

    .fh-fruit-name {
        font-size: 6.5px;
    }

    /* Aviator Flight Arena */
    #aviator-canvas-container {
        height: 185px;
    }

    /* Whot Casino Felt */
    .mobile-felt {
        min-height: 175px;
        padding: 8px;
    }

    .whot-card {
        width: 58px;
        height: 86px;
    }

    /* Ludo Dice & Roller */
    .dice-cube {
        width: 44px;
        height: 44px;
    }
}

/* 3. Ultra-Compact Mobile Screens (<= 340px, e.g. iPhone SE 1st Gen, Galaxy Z Fold Cover) */
@media screen and (max-width: 340px) {
    :root {
        --header-pt: max(8px, calc(env(safe-area-inset-top, 0px) + 4px));
        --header-pb: 6px;
        --header-content-h: 36px;
    }

    .app-header {
        padding-left: 4px !important;
        padding-right: 4px !important;
        gap: 2px !important;
    }

    #header-username {
        max-width: 40px !important;
        font-size: 10px !important;
    }

    #header-vip-tag {
        display: none !important;
    }

    #header-balance {
        font-size: 9.5px !important;
    }

    #header-balance-pill {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    #open-deposit-modal,
    #header-reset-demo-btn,
    #header-login-btn,
    #header-register-btn {
        padding: 3px 5px !important;
        font-size: 9.5px !important;
    }

    .header-audio-dock button {
        width: 20px !important;
        height: 20px !important;
        font-size: 9px !important;
    }

    /* Games Grid ultra compact */
    .games-grid-2col {
        gap: 6px;
    }

    .games-grid-2col .game-hero-card {
        padding: 8px 6px;
        min-height: 220px;
    }

    .games-grid-2col .game-visual-artwork {
        height: 70px;
    }

    .games-grid-2col .mini-card-fan .fan-card {
        width: 32px;
        height: 48px;
    }

    .games-grid-2col .mini-card-fan .fan-card.c1 {
        margin-right: -10px;
    }

    .games-grid-2col .mini-card-fan .fan-card.c3 {
        margin-left: -10px;
    }

    /* Fruity Hunt ultra compact */
    .fh-crates-grid {
        gap: 4px;
        max-width: 270px;
    }

    .fh-crate-inner {
        border-radius: 8px;
    }

    .fh-crate-icon,
    .fh-fruit-emoji {
        font-size: 18px;
    }

    /* Aviator Stepper & Chips */
    .bet1-chip, .bet2-chip {
        font-size: 8px;
        padding: 2px 1px;
    }

    /* Bottom Dock Labels */
    .nav-tab-item .nav-label {
        font-size: 9px;
    }
}

/* 4. Landscape / Foldable Orientation Support */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .mobile-app-shell {
        padding-bottom: 56px;
    }

    .bottom-app-nav {
        height: 50px;
    }

    .bottom-sheet-content {
        max-height: 92vh;
    }
}
