:root {
            /* Palette: #1A334A #1E536E #18A3B7 #27E6EC #5AA5CD #6F71A1 */
            --bg-void: #122738;
            --bg-deep: #1A334A;
            --bg-panel: #1E536E;
            --bg-soft: #5AA5CD;
            --bg-lavender: #6F71A1;
            --neon: #27E6EC;
            --teal: #18A3B7;
            --bg-surface-grad: linear-gradient(155deg, #1E536E 0%, #1A334A 48%, #122738 100%);
            --panel-bg: rgba(26, 51, 74, 0.88);
            --panel-bg-alt: rgba(18, 39, 56, 0.94);
            --panel-card: rgba(30, 83, 110, 0.42);

            --accent-purple: #6F71A1;
            --accent-purple-glow: rgba(111, 113, 161, 0.4);
            --accent-cyan: #27E6EC;
            --accent-cyan-glow: rgba(39, 230, 236, 0.35);
            --accent-gold: #27E6EC;
            --accent-gold-glow: rgba(39, 230, 236, 0.3);
            --profit-green: #27E6EC;
            --profit-green-glow: rgba(39, 230, 236, 0.28);
            --danger-red: #ff6b8a;
            --danger-red-glow: rgba(255, 107, 138, 0.3);

            --border-main: 1px solid rgba(90, 165, 205, 0.28);
            --border-subtle: 1px solid rgba(30, 83, 110, 0.65);
            --border-active: 1px solid rgba(39, 230, 236, 0.75);
            --border-gold: 1px solid rgba(39, 230, 236, 0.55);

            --font-serif: 'Orbitron', 'Rajdhani', sans-serif;
            --font-sans: 'Rajdhani', 'Segoe UI', sans-serif;
            --font-mono: 'JetBrains Mono', 'Consolas', monospace;

            --shadow-glass: 0 8px 28px rgba(10, 24, 36, 0.55);
            --glow-card: 0 0 24px rgba(39, 230, 236, 0.12);
            --text-muted: #8eb8d4;
            --text-soft: #c5dff0;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            user-select: none;
            -webkit-user-select: none;
        }

        input, textarea {
            user-select: text;
            -webkit-user-select: text;
        }

        body {
            background-color: var(--bg-void);
            background-image: var(--bg-image, none);
            color: var(--text-soft, #eaf6fb);
            font-family: var(--font-sans);
            font-size: 15px;
            font-weight: 500;
            height: 100vh;
            width: 100vw;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
        }

        .terminal-grid-overlay {
            pointer-events: none;
            position: fixed;
            inset: 0;
            z-index: 0;
            opacity: 0.18;
            background-image:
                linear-gradient(rgba(39, 230, 236, 0.08) 1px, transparent 1px),
                linear-gradient(90deg, rgba(39, 230, 236, 0.08) 1px, transparent 1px);
            background-size: 48px 48px;
            mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
            display: block;
        }

        /* ------------------ TOP NAVIGATION & TICKER ------------------ */
        header.terminal-header {
            height: 70px;
            background: rgba(18, 39, 56, 0.82);
            backdrop-filter: blur(16px) saturate(1.2);
            border-bottom: 1px solid rgba(39, 230, 236, 0.18);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            z-index: 100;
            flex-shrink: 0;
            box-shadow: 0 8px 32px rgba(8, 20, 32, 0.45), inset 0 -1px 0 rgba(39, 230, 236, 0.08);
        }

        .header-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
        }

        .brand-logo {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #27E6EC 0%, #18A3B7 55%, #6F71A1 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            box-shadow: 0 0 18px rgba(39, 230, 236, 0.45);
            border: 1px solid rgba(39, 230, 236, 0.55);
        }

        .brand-text h1 {
            font-family: var(--font-serif);
            font-size: 17px;
            font-weight: 800;
            letter-spacing: 2.5px;
            background: linear-gradient(90deg, #ffffff 0%, #27E6EC 50%, #5AA5CD 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            text-transform: uppercase;
        }

        .brand-text p {
            font-family: var(--font-mono);
            font-size: 10px;
            color: var(--bg-soft);
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

        /* Header Central Navigation Tabs */
        .header-nav {
            display: flex;
            align-items: center;
            gap: 4px;
            background: rgba(26, 51, 74, 0.72);
            padding: 4px 8px;
            border-radius: 30px;
            border: 1px solid rgba(39, 230, 236, 0.16);
            box-shadow: inset 0 0 20px rgba(39, 230, 236, 0.04);
        }

        .nav-tab-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 8px 16px;
            border-radius: 20px;
            font-family: var(--font-sans);
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.6px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .nav-tab-btn:hover {
            color: #ffffff;
            background: rgba(39, 230, 236, 0.1);
        }

        .nav-tab-btn.active {
            color: #0a1a24;
            background: linear-gradient(90deg, #27E6EC, #18A3B7);
            font-weight: 700;
            box-shadow: 0 0 16px rgba(39, 230, 236, 0.45);
        }

        /* Header Right Meta Stats */
        .header-meta {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .jackpot-pill {
            background: linear-gradient(90deg, rgba(39, 230, 236, 0.14), rgba(111, 113, 161, 0.2));
            border: 1px solid rgba(39, 230, 236, 0.4);
            padding: 4px 12px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: var(--font-mono);
            font-size: 12px;
            box-shadow: 0 0 14px rgba(39, 230, 236, 0.2);
            animation: pulseGold 3s infinite alternate;
        }

        @keyframes pulseGold {
            0% {
                border-color: rgba(39, 230, 236, 0.28);
            }

            100% {
                border-color: rgba(39, 230, 236, 0.85);
                box-shadow: 0 0 18px rgba(39, 230, 236, 0.45);
            }
        }

        .jackpot-pill span.label {
            color: var(--accent-gold);
            font-weight: 800;
            font-size: 10px;
            letter-spacing: 1px;
        }

        .jackpot-pill span.val {
            color: #ffffff;
            font-weight: 700;
        }

        .header-icon-btn {
            background: rgba(26, 51, 74, 0.85);
            border: 1px solid rgba(90, 165, 205, 0.25);
            color: #c5dff0;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
        }

        .header-icon-btn:hover {
            border-color: var(--accent-cyan);
            color: #fff;
            box-shadow: 0 0 14px var(--accent-cyan-glow);
            background: rgba(30, 83, 110, 0.9);
        }

        /* ------------------ MAIN LAYOUT & SIDEBAR ------------------ */
        .terminal-container {
            display: flex;
            flex: 1;
            overflow: hidden;
            position: relative;
            z-index: 1;
        }

        /* Camper Management Sidebar */
        aside.camper-sidebar {
            width: 290px;
            background: rgba(18, 39, 56, 0.78);
            backdrop-filter: blur(14px);
            border-right: 1px solid rgba(39, 230, 236, 0.14);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
            z-index: 50;
            transition: transform 0.3s ease;
        }

        .sidebar-header {
            padding: 14px 16px;
            border-bottom: var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sidebar-title {
            font-family: var(--font-serif);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 1.5px;
            color: var(--bg-soft);
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .add-camper-btn {
            background: linear-gradient(135deg, #27E6EC 0%, #18A3B7 100%);
            border: none;
            color: #0a1a24;
            padding: 5px 12px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
            box-shadow: 0 0 12px rgba(39, 230, 236, 0.25);
        }

        .add-camper-btn:hover {
            box-shadow: 0 0 18px rgba(39, 230, 236, 0.5);
            transform: translateY(-1px);
        }

        .camper-search-box {
            padding: 10px 14px;
            border-bottom: var(--border-subtle);
        }

        .camper-search-box input {
            width: 100%;
            background: rgba(18, 39, 56, 0.9);
            border: var(--border-subtle);
            border-radius: 8px;
            padding: 8px 12px;
            color: #fff;
            font-family: var(--font-mono);
            font-size: 11px;
            outline: none;
        }

        .camper-search-box input:focus {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 8px var(--accent-cyan-glow);
        }

        /* Camper List in Sidebar */
        .campers-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .campers-list::-webkit-scrollbar {
            width: 4px;
        }

        .campers-list::-webkit-scrollbar-thumb {
            background: #1E536E;
            border-radius: 4px;
        }

        .camper-card {
            background: rgba(26, 51, 74, 0.55);
            border: var(--border-subtle);
            border-radius: 10px;
            padding: 10px 12px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            overflow: hidden;
        }

        .camper-card:hover {
            background: rgba(30, 83, 110, 0.65);
            border-color: rgba(90, 165, 205, 0.45);
            transform: translateX(2px);
        }

        .camper-card.active {
            background: linear-gradient(135deg, rgba(39, 230, 236, 0.18) 0%, rgba(24, 163, 183, 0.12) 100%);
            border: 1px solid rgba(39, 230, 236, 0.55);
            box-shadow: 0 0 18px rgba(39, 230, 236, 0.18);
        }

        .camper-card.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: linear-gradient(180deg, #27E6EC, #18A3B7);
            box-shadow: 0 0 10px #27E6EC;
        }

        .camper-card-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .camper-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #1A334A;
            border: 1px solid #5AA5CD;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
        }

        .camper-card.active .camper-avatar {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 8px var(--accent-cyan-glow);
        }

        .camper-names {
            display: flex;
            flex-direction: column;
        }

        .camper-name {
            font-weight: 700;
            font-size: 12px;
            color: #ffffff;
            letter-spacing: 0.3px;
        }

        .camper-wager-stats {
            font-size: 10px;
            color: #8eb8d4;
            font-family: var(--font-mono);
        }

        .camper-card-balance {
            text-align: right;
        }

        .camper-bal-val {
            font-family: var(--font-mono);
            font-weight: 700;
            font-size: 13px;
            color: var(--accent-gold);
            text-shadow: 0 0 8px rgba(39, 230, 236, 0.3);
        }

        .camper-actions-trigger {
            font-size: 10px;
            color: #5AA5CD;
            transition: color 0.2s;
            margin-top: 2px;
        }

        .camper-card:hover .camper-actions-trigger {
            color: var(--accent-cyan);
        }

        /* Sidebar Footer / Host Quick Controls */
        .sidebar-footer {
            padding: 12px 14px;
            border-top: var(--border-subtle);
            background: rgba(18, 39, 56, 0.95);
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .active-camper-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(26, 51, 74, 0.85);
            border: 1px solid rgba(39, 230, 236, 0.28);
            padding: 8px 10px;
            border-radius: 10px;
            box-shadow: inset 0 0 16px rgba(39, 230, 236, 0.05);
        }

        .active-camper-banner-text {
            display: flex;
            flex-direction: column;
        }

        .active-camper-banner-text span.label {
            font-size: 9px;
            color: var(--accent-cyan);
            font-family: var(--font-mono);
            text-transform: uppercase;
        }

        .active-camper-banner-text span.name {
            font-size: 12px;
            font-weight: 700;
        }

        .inspect-camper-btn {
            background: rgba(39, 230, 236, 0.14);
            border: 1px solid rgba(39, 230, 236, 0.4);
            color: #fff;
            padding: 5px 10px;
            border-radius: 8px;
            font-size: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .inspect-camper-btn:hover {
            background: rgba(39, 230, 236, 0.28);
            box-shadow: 0 0 12px rgba(39, 230, 236, 0.3);
        }

        .inspect-camper-btn:hover {
            background: var(--accent-purple);
        }

        /* ------------------ MAIN CONTENT STAGE ------------------ */
        main.terminal-main-stage {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
            background: transparent;
        }

        main.terminal-main-stage::-webkit-scrollbar {
            width: 6px;
        }

        main.terminal-main-stage::-webkit-scrollbar-thumb {
            background: #1E536E;
            border-radius: 4px;
        }

        /* View Container Tabs */
        .view-section {
            display: none;
            flex-direction: column;
            width: 100%;
            height: 100%;
            padding: 20px 24px;
            gap: 16px;
            animation: fadeInView 0.25s ease-out forwards;
        }

        .view-section.active {
            display: flex;
        }

        @keyframes fadeInView {
            from {
                opacity: 0;
                transform: translateY(6px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Common Terminal Panel Box */
        .terminal-panel {
            background: var(--panel-bg);
            border: var(--border-main);
            border-radius: 12px;
            backdrop-filter: blur(12px);
            box-shadow: var(--shadow-glass);
            position: relative;
            overflow: hidden;
        }

        .panel-header {
            padding: 12px 18px;
            border-bottom: var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(18, 39, 56, 0.4);
        }

        .panel-title {
            font-family: var(--font-serif);
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 1px;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 8px;
            text-transform: uppercase;
        }

        .panel-title span.badge {
            font-family: var(--font-mono);
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(39, 230, 236, 0.12);
            color: var(--accent-cyan);
            border: 1px solid rgba(39, 230, 236, 0.35);
            box-shadow: 0 0 10px rgba(39, 230, 236, 0.15);
        }

        /* ------------------ GAMES HUB (GRID VIEW) ------------------ */
        .games-hub-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 16px;
            padding-bottom: 20px;
        }

        .game-hub-card {
            background:
                linear-gradient(160deg, rgba(30, 83, 110, 0.55) 0%, rgba(26, 51, 74, 0.85) 55%, rgba(18, 39, 56, 0.95) 100%);
            border: 1px solid rgba(90, 165, 205, 0.22);
            border-radius: 14px;
            padding: 18px;
            cursor: pointer;
            transition: all 0.28s cubic-bezier(0.2, 0, 0, 1);
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 175px;
            box-shadow: 0 10px 28px rgba(8, 20, 32, 0.35);
            backdrop-filter: blur(8px);
        }

        .game-hub-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent, #27E6EC, #6F71A1, transparent);
            opacity: 0.55;
            transition: opacity 0.25s;
        }

        .game-hub-card:hover {
            transform: translateY(-4px);
            border-color: rgba(39, 230, 236, 0.55);
            box-shadow: 0 16px 36px rgba(8, 20, 32, 0.45), 0 0 24px rgba(39, 230, 236, 0.18);
        }

        .game-hub-card:hover::before {
            opacity: 1;
        }

        .game-card-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
        }

        .game-card-icon {
            font-size: 28px;
            background: linear-gradient(145deg, rgba(39, 230, 236, 0.12), rgba(26, 51, 74, 0.9));
            border: 1px solid rgba(39, 230, 236, 0.28);
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #27E6EC;
            box-shadow: inset 0 0 16px rgba(39, 230, 236, 0.08);
            overflow: hidden;
            padding: 0;
        }

        .game-card-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .game-card-badge {
            font-family: var(--font-mono);
            font-size: 9px;
            padding: 3px 8px;
            border-radius: 20px;
            background: rgba(111, 113, 161, 0.28);
            color: #d4daf0;
            border: 1px solid rgba(111, 113, 161, 0.5);
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .game-card-info h3 {
            font-family: var(--font-serif);
            font-size: 14px;
            margin-top: 12px;
            color: #ffffff;
            letter-spacing: 1px;
            font-weight: 700;
        }

        .game-card-info p {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 6px;
            line-height: 1.3;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .game-card-footer {
            margin-top: 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-top: 1px solid rgba(90, 165, 205, 0.18);
            padding-top: 10px;
        }

        .game-card-stat {
            font-family: var(--font-mono);
            font-size: 10px;
            color: var(--accent-gold);
        }

        .game-launch-btn {
            font-size: 11px;
            font-weight: 700;
            color: var(--accent-cyan);
            display: flex;
            align-items: center;
            gap: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            text-shadow: 0 0 10px rgba(39, 230, 236, 0.35);
        }

        /* ------------------ STANDARDIZED BETTING BAR ------------------ */
        .universal-bet-bar {
            background: rgba(18, 39, 56, 0.82);
            border: 1px solid rgba(39, 230, 236, 0.16);
            border-radius: 14px;
            padding: 14px 18px;
            display: flex;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
            margin-top: auto;
            box-shadow: 0 8px 24px rgba(8, 20, 32, 0.35), inset 0 1px 0 rgba(39, 230, 236, 0.08);
            backdrop-filter: blur(10px);
        }

        .bet-bar-camper-select {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 170px;
        }

        .bet-bar-label {
            font-size: 10px;
            font-family: var(--font-mono);
            color: #8eb8d4;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .camper-select-dropdown {
            background: rgba(26, 51, 74, 0.95);
            border: var(--border-subtle);
            color: #fff;
            font-family: var(--font-sans);
            font-size: 12px;
            font-weight: 600;
            padding: 7px 10px;
            border-radius: 6px;
            outline: none;
            cursor: pointer;
        }

        .camper-select-dropdown:focus {
            border-color: var(--accent-cyan);
        }

        .bet-bar-amount-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
            min-width: 240px;
        }

        .bet-input-wrapper {
            display: flex;
            align-items: center;
            background: rgba(18, 39, 56, 0.95);
            border: var(--border-subtle);
            border-radius: 6px;
            padding: 2px 8px;
        }

        .bet-input-wrapper:focus-within {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 10px var(--accent-cyan-glow);
        }

        .bet-input-currency {
            font-family: var(--font-mono);
            font-weight: 700;
            color: var(--accent-gold);
            font-size: 14px;
            margin-right: 6px;
        }

        .bet-amount-input {
            width: 100%;
            background: transparent;
            border: none;
            color: #fff;
            font-family: var(--font-mono);
            font-size: 14px;
            font-weight: 700;
            outline: none;
        }

        .bet-quick-chips {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 4px;
        }

        .quick-chip-btn {
            background: rgba(26, 51, 74, 0.8);
            border: 1px solid rgba(90, 165, 205, 0.25);
            color: #c5dff0;
            font-family: var(--font-mono);
            font-size: 10px;
            padding: 4px 9px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .quick-chip-btn:hover {
            background: rgba(39, 230, 236, 0.18);
            color: #fff;
            border-color: rgba(39, 230, 236, 0.55);
            box-shadow: 0 0 10px rgba(39, 230, 236, 0.2);
        }

        .bet-action-btn {
            background: linear-gradient(135deg, #27E6EC 0%, #18A3B7 100%);
            border: none;
            color: #0a1a24;
            font-family: var(--font-serif);
            font-weight: 800;
            font-size: 13px;
            letter-spacing: 1.2px;
            padding: 12px 24px;
            border-radius: 10px;
            cursor: pointer;
            text-transform: uppercase;
            box-shadow: 0 4px 18px rgba(39, 230, 236, 0.35);
            transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .bet-action-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(39, 230, 236, 0.5);
            filter: brightness(1.08);
        }

        .bet-action-btn:active:not(:disabled) {
            transform: translateY(1px);
        }

        .bet-action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            filter: grayscale(0.8);
        }

        /* ------------------ GAME 1: EXCHANGE TERMINAL (D20) ------------------ */
        .exchange-layout {
            display: grid;
            grid-template-columns: 1fr 340px;
            gap: 16px;
            height: calc(100vh - 160px);
        }

        .exchange-chart-panel {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .chart-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 16px;
            border-bottom: var(--border-subtle);
            background: rgba(18, 39, 56, 0.6);
        }

        .asset-selector-group {
            display: flex;
            gap: 6px;
        }

        .asset-btn {
            background: rgba(26, 51, 74, 0.8);
            border: var(--border-subtle);
            color: #8eb8d4;
            font-family: var(--font-mono);
            font-size: 11px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 4px;
            cursor: pointer;
        }

        .asset-btn.active {
            background: linear-gradient(135deg, #18A3B7, #27E6EC);
            color: #0a1a24;
            border-color: rgba(39, 230, 236, 0.7);
            box-shadow: 0 0 12px rgba(39, 230, 236, 0.35);
        }

        .asset-live-price {
            font-family: var(--font-mono);
            font-size: 14px;
            font-weight: 800;
            color: var(--profit-green);
        }

        .chart-canvas-container {
            flex: 1;
            position: relative;
            width: 100%;
            min-height: 250px;
        }

        #exchangeCanvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        /* D20 Side Panel */
        .exchange-d20-panel {
            display: flex;
            flex-direction: column;
            gap: 12px;
            height: 100%;
        }

        .d20-wheel-stage {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 14px;
            position: relative;
        }

        .d20-wheel-wrapper {
            position: relative;
            width: 190px;
            height: 190px;
            margin: 10px 0;
        }

        #d20Canvas {
            width: 100%;
            height: 100%;
            transform: rotate(0deg);
            transition: transform 3.5s cubic-bezier(0.1, 1, 0.1, 1);
        }

        .d20-pointer {
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 18px solid var(--accent-gold);
            filter: drop-shadow(0 0 6px rgba(39, 230, 236, 0.8));
            z-index: 10;
        }

        .d20-center-hub {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 48px;
            height: 48px;
            background: #1A334A;
            border: 2px solid var(--accent-gold);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-serif);
            font-weight: 900;
            font-size: 15px;
            color: var(--accent-gold);
            box-shadow: 0 0 15px rgba(39, 230, 236, 0.4);
        }

        .d20-result-banner {
            font-family: var(--font-mono);
            font-size: 13px;
            font-weight: 800;
            padding: 6px 12px;
            border-radius: 6px;
            text-align: center;
            width: 100%;
            background: rgba(18, 39, 56, 0.6);
            border: var(--border-subtle);
        }

        .position-mode-toggle {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 4px;
        }

        .pos-btn {
            padding: 10px;
            border: var(--border-subtle);
            border-radius: 6px;
            font-family: var(--font-serif);
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .pos-btn.long {
            background: rgba(0, 255, 136, 0.1);
            color: var(--profit-green);
            border-color: rgba(0, 255, 136, 0.3);
        }

        .pos-btn.long.active {
            background: var(--profit-green);
            color: #ffffff;
            box-shadow: 0 0 15px var(--profit-green-glow);
        }

        .pos-btn.short {
            background: rgba(255, 51, 102, 0.1);
            color: var(--danger-red);
            border-color: rgba(255, 51, 102, 0.3);
        }

        .pos-btn.short.active {
            background: var(--danger-red);
            color: #ffffff;
            box-shadow: 0 0 15px var(--danger-red-glow);
        }

        .leverage-selector {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(18, 39, 56, 0.7);
            padding: 6px 10px;
            border-radius: 6px;
            border: var(--border-subtle);
        }

        .lev-pill {
            background: transparent;
            border: none;
            color: #8eb8d4;
            font-family: var(--font-mono);
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 4px;
            cursor: pointer;
        }

        .lev-pill.active {
            background: var(--accent-purple);
            color: #fff;
            font-weight: 700;
        }

        /* ------------------ GAME 2: CRASH (ROCKET) ------------------ */
        .crash-layout {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 16px;
            height: calc(100vh - 160px);
        }

        .crash-canvas-stage {
            position: relative;
            background: radial-gradient(ellipse at 30% 80%, rgba(30, 83, 110, 0.45) 0%, #0d1c2a 55%, #09141f 100%);
            border-radius: 14px;
            overflow: hidden;
            border: 1px solid rgba(39, 230, 236, 0.18);
            min-height: 380px;
            box-shadow: inset 0 0 40px rgba(39, 230, 236, 0.05);
        }

        #crashCanvas {
            width: 100%;
            height: 100%;
        }

        .crash-overlay-hud {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            pointer-events: none;
        }

        .crash-multiplier-text {
            font-family: var(--font-mono);
            font-size: 56px;
            font-weight: 900;
            color: #ffffff;
            text-shadow: 0 0 25px var(--accent-cyan-glow);
            letter-spacing: 2px;
        }

        .crash-status-sub {
            font-family: var(--font-serif);
            font-size: 14px;
            letter-spacing: 2px;
            color: var(--accent-gold);
            text-transform: uppercase;
            margin-top: 4px;
        }

        .crash-history-bar {
            position: absolute;
            top: 14px;
            left: 16px;
            right: 16px;
            display: flex;
            gap: 8px;
            overflow-x: auto;
            pointer-events: none;
        }

        .crash-past-pill {
            font-family: var(--font-mono);
            font-size: 11px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 4px;
            background: rgba(18, 39, 56, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .crash-campers-dock {
            display: flex;
            flex-direction: column;
            gap: 10px;
            height: 100%;
        }

        .crash-bets-list {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 4px;
        }

        .crash-camper-row {
            background: rgba(26, 51, 74, 0.7);
            border: var(--border-subtle);
            border-radius: 6px;
            padding: 8px 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .crash-cashout-btn {
            background: linear-gradient(135deg, #27E6EC 0%, #18A3B7 100%);
            border: none;
            color: #0a1a24;
            font-family: var(--font-mono);
            font-size: 11px;
            font-weight: 800;
            padding: 6px 12px;
            border-radius: 6px;
            cursor: pointer;
            box-shadow: 0 0 12px var(--profit-green-glow);
            transition: transform 0.15s, box-shadow 0.15s;
        }

        .crash-cashout-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 18px rgba(39, 230, 236, 0.55);
        }

        .crash-cashout-main {
            width: 100%;
            background: linear-gradient(135deg, #27E6EC 0%, #18A3B7 100%);
            border: none;
            color: #0a1a24;
            font-family: var(--font-serif);
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 1px;
            padding: 16px 20px;
            border-radius: 12px;
            cursor: pointer;
            text-transform: uppercase;
            box-shadow: 0 0 28px rgba(39, 230, 236, 0.45);
            animation: cashoutPulse 1.2s ease-in-out infinite alternate;
            display: none;
        }

        .crash-cashout-main.visible {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        @keyframes cashoutPulse {
            from { box-shadow: 0 0 18px rgba(39, 230, 236, 0.35); }
            to { box-shadow: 0 0 32px rgba(39, 230, 236, 0.7); }
        }

        .crash-idle-controls {
            display: flex;
            gap: 8px;
            width: 100%;
        }

        .crash-idle-controls.hidden {
            display: none;
        }

        /* ------------------ GAME 3: MINES ------------------ */
        .mines-layout {
            display: grid;
            grid-template-columns: 320px 1fr;
            gap: 20px;
            height: calc(100vh - 160px);
            align-items: center;
        }

        .mines-grid-container {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            max-width: 480px;
            margin: 0 auto;
            width: 100%;
        }

        .mine-tile {
            aspect-ratio: 1 / 1;
            background: linear-gradient(145deg, var(--bg-3, #1E536E) 0%, var(--bg-2, #1A334A) 100%);
            border: 2px solid var(--line-strong, rgba(90, 165, 205, 0.28));
            border-radius: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            line-height: 1;
            color: var(--accent-2, #A6D6C9);
            transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s, box-shadow 0.2s, background 0.2s;
            position: relative;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        .mine-tile::before {
            content: none;
            font-size: 0.85em;
            line-height: 1;
            pointer-events: none;
        }

        .mine-tile:hover:not(.revealed-gem):not(.revealed-mine) {
            transform: scale(1.04);
            border-color: var(--accent, #4CA7A1);
            box-shadow: 0 0 16px var(--accent-cyan-glow, rgba(76, 167, 161, 0.28));
        }

        .mine-tile.revealed-gem {
            background:
              radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--accent-2, #A6D6C9) 72%, #fff 10%), transparent 55%),
              radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--accent, #4CA7A1) 55%, transparent), var(--bg-2, #0D2B36) 78%);
            border-color: var(--accent-2, #CEFEF1);
            box-shadow:
              0 0 22px var(--accent-cyan-glow, rgba(76, 167, 161, 0.5)),
              0 0 8px color-mix(in srgb, var(--accent-2, #A6D6C9) 55%, transparent),
              inset 0 0 18px color-mix(in srgb, var(--accent, #4CA7A1) 28%, transparent);
            animation: popGem 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: default;
            filter: brightness(1.18) saturate(1.15);
        }

        .mine-tile.revealed-gem::before {
            content: "💎";
            opacity: 1;
            font-size: 1.2em;
            color: var(--accent-2, #CEFEF1);
            text-shadow: 0 0 16px var(--accent-cyan-glow, rgba(206, 254, 241, 0.7));
            filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-2, #A6D6C9) 70%, transparent));
        }

        .mine-tile.revealed-mine {
            background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--danger-red, #c47a8a) 55%, transparent), var(--bg-void, #001722) 75%);
            border-color: var(--danger-red, #c47a8a);
            box-shadow: 0 0 22px var(--danger-red-glow, rgba(196, 122, 138, 0.45));
            animation: shakeMine 0.4s;
            cursor: default;
            filter: brightness(1.12);
        }

        .mine-tile.revealed-mine::before {
            content: "💣";
            opacity: 1;
            font-size: 1.15em;
            filter: none;
        }

        .mine-tile.revealed-gem[style*="opacity"],
        .mine-tile.faded {
            filter: brightness(0.85) saturate(0.85);
        }
        .mine-tile.faded::before {
            opacity: 0.55;
        }

        @keyframes popGem {
            0% {
                transform: scale(0.5);
                opacity: 0;
            }

            80% {
                transform: scale(1.15);
            }

            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        @keyframes shakeMine {

            0%,
            100% {
                transform: translateX(0);
            }

            20%,
            60% {
                transform: translateX(-6px);
            }

            40%,
            80% {
                transform: translateX(6px);
            }
        }

        /* ------------------ GAME 4: PLINKO ------------------ */
        .plinko-layout {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 16px;
            height: calc(100vh - 160px);
        }

        .plinko-canvas-container {
            position: relative;
            background: #05020d;
            border-radius: 12px;
            border: var(--border-main);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #plinkoCanvas {
            width: 100%;
            height: 100%;
        }

        /* ------------------ GAME 5: CAMP TOTALIZATOR (SPORTSBOOK) ------------------ */
        .sportsbook-layout {
            display: flex;
            flex-direction: column;
            gap: 16px;
            height: calc(100vh - 160px);
            overflow-y: auto;
        }

        .sportsbook-cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 16px;
        }

        .event-card {
            background: linear-gradient(145deg, #160c33 0%, #0d1238 100%);
            border: var(--border-main);
            border-radius: 10px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
        }

        .event-card-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
        }

        .event-title {
            font-family: var(--font-serif);
            font-size: 14px;
            font-weight: 700;
            color: #fff;
        }

        .event-pool-badge {
            font-family: var(--font-mono);
            font-size: 11px;
            color: var(--accent-gold);
            background: rgba(39, 230, 236, 0.12);
            padding: 2px 8px;
            border-radius: 12px;
            border: 1px solid rgba(39, 230, 236, 0.3);
        }

        .event-options-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .event-option-btn {
            background: rgba(26, 51, 74, 0.8);
            border: var(--border-subtle);
            border-radius: 6px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.2s;
            color: #fff;
        }

        .event-option-btn:hover {
            border-color: var(--accent-cyan);
            background: rgba(30, 83, 110, 0.8);
        }

        .event-option-btn.selected {
            border-color: var(--accent-cyan);
            background: linear-gradient(90deg, rgba(39, 230, 236, 0.2), rgba(39, 230, 236, 0.2));
            box-shadow: 0 0 10px var(--accent-cyan-glow);
        }

        .option-odds {
            font-family: var(--font-mono);
            font-weight: 700;
            color: var(--profit-green);
        }

        /* ------------------ GAME 6: MASCOT DERBY ------------------ */
        .derby-layout {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 16px;
            height: calc(100vh - 160px);
        }

        .derby-track-panel {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .derby-canvas-wrapper {
            flex: 1;
            position: relative;
            background: #080314;
            border-radius: 10px;
            overflow: hidden;
            border: var(--border-main);
        }

        #derbyCanvas {
            width: 100%;
            height: 100%;
        }

        /* ------------------ GAME 7: LOOTBOXES (CS:GO REEL) ------------------ */
        .lootbox-layout {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            justify-content: center;
            height: calc(100vh - 160px);
        }

        .case-tier-selector {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            width: 100%;
        }

        .case-tier-card {
            background: var(--panel-card);
            border: var(--border-main);
            border-radius: 18px;
            padding: 16px 10px 14px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 0;
        }

        .case-tier-icon {
            font-size: 52px;
            line-height: 1;
            filter: drop-shadow(0 6px 12px rgba(39, 230, 236, 0.25));
        }

        .case-tier-card h4 {
            font-family: var(--font-serif);
            margin: 10px 0 0;
            font-size: 13px;
            letter-spacing: 0.02em;
        }

        .case-tier-price {
            font-family: var(--font-mono);
            color: var(--accent-gold);
            font-size: 13px;
            font-weight: 700;
            margin-top: 4px;
        }

        .case-tier-max {
            margin-top: 8px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #26C6DA;
        }

        .case-tier-card:hover,
        .case-tier-card.active {
            border-color: var(--accent-gold);
            box-shadow: 0 0 20px var(--accent-gold-glow);
            transform: translateY(-2px);
        }

        .case-tier-card.active {
            background: linear-gradient(145deg, rgba(39, 230, 236, 0.15), rgba(39, 230, 236, 0.15));
        }

        .csgo-carousel-wrapper {
            position: relative;
            width: min(230px, 80vw);
            height: min(460px, calc(100dvh - 220px));
            background: #090417;
            border: 2px solid #1E536E;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
            margin: 0 auto;
        }
        .csgo-carousel-wrapper::before,
        .csgo-carousel-wrapper::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            height: 56px;
            z-index: 16;
            pointer-events: none;
        }
        .csgo-carousel-wrapper::before {
            top: 0;
            background: linear-gradient(to bottom, #090417 0%, rgba(9,4,23,0) 100%);
        }
        .csgo-carousel-wrapper::after {
            bottom: 0;
            background: linear-gradient(to top, #090417 0%, rgba(9,4,23,0) 100%);
        }

        .csgo-needle {
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            height: 3px;
            width: auto;
            background: var(--accent-gold);
            transform: translateY(-50%);
            z-index: 20;
            box-shadow: 0 0 12px var(--accent-gold);
        }

        .csgo-needle::before,
        .csgo-needle::after {
            content: '';
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            border-top: 7px solid transparent;
            border-bottom: 7px solid transparent;
        }

        .csgo-needle::before {
            left: 0;
            border-left: 10px solid var(--accent-gold);
        }

        .csgo-needle::after {
            right: 0;
            left: auto;
            border-right: 10px solid var(--accent-gold);
        }

        .csgo-track {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 12px 10px;
            will-change: transform;
        }

        .csgo-item-card {
            width: 100%;
            height: 92px;
            background: #150c30;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px;
            border-bottom: 4px solid #fff;
            flex-shrink: 0;
            box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
        }

        .csgo-item-icon {
            font-size: 40px;
            line-height: 1;
        }

        .csgo-item-name {
            font-size: 10px;
            font-weight: 700;
            text-align: center;
            color: #fff;
            line-height: 1.2;
        }

        .csgo-item-val {
            font-family: var(--font-mono);
            font-size: 10px;
            color: var(--accent-gold);
        }

        /* ------------------ GAME 8: WHEEL OF FORTUNE ------------------ */
        .wheel-layout {
            display: flex;
            flex-direction: column;
            gap: 12px;
            height: calc(100vh - 160px);
            align-items: stretch;
        }

        .wheel-stage {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            flex: 1;
            min-height: 0;
        }

        .big-wheel-wrapper {
            position: relative;
            width: min(340px, 78vw);
            height: min(340px, 78vw);
        }

        #bigWheelCanvas {
            width: 100%;
            height: 100%;
            transform: rotate(0deg);
            transition: transform 5s cubic-bezier(0.12, 0.95, 0.2, 1);
            filter: drop-shadow(0 12px 28px rgba(8, 20, 32, 0.55));
        }

        .wheel-flapper {
            position: absolute;
            top: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 11px solid transparent;
            border-right: 11px solid transparent;
            border-top: 22px solid #26C6DA;
            filter: drop-shadow(0 0 10px rgba(38, 198, 218, 0.9));
            z-index: 15;
            transition: transform 0.1s;
        }

        /* ------------------ GAME 9: DICE (OVER / UNDER) ------------------ */
        .dice-layout {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: center;
            gap: 12px;
            height: calc(100vh - 160px);
            max-width: 700px;
            margin: 0 auto;
            width: 100%;
        }

        .dice-slider-box {
            width: min(100%, 520px);
            margin: 0 auto;
            background: linear-gradient(160deg, rgba(18, 22, 32, 0.96), rgba(13, 17, 26, 0.98));
            border: 1px solid rgba(38, 198, 218, 0.22);
            border-radius: 22px;
            padding: 22px 18px 18px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .dice-roll-display {
            font-family: var(--font-mono);
            font-size: 52px;
            font-weight: 900;
            text-align: center;
            color: #eaf6fb;
            letter-spacing: 0.04em;
            text-shadow: 0 0 22px rgba(38, 198, 218, 0.45);
        }

        .dice-range-bar-wrap {
            position: relative;
            width: 100%;
            height: 22px;
            background: rgba(94, 53, 177, 0.28);
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(126, 87, 194, 0.28);
        }

        .dice-win-zone {
            position: absolute;
            top: 0;
            bottom: 0;
            background: linear-gradient(90deg, rgba(38, 198, 218, 0.55), rgba(0, 176, 255, 0.85));
            box-shadow: 0 0 12px rgba(38, 198, 218, 0.45);
        }

        .dice-slider-input {
            width: 100%;
            cursor: pointer;
            accent-color: #26C6DA;
            margin-top: 4px;
        }

        .dice-stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            text-align: center;
        }

        .dice-stat-card {
            background: rgba(13, 17, 26, 0.8);
            border: 1px solid rgba(38, 198, 218, 0.18);
            border-radius: 16px;
            padding: 10px 8px;
        }

        .dice-stat-card .bet-bar-label {
            font-size: 11px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        /* ------------------ GAME 10: GLOBAL JACKPOT COFFER ------------------ */
        .jackpot-layout {
            display: grid;
            grid-template-columns: 1fr 340px;
            gap: 16px;
            height: calc(100vh - 160px);
        }

        .jackpot-wheel-panel {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .jackpot-pot-header {
            text-align: center;
            margin-bottom: 12px;
        }

        .jackpot-pot-title {
            font-family: var(--font-serif);
            font-size: 13px;
            color: var(--accent-gold);
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .jackpot-pot-val {
            font-family: var(--font-mono);
            font-size: 42px;
            font-weight: 900;
            color: #fff;
            text-shadow: 0 0 25px rgba(39, 230, 236, 0.5);
        }

        /* ------------------ GAME 11: THIMBLES ------------------ */
        .thimbles-layout {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 30px;
            height: calc(100vh - 160px);
        }

        .thimbles-table {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 50px;
            position: relative;
            min-height: 220px;
            width: 100%;
            max-width: 650px;
        }

        .thimble-cup-wrap {
            position: relative;
            width: 110px;
            height: 140px;
            cursor: pointer;
            transition: transform 0.4s ease;
        }

        .thimble-cup-sprite {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #d4af37 0%, #aa7c11 50%, #5b4105 100%);
            border-radius: 20px 20px 8px 8px;
            border: 2px solid #ffe885;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            color: #ffe885;
            position: relative;
            z-index: 2;
            transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .thimble-ball {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 32px;
            height: 32px;
            background: radial-gradient(circle at 30% 30%, #27E6EC 0%, #18A3B7 55%, #1A334A 100%);
            border-radius: 50%;
            box-shadow: 0 0 15px #27E6EC;
            z-index: 1;
            display: none;
        }

        .thimble-cup-wrap.lifted .thimble-cup-sprite {
            transform: translateY(-60px);
        }

        /* ------------------ LEADERBOARD VIEW ------------------ */
        .leaderboard-table-container {
            flex: 1;
            overflow-y: auto;
            background: rgba(18, 39, 56, 0.6);
            border: var(--border-main);
            border-radius: 10px;
        }

        table.leaderboard-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        table.leaderboard-table th {
            background: rgba(26, 51, 74, 0.95);
            padding: 12px 16px;
            text-align: left;
            font-family: var(--font-serif);
            font-size: 11px;
            letter-spacing: 1px;
            color: var(--accent-purple);
            text-transform: uppercase;
            border-bottom: var(--border-main);
        }

        table.leaderboard-table td {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(30, 83, 110, 0.3);
            font-family: var(--font-sans);
        }

        table.leaderboard-table tr:hover td {
            background: rgba(30, 83, 110, 0.3);
        }

        .rank-badge {
            font-family: var(--font-mono);
            font-weight: 800;
            display: inline-block;
            min-width: 24px;
            height: 24px;
            line-height: 24px;
            text-align: center;
            border-radius: 50%;
            font-size: 16px;
        }

        .rank-1 {
            background: transparent;
            color: inherit;
            box-shadow: none;
            font-size: 18px;
        }

        .rank-2,
        .rank-3 {
            background: transparent;
            color: inherit;
            font-size: 18px;
        }

        table.leaderboard-table tr.lb-top-1 td {
            background: linear-gradient(90deg, rgba(255, 213, 79, 0.16), rgba(18, 39, 56, 0.35) 55%, transparent);
            box-shadow: inset 0 0 18px rgba(255, 196, 72, 0.12);
        }

        table.leaderboard-table tr.lb-top-1 {
            position: relative;
            outline: 1px solid rgba(255, 213, 79, 0.45);
            outline-offset: -1px;
            box-shadow: 0 0 18px rgba(255, 196, 72, 0.18);
        }

        /* ------------------ MODALS ------------------ */
        .modal-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(8, 18, 28, 0.85);
            backdrop-filter: blur(8px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal-backdrop.open {
            display: flex;
        }

        .terminal-modal {
            background: linear-gradient(155deg, #1E536E 0%, #1A334A 55%, #122738 100%);
            border: 1px solid rgba(39, 230, 236, 0.28);
            border-radius: 16px;
            width: 100%;
            max-width: 520px;
            box-shadow: 0 16px 48px rgba(8, 18, 28, 0.75), 0 0 28px rgba(39, 230, 236, 0.15);
            animation: popModal 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            overflow: hidden;
        }

        @keyframes popModal {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .modal-header {
            padding: 14px 18px;
            border-bottom: var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(18, 39, 56, 0.7);
        }

        .modal-header h3 {
            font-family: var(--font-serif);
            font-size: 14px;
            letter-spacing: 1px;
            color: #fff;
            text-transform: uppercase;
        }

        .modal-close-btn {
            background: transparent;
            border: none;
            color: #8eb8d4;
            font-size: 18px;
            cursor: pointer;
        }

        .modal-close-btn:hover {
            color: #fff;
        }

        .modal-body {
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .modal-footer {
            padding: 12px 18px;
            border-top: var(--border-subtle);
            background: rgba(18, 39, 56, 0.5);
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 11px;
            font-family: var(--font-mono);
            color: #8eb8d4;
            text-transform: uppercase;
        }

        .form-input {
            background: rgba(18, 39, 56, 0.95);
            border: var(--border-subtle);
            border-radius: 6px;
            padding: 8px 12px;
            color: #fff;
            font-size: 13px;
            font-family: var(--font-mono);
            outline: none;
        }

        .form-input:focus {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 10px var(--accent-cyan-glow);
        }

        /* Toast Notifications */
        .toast-container {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 8px;
            pointer-events: none;
        }

        .toast-item {
            background: rgba(18, 39, 56, 0.95);
            border: 1px solid rgba(39, 230, 236, 0.2);
            border-left: 4px solid var(--accent-cyan);
            border-radius: 10px;
            padding: 10px 16px;
            color: #fff;
            font-size: 13px;
            box-shadow: 0 8px 24px rgba(8, 18, 28, 0.55), 0 0 16px rgba(39, 230, 236, 0.1);
            animation: slideToast 0.3s forwards;
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 10px;
            backdrop-filter: blur(10px);
        }

        .toast-item.win {
            border-left-color: var(--profit-green);
            box-shadow: 0 0 15px var(--profit-green-glow);
        }

        .toast-item.loss {
            border-left-color: var(--danger-red);
        }

        @keyframes slideToast {
            from {
                transform: translateX(100%);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* ------------------ LOGIN GATE ------------------ */
        .login-gate {
            position: fixed;
            inset: 0;
            z-index: 5000;
            background:
                radial-gradient(ellipse 70% 50% at 50% 20%, rgba(39, 230, 236, 0.18), transparent 60%),
                linear-gradient(165deg, #1E536E 0%, #122738 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .login-gate.hidden {
            display: none;
        }

        .login-card {
            width: 100%;
            max-width: 420px;
            background: rgba(18, 39, 56, 0.92);
            border: 1px solid rgba(39, 230, 236, 0.28);
            border-radius: 16px;
            padding: 28px 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
        }

        .login-card h2 {
            font-family: var(--font-serif);
            font-size: 18px;
            letter-spacing: 1.5px;
            margin-bottom: 6px;
        }

        .login-card .login-sub {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 20px;
        }

        .login-tabs {
            display: flex;
            gap: 6px;
            margin-bottom: 16px;
        }

        .login-tabs button {
            flex: 1;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid rgba(39, 230, 236, 0.2);
            background: transparent;
            color: var(--text-muted);
            font-weight: 700;
            cursor: pointer;
        }

        .login-tabs button.active {
            background: linear-gradient(90deg, #27E6EC, #18A3B7);
            color: #0a1a24;
            border-color: transparent;
        }

        .nav-locked {
            opacity: 0.45;
            pointer-events: none;
        }

        .king-only-hint {
            display: none;
            font-family: var(--font-mono);
            font-size: 11px;
            color: var(--accent-gold);
            padding: 6px 10px;
            border-radius: 8px;
            background: rgba(39, 230, 236, 0.1);
            border: 1px solid rgba(39, 230, 236, 0.25);
            white-space: nowrap;
        }

        .mobile-only {
            display: none !important;
        }

        .sidebar-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            z-index: 45;
        }

        .sidebar-backdrop.open {
            display: block;
        }

        /* ------------------ RESPONSIVE (PHONE / NARROW) ------------------ */
        @media (max-width: 1100px) {
            header.terminal-header {
                height: auto;
                min-height: 56px;
                flex-wrap: wrap;
                gap: 8px;
                padding: 8px 12px;
            }

            .header-brand .brand-text p {
                display: none;
            }

            .brand-text h1 {
                font-size: 13px;
                letter-spacing: 1px;
            }

            .header-nav {
                order: 3;
                width: 100%;
                overflow-x: auto;
                border-radius: 12px;
                justify-content: flex-start;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            .header-nav::-webkit-scrollbar {
                display: none;
            }

            .nav-tab-btn {
                padding: 8px 12px;
                font-size: 12px;
                flex-shrink: 0;
            }

            .crash-layout,
            .mines-layout,
            .plinko-layout,
            .derby-layout,
            .wheel-layout,
            .jackpot-layout {
                grid-template-columns: 1fr !important;
                height: auto !important;
                min-height: 0;
            }

            .crash-canvas-stage,
            .plinko-canvas-container,
            .derby-canvas-wrapper {
                min-height: 280px;
                max-height: 48vh;
            }

            .games-hub-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 10px;
            }

            .view-section {
                padding: 12px;
            }

            .big-wheel-wrapper {
                width: min(320px, 85vw);
                height: min(320px, 85vw);
            }

            .dice-stats-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 768px) {
            .mobile-only {
                display: inline-flex !important;
            }

            body {
                height: 100dvh;
                overflow: hidden;
            }

            aside.camper-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                width: min(320px, 88vw);
                transform: translateX(-105%);
                z-index: 60;
                box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5);
            }

            aside.camper-sidebar.open {
                transform: translateX(0);
            }

            .header-meta #mpPresenceBadge {
                font-size: 10px;
                padding: 3px 6px;
            }

            .game-hub-card {
                min-height: 140px;
                padding: 12px;
            }

            .game-hub-card h3 {
                font-size: 14px;
            }

            .crash-multiplier-text {
                font-size: 40px;
            }

            .mines-grid-container {
                gap: 6px;
                max-width: 100%;
            }

            .mine-tile {
                font-size: 18px;
                border-radius: 8px;
            }

            .case-tier-selector {
                grid-template-columns: 1fr 1fr;
                width: 100%;
            }

            .case-tier-card {
                min-width: 0;
                width: 100%;
            }

            .lootbox-layout {
                height: auto;
                padding-bottom: 24px;
            }

            .csgo-carousel-wrapper {
                max-width: 100%;
            }

            .modal-backdrop .terminal-modal {
                max-width: calc(100vw - 24px) !important;
                margin: 12px;
                max-height: calc(100dvh - 24px);
                overflow-y: auto;
            }

            .toast-container {
                left: 12px;
                right: 12px;
                bottom: 12px;
            }

            .toast-item {
                width: 100%;
            }
        }

        @media (max-width: 420px) {
            .brand-text h1 {
                font-size: 11px;
            }

            .games-hub-grid {
                grid-template-columns: 1fr;
            }

            .header-icon-btn {
                width: 34px;
                height: 34px;
            }
        }
    
        .view-section {
            position: relative;
        }
        .lw-game-help { display: none !important; }
        body.tg-mode #waveBack,
        body.lw-ingame #waveBack { display: none !important; }

        html, body { background: #0D111A; }
        body { padding-top: var(--tg-content-safe-area-inset-top, 0px); }
        body.tg-mode .terminal-grid-overlay { display: none !important; }
        body.tg-mode {
          --lw-topbar-h: calc(58px + var(--tg-content-safe-area-inset-top, 0px));
          --lw-tabbar-h: 50px;
        }
        body.tg-mode #view-hub.active {
          position: fixed;
          top: var(--lw-topbar-h);
          left: 0;
          right: 0;
          bottom: var(--lw-tabbar-h);
          height: auto;
          overflow: hidden;
          padding: 8px 12px 8px;
          gap: 10px;
          animation: none;
          transform: none;
        }
        body.tg-mode .wave-mode {
          position: relative;
          top: auto;
          left: auto;
          right: auto;
          flex-shrink: 0;
          margin: 0;
          z-index: 2;
        }
        body.tg-mode .wave-duelbar {
          flex-shrink: 0;
          margin: 0;
        }
        body.tg-mode #waveHubGrid {
          flex: 1;
          min-height: 0;
          overflow-y: auto;
          padding-bottom: 12px;
        }
        body.tg-mode #view-duel-room.active {
          position: fixed;
          top: var(--lw-topbar-h);
          left: 0;
          right: 0;
          bottom: var(--lw-tabbar-h);
          height: auto;
          overflow: hidden;
          padding: 8px 12px 12px;
          gap: 10px;
          animation: none;
          transform: none;
        }
        body.tg-mode #view-duel-room .wave-game-top { flex-shrink: 0; margin-bottom: 4px; }
        body.tg-mode .wave-pick-back { display: none !important; }
        .lw-hidden-game, .game-hub-card[hidden] { display: none !important; }
        .login-gate { display: none !important; }
        #mobileSidebarBtn { display: none !important; }
        .camper-sidebar,
        #logoutBtn,
        #openAddCamperModalBtn,
        #hostPanelBtn,
        #mpPresenceBadge,
        #kingOnlyHint,
        #audioToggleBtn,
        .brand-text,
        .header-nav { display: none !important; }
        body.tg-mode .terminal-header {
          display: none !important;
        }
        .terminal-container { padding-bottom: 58px; padding-top: 64px; }
        .games-hub-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
        .game-hub-card { min-height: 118px !important; padding: 10px 12px; }

        .lw-play {
          display: flex !important;
          flex-direction: column !important;
          height: calc(100dvh - 148px) !important;
          grid-template-columns: none !important;
          gap: 10px;
          min-height: 0;
        }
        .lw-play-field {
          flex: 1;
          min-height: 0;
          display: flex;
          align-items: center;
          justify-content: center;
        }
        #view-crash, #view-mines, #view-plinko, #view-lootbox,
        #view-wheel, #view-dice {
          padding: 0 !important;
          gap: 10px !important;
        }
        .lw-play .crash-canvas-stage,
        .lw-play .plinko-canvas-container,
        .lw-play .mines-grid-wrap,
        .lw-play-field.crash-canvas-stage,
        .lw-play .wheel-stage,
        .lw-play .dice-slider-box {
          width: 100%;
          height: 100%;
          min-height: 0 !important;
          max-height: none !important;
        }
        .lw-play .dice-slider-box { height: auto; }
        .lw-play.phase-bet .lw-play-field { display: none !important; }
        .lw-play.phase-play .lw-bet-setup { display: none !important; }
        .lw-play.phase-bet .lw-bet-cash { display: none !important; }
        .lw-play.phase-play .lw-bet-cash { display: block !important; }
        .lw-play.phase-end .lw-bet-cash { display: none !important; }
        .lw-play.phase-end .lw-bet-setup { display: none !important; }
        .lw-play.phase-end .lw-bet { display: block !important; }
        .lw-bet-again {
          display: none;
          width: 100%;
          box-sizing: border-box;
          margin: 0;
          border: 0;
          border-radius: 16px;
          min-height: 56px;
          padding: 16px 18px;
          font-family: inherit;
          font-weight: 800;
          font-size: 16px;
          letter-spacing: .08em;
          line-height: 1.3;
          text-transform: uppercase;
          cursor: pointer;
          color: var(--btn-ink, #0D111A);
          background: var(--btn-grad, linear-gradient(180deg, #4CA7A1, #1F5F63));
        }
        .lw-play.phase-end .lw-bet {
          padding: 14px !important;
        }
        .lw-play.phase-end .lw-bet-again {
          display: flex !important;
          align-items: center;
          justify-content: center;
        }
        .lw-rules-ranks {
          display: flex;
          flex-wrap: wrap;
          gap: 6px;
          justify-content: center;
          margin: 14px 0 6px;
        }
        .lw-rules-rank {
          width: 34px;
          height: 46px;
          border-radius: 8px;
          border: 1px solid rgba(38,198,218,.35);
          background: linear-gradient(160deg, #f4fbff, #d7eef5);
          color: #122738;
          display: grid;
          place-items: center;
          font-weight: 800;
          font-size: 12px;
          font-family: var(--font-mono);
          box-shadow: 0 4px 10px rgba(0,0,0,.18);
        }
        .lw-rules-rank.face { color: #5E35B1; }
        .lw-rules-rank.ace { color: #c6284a; border-color: rgba(198,40,74,.4); }
        .lw-door-lab {
          display: block;
          font-size: 11px;
          letter-spacing: .08em;
          text-transform: uppercase;
          color: #7a8ea3;
          margin-bottom: 4px;
        }
        .wave-door .door-ico { font-size: 30px; line-height: 1; }
        .crash-count-overlay {
          position: absolute;
          inset: 0;
          z-index: 40;
          display: grid;
          place-items: center;
          background: rgba(0, 12, 20, .72);
          pointer-events: none;
        }
        .crash-count-overlay span {
          font-family: var(--font-mono, JetBrains Mono, monospace);
          font-size: clamp(72px, 18vw, 110px);
          font-weight: 900;
          line-height: 1;
          letter-spacing: .06em;
          color: var(--accent-cyan, #27E6EC);
          text-shadow: 0 0 28px var(--accent-cyan-glow, rgba(39,230,236,.55));
          animation: crashCountPop .45s cubic-bezier(.2,.85,.2,1);
        }
        .crash-count-overlay span.go {
          color: var(--accent-gold, #E8B86D);
          text-shadow: 0 0 30px var(--accent-gold-glow, rgba(232,184,109,.5));
        }
        @keyframes crashCountPop {
          from { opacity: 0; transform: scale(.55); }
          to { opacity: 1; transform: none; }
        }
        .lw-play.plinko-layout.phase-play .lw-bet { display: none !important; }
        .lw-play.phase-play .mines-grid-container {
          width: min(100%, calc(100dvh - 210px), 420px);
          max-width: min(92vw, 420px);
          gap: 6px;
        }
        .lw-play.phase-play .mine-tile { border-radius: 12px; }
        #crashCashoutMainBtn[disabled],
        .lw-bet-cash[disabled],
        .lw-bet-go[disabled] { opacity: .45; pointer-events: none; }
        #minesCashoutBtn[disabled] {
          opacity: 1 !important;
          pointer-events: none;
          background: #2a3140 !important;
          color: #8b97a8 !important;
          box-shadow: none;
          cursor: not-allowed;
        }
        .crash-history-bar { max-height: 34px; overflow: hidden; }
        .lw-play .mines-grid-container { max-width: min(420px, 92vw); gap: 8px; }
        .lw-bet {
          flex-shrink: 0;
          background: rgba(18,22,32,.94);
          border: 1px solid rgba(38,198,218,.22);
          border-radius: 20px;
          padding: 12px;
        }
        .lw-bet-caption {
          font-size: 11px;
          font-weight: 700;
          letter-spacing: .08em;
          text-transform: uppercase;
          color: #7a8ea3;
          margin: 0 0 6px 2px;
        }
        .lw-bet-row {
          display: flex;
          align-items: center;
          gap: 8px;
          margin-bottom: 10px;
        }
        .lw-bet-step, .lw-bet-all {
          border: 1px solid rgba(38,198,218,.3);
          background: rgba(38,198,218,.1);
          color: #26C6DA;
          border-radius: 14px;
          height: 44px;
          min-width: 44px;
          font-weight: 800;
          font-size: 16px;
          cursor: pointer;
        }
        .lw-bet-all { padding: 0 14px; letter-spacing: .06em; }
        .lw-bet-value {
          flex: 1;
          display: flex;
          align-items: center;
          gap: 6px;
          background: #0D111A;
          border: 1px solid rgba(38,198,218,.28);
          border-radius: 14px;
          padding: 0 12px;
          height: 44px;
        }
        .lw-bet-value span { color: #26C6DA; font-weight: 800; }
        .lw-bet-value input {
          width: 100%;
          background: transparent;
          border: 0;
          color: #eaf6fb;
          font: 800 18px JetBrains Mono, monospace;
          outline: none;
        }
        .lw-bet-go, .lw-bet-cash {
          width: 100%;
          border: 0;
          border-radius: 16px;
          padding: 14px 16px;
          font-weight: 800;
          font-size: 15px;
          letter-spacing: .06em;
          cursor: pointer;
          background: linear-gradient(135deg, #26C6DA, #7E57C2);
          color: #0D111A;
        }
        .lw-bet-go { margin-top: 0; }
        .lw-bet-cash {
          background: linear-gradient(135deg, #26C6DA, #00E676);
        }
        .lw-mini-row {
          display: flex;
          gap: 6px;
          margin-bottom: 10px;
        }
        .lw-mini-row button, .lw-chip-btn {
          flex: 1;
          border: 1px solid rgba(38,198,218,.22);
          background: rgba(13,17,26,.8);
          color: #8eb8d4;
          border-radius: 12px;
          padding: 9px 4px;
          font-weight: 700;
          font-size: 11px;
          line-height: 1.2;
          cursor: pointer;
        }
        .lw-mini-row button.active, .lw-chip-btn.active {
          color: #0D111A;
          background: linear-gradient(135deg, #26C6DA, #80DEEA);
          border-color: transparent;
        }
        #minesRangeInput,
        #minesCountLabel,
        #minesGemsCount,
        #minesCurrentMulti,
        #minesNextMulti { display: none !important; }
        .crash-campers-dock .panel-header,
        .crash-bets-list { display: none !important; }
        #rulesModal {
          z-index: 12000 !important;
        }
        #rulesModal .terminal-modal {
          background: #121620;
          border: 1px solid rgba(38,198,218,.28);
          border-radius: 22px;
        }
        #resultModal { z-index: 13000 !important; }
        #resultModal .lw-result {
          position: relative;
          overflow: hidden;
          background: #121620;
          border: 1px solid rgba(38,198,218,.28);
          border-radius: 24px;
          padding: 26px 20px 20px;
          text-align: center;
          width: min(360px, calc(100vw - 32px));
          animation: lwResultIn .42s cubic-bezier(.2,1.2,.3,1);
        }
        #resultModal .lw-result.win { border-color: rgba(0,230,118,.5); box-shadow: 0 0 32px rgba(0,230,118,.22); }
        #resultModal .lw-result.loss { border-color: rgba(255,82,82,.5); box-shadow: 0 0 32px rgba(255,82,82,.18); }
        #resultModal .lw-result.draw { border-color: rgba(232,184,109,.45); box-shadow: 0 0 28px rgba(232,184,109,.14); }
        .lw-result-burst {
          pointer-events: none;
          position: absolute;
          inset: -40% -20% auto;
          height: 140px;
          opacity: 0;
        }
        #resultModal .lw-result.win .lw-result-burst {
          opacity: 1;
          background: radial-gradient(ellipse at center, rgba(0,230,118,.28), transparent 70%);
          animation: lwBurst .8s ease-out;
        }
        .lw-result-icon { font-size: 44px; margin-bottom: 6px; display: inline-block; }
        #resultModal .lw-result.win .lw-result-icon { animation: lwPop .55s cubic-bezier(.2,1.4,.3,1); }
        #resultModalTitle {
          letter-spacing: .12em;
          margin: 0;
          font-size: 13px;
          text-transform: uppercase;
          color: #8eb8d4;
          font-weight: 700;
        }
        .lw-result-amount {
          margin: 8px 0 4px;
          font-family: JetBrains Mono, monospace;
          font-size: 40px;
          font-weight: 800;
          letter-spacing: .02em;
          line-height: 1.1;
          color: #fff;
        }
        #resultModal .lw-result.win .lw-result-amount { color: #69f0ae; text-shadow: 0 0 18px rgba(0,230,118,.45); }
        #resultModal .lw-result.loss .lw-result-amount { color: #ff8a9b; }
        #resultModal .lw-result.draw .lw-result-amount { color: #E8B86D; }
        .lw-result-multi {
          display: none;
          margin: 0 auto 8px;
          width: fit-content;
          padding: 4px 10px;
          border-radius: 999px;
          font-family: JetBrains Mono, monospace;
          font-size: 14px;
          font-weight: 800;
          color: #22D3EE;
          background: rgba(34,211,238,.12);
          border: 1px solid rgba(34,211,238,.3);
        }
        .lw-result-multi.on { display: inline-block; }
        #resultModalText, .lw-result-sub {
          font-size: 13px;
          line-height: 1.35;
          color: #6b7c8d;
          margin: 4px 0 0;
          min-height: 0;
        }
        @keyframes lwResultIn {
          from { transform: translateY(18px) scale(.92); opacity: 0; }
          to { transform: none; opacity: 1; }
        }
        @keyframes lwPop {
          0% { transform: scale(.4); }
          70% { transform: scale(1.18); }
          100% { transform: scale(1); }
        }
        @keyframes lwBurst {
          from { opacity: .9; transform: scale(.6); }
          to { opacity: 0; transform: scale(1.4); }
        }
        @keyframes lwChipPulse {
          0% { transform: scale(1); }
          40% { transform: scale(1.08); box-shadow: 0 0 18px rgba(0,230,118,.55); }
          100% { transform: scale(1); }
        }
        #lwPearlsChip.lw-chip-pulse { animation: lwChipPulse .55s ease; }
        .lw-pearl-delta {
          position: absolute;
          right: 18px;
          top: calc(8px + var(--tg-content-safe-area-inset-top, 0px));
          z-index: 9001;
          pointer-events: none;
          font-family: JetBrains Mono, monospace;
          font-weight: 800;
          font-size: 14px;
          color: #69f0ae;
          text-shadow: 0 0 10px rgba(0,230,118,.6);
          opacity: 0;
        }
        .lw-pearl-delta.on {
          animation: lwDeltaFly .9s ease-out forwards;
        }
        @keyframes lwDeltaFly {
          0% { opacity: 0; transform: translateY(8px); }
          20% { opacity: 1; }
          100% { opacity: 0; transform: translateY(-18px); }
        }
        #resultOkBtn, #rulesGotItBtn {
          width: 100%;
          border: 0;
          border-radius: 16px;
          padding: 16px;
          font-weight: 800;
          font-size: 16px;
          letter-spacing: .04em;
          cursor: pointer;
          background: linear-gradient(135deg, #26C6DA, #7E57C2);
          color: #0D111A;
          margin-top: 18px;
        }
        #lootboxReel { display: none; }
        #view-lootbox .lw-play.lootbox-layout {
          height: calc(100dvh - 148px) !important;
          overflow: hidden;
        }
        #view-lootbox.spinning #lootboxPick { display: none !important; }
        #view-lootbox.spinning #lootboxReel {
          display: flex !important;
          flex: 1 1 auto;
          min-height: 0;
          width: 100%;
          align-items: center;
          justify-content: center;
          overflow: hidden;
        }
        #view-lootbox.spinning .csgo-carousel-wrapper {
          width: min(240px, 82vw);
          height: 100%;
          max-height: 100%;
          max-width: none;
        }
        .csgo-item-card.csgo-winner {
          box-shadow: 0 0 0 2px #26C6DA, 0 0 22px rgba(38,198,218,.5);
          border-bottom-color: #26C6DA;
          z-index: 12;
        }
        .toast-container {
          z-index: 12500 !important;
          bottom: 110px !important;
          left: 16px !important;
          right: 16px !important;
        }
        .case-tier-selector { gap: 10px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
        .case-tier-card { min-width: 0; width: auto; padding: 16px 8px 14px; }

        /* WAVE arcade — playground catalog */
        .wave-mode {
          display: flex;
          gap: 6px;
          margin: 0 0 14px;
          padding: 4px;
          border-radius: 16px;
          background: rgba(13, 17, 26, .55);
          border: 1px solid rgba(39, 230, 236, .18);
          position: relative;
          z-index: 2;
        }
        .wave-mode-btn {
          flex: 1;
          border: 0;
          border-radius: 12px;
          padding: 12px 10px;
          font-weight: 800;
          font-size: 15px;
          letter-spacing: .06em;
          text-transform: uppercase;
          cursor: pointer;
          background: transparent;
          color: var(--text-muted);
          font-family: var(--font-sans);
        }
        .wave-mode-btn.on {
          background: linear-gradient(135deg, #26C6DA, #7E57C2);
          color: #0D111A;
        }
        .wave-duelbar {
          margin: 0 0 16px;
          padding: 0;
          border: 0;
          background: transparent;
        }
        .wave-room-cta {
          width: 100%;
          display: block;
          flex: none;
          min-width: 0;
          border-radius: 16px;
          padding: 14px 18px;
          font-weight: 800;
          letter-spacing: .08em;
          text-transform: uppercase;
        }
        .wave-duel-mini {
          margin: 10px 2px 0;
          color: var(--text-muted);
          font-size: 13px;
          line-height: 1.4;
        }
        .wave-duel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
        .wave-duel-actions .wave-go,
        .wave-duel-actions .wave-chip {
          width: 100%;
          min-height: 52px;
          font-size: 17px;
        }
        .wave-duel-join { display: flex; gap: 8px; margin-top: 0; }
        .wave-duel-join[hidden] { display: none !important; }
        .wave-pick { display: grid; gap: 12px; }
        .wave-panel.wave-room-panel {
          max-width: none;
          width: 100%;
          flex: 1;
          min-height: 0;
          background: transparent;
          border: 0;
          box-shadow: none;
          padding: 0;
          margin: 0;
          display: flex;
          flex-direction: column;
        }
        .wave-room-fill {
          flex: 1;
          min-height: 0;
          width: 100%;
          display: flex;
          flex-direction: column;
          gap: 12px;
        }
        .wave-pick.wave-room-fill {
          display: grid;
          grid-template-rows: 1fr 1fr;
          gap: 12px;
        }
        .wave-room-wait { justify-content: stretch; }
        .wave-room-status {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          text-align: center;
          font-size: clamp(22px, 7vw, 34px);
          font-weight: 800;
          letter-spacing: .02em;
          line-height: 1.3;
          padding: 16px 8px;
        }
        .wave-room-wait .wave-duel-actions {
          grid-template-columns: 1fr;
        }
        .wave-room-closed .wave-pick-card {
          flex: 1;
          justify-content: center;
        }
        .wave-pick-card {
          display: flex;
          flex-direction: column;
          justify-content: center;
          width: 100%;
          min-height: 0;
          text-align: left;
          border: 1px solid rgba(90,165,205,.28);
          border-radius: 20px;
          padding: 28px 22px;
          cursor: pointer;
          background: linear-gradient(160deg, rgba(30,83,110,.7), rgba(18,39,56,.96));
          color: #F4FBFF;
          font-family: var(--font-sans);
        }
        .wave-pick-card.on,
        .wave-pick-card:active {
          border-color: rgba(38,198,218,.5);
        }
        .wave-pick-card h3 {
          margin: 0 0 10px;
          font-size: clamp(22px, 6vw, 30px);
          letter-spacing: .04em;
          color: #fff;
        }
        .wave-pick-card p {
          margin: 0;
          color: rgba(186, 214, 228, .88);
          font-size: 16px;
          line-height: 1.45;
        }
        .wave-pick-back {
          display: inline-flex;
          margin-bottom: 12px;
          border: 0;
          background: transparent;
          color: var(--text-muted);
          font: 700 13px var(--font-sans);
          letter-spacing: .04em;
          cursor: pointer;
          padding: 0;
        }
        body.tg-mode #duelRoomBack,
        body.lw-ingame #duelRoomBack { display: none !important; }
        #view-duel-room {
          overflow-y: auto;
          padding-bottom: 28px;
        }
        .wave-codein {
          flex: 1;
          min-width: 0;
          min-height: 56px;
          background: rgba(13,17,26,.85);
          border: 1px solid rgba(90,165,205,.28);
          border-radius: 16px;
          color: #fff;
          font: 700 20px var(--font-mono);
          letter-spacing: .2em;
          text-transform: uppercase;
          text-align: center;
          padding: 14px 16px;
          outline: none;
        }
        .wave-room {
          display: flex;
          align-items: center;
          gap: 8px;
          flex-wrap: wrap;
          margin-top: 10px;
        }
        .wave-room span { color: var(--text-muted); font-size: 12px; }
        .wave-room b {
          font-family: var(--font-mono);
          font-size: 22px;
          letter-spacing: .18em;
          color: var(--neon);
        }
        .wave-lede { display: none !important; }
        #view-hub .games-hub-grid,
        .games-hub-grid[hidden] {
          display: none !important;
        }
        .wave-lede b { color: var(--neon); font-weight: 700; }
        .wave-hub-grid {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
          gap: 12px;
          padding-bottom: 24px;
        }
        .wave-card {
          background: linear-gradient(160deg, rgba(30,83,110,.55), rgba(26,51,74,.85) 55%, rgba(18,39,56,.95));
          border: 1px solid rgba(90,165,205,.22);
          border-radius: 16px;
          padding: 14px;
          min-height: 148px;
          cursor: pointer;
          position: relative;
          overflow: hidden;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          box-shadow: 0 10px 28px rgba(8,20,32,.35);
          transition: transform .22s ease, border-color .22s, box-shadow .22s;
        }
        .wave-card::before {
          content: "";
          position: absolute; left: 0; right: 0; top: 0; height: 2px;
          background: linear-gradient(90deg, transparent, #27E6EC, #6F71A1, transparent);
        }
        .wave-card:hover, .wave-card:active {
          transform: translateY(-3px);
          border-color: rgba(39,230,236,.5);
        }
        .wave-badge {
          font-family: var(--font-mono);
          font-size: 10px;
          color: var(--neon);
          letter-spacing: .4px;
        }
        .wave-card h3 { font-size: 16px; font-weight: 700; margin-top: 8px; }
        .wave-card p { color: var(--text-muted); font-size: 12px; line-height: 1.3; margin-top: 4px; }
        .wave-card footer {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-top: 12px;
          padding-top: 8px;
          border-top: 1px solid rgba(90,165,205,.18);
          font-size: 11px;
          color: var(--text-muted);
        }
        .wave-card footer b { color: var(--neon); font-family: var(--font-mono); font-weight: 500; }
        #view-wave {
          overflow-y: auto;
          padding-bottom: 28px;
        }
        .wave-game-top {
          display: flex;
          align-items: center;
          gap: 10px;
          margin-bottom: 10px;
        }
        .wave-game-top h2 {
          font-family: var(--font-serif);
          font-size: 20px;
          flex: 1;
          letter-spacing: .04em;
        }
        .wave-hint {
          display: none !important;
        }
        .wave-odds:empty,
        .wave-log:empty {
          display: none;
        }
        .wave-panel {
          background: rgba(18,39,56,.72);
          border: 1px solid rgba(39,230,236,.16);
          border-radius: 18px;
          padding: 16px;
          box-shadow: 0 8px 28px rgba(8,20,32,.4);
          position: relative;
          width: 100%;
          max-width: 560px;
          margin: 0 auto;
        }
        .wave-betbar {
          display: flex;
          flex-direction: column;
          align-items: stretch;
          gap: 10px;
          margin-top: 14px;
        }
        .wave-betbar .lw-bet-row { margin-bottom: 0; }
        .wave-bet-actions {
          display: flex;
          gap: 8px;
        }
        .wave-bet-actions .wave-go {
          flex: 1;
          min-width: 0;
          width: auto;
        }
        .wave-chips { display: flex; gap: 6px; flex-wrap: wrap; }
        .wave-chip, .wave-go {
          border: 1px solid rgba(38,198,218,.22);
          background: rgba(13,17,26,.8);
          color: var(--text-soft);
          border-radius: 12px;
          padding: 9px 12px;
          font-weight: 700;
          cursor: pointer;
          font-family: var(--font-sans);
        }
        .wave-chip.on {
          background: linear-gradient(135deg, #26C6DA, #80DEEA);
          color: #0D111A;
          border-color: transparent;
        }
        .wave-betin {
          display: flex;
          align-items: center;
          gap: 6px;
          background: rgba(13,17,26,.85);
          border: 1px solid rgba(90,165,205,.28);
          border-radius: 12px;
          padding: 0 10px;
          min-width: 120px;
        }
        .wave-betin input {
          width: 88px;
          background: 0;
          border: 0;
          color: #fff;
          font: 700 16px var(--font-mono);
          outline: none;
          padding: 10px 0;
        }
        .wave-go {
          touch-action: manipulation;
          background: linear-gradient(135deg, #26C6DA, #7E57C2);
          color: #0D111A;
          border: 0;
          padding: 12px 18px;
          border-radius: 14px;
          letter-spacing: .04em;
          flex: 1;
          min-width: 110px;
        }
        .wave-go.cash { background: linear-gradient(135deg, #26C6DA, #00E676); }
        .wave-go:disabled, .wave-chip:disabled { opacity: .45; pointer-events: none; }
        .wave-go:active, .wave-chip:active { transform: scale(.96); }
        .wave-big {
          font-family: var(--font-serif);
          font-size: 42px;
          letter-spacing: 1px;
          text-align: center;
          background: linear-gradient(90deg, #fff, #27E6EC);
          -webkit-background-clip: text;
          background-clip: text;
          -webkit-text-fill-color: transparent;
        }
        .wave-log, .wave-odds {
          font-family: var(--font-mono);
          font-size: 13px;
          color: var(--neon);
          min-height: 20px;
          text-align: center;
          margin-top: 8px;
        }
        .wave-log { color: var(--text-muted); }
        .wave-pcard {
          width: 72px;
          height: 96px;
          margin: 8px auto;
          border-radius: 12px;
          background: #eaf6fb;
          color: #122738;
          display: grid;
          place-items: center;
          font-weight: 800;
          font-size: 22px;
          animation: waveDealin .35s cubic-bezier(.2,.85,.2,1);
        }
        .wave-pcard.red { color: #c6284a; }
        .wave-pcard.still { animation: none; }
        .wave-pcard.flip { animation: waveFlip .45s ease; }
        .wave-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
        .wave-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .wave-door {
          min-height: 88px;
          font-size: 28px;
          border-radius: 16px;
          border: 1px solid rgba(39,230,236,.2);
          background: rgba(13,17,26,.7);
          color: #eaf6fb;
          cursor: pointer;
        }
        .wave-door span { display: block; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
        .wave-door.good {
          box-shadow: 0 0 18px rgba(39,230,236,.45);
          background: rgba(39,230,236,.2);
          animation: waveDoorwin .45s ease;
        }
        .wave-door.bad { animation: waveShake .45s ease; background: rgba(255,107,138,.22); }
        .wave-scratch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; perspective: 640px; }
        .wave-scratch button {
          min-height: 70px;
          font-size: 28px;
          border-radius: 14px;
          border: 1px solid rgba(39,230,236,.2);
          background: rgba(13,17,26,.75);
          color: #eaf6fb;
          transition: transform .38s ease, filter .35s;
          transform-style: preserve-3d;
        }
        .wave-scratch button.open { transform: rotateY(180deg); filter: brightness(1.15); }
        .wave-big.tick { animation: waveHudpop .35s ease; }
        .wave-cascade { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: relative; }
        .wave-cascade-hud { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
        .wave-hud-chip {
          font-family: var(--font-mono);
          font-size: 12px;
          letter-spacing: .04em;
          padding: 6px 12px;
          border-radius: 999px;
          border: 1px solid rgba(39,230,236,.28);
          color: #27E6EC;
          background: rgba(13,17,26,.55);
        }
        .wave-hud-chip.pulse { animation: waveHudpop .35s ease; }
        .c-cell {
          aspect-ratio: 1;
          min-height: 48px;
          border-radius: 14px;
          background: rgba(13,17,26,.82);
          border: 1px solid rgba(39,230,236,.16);
          display: grid;
          place-items: center;
          overflow: hidden;
          position: relative;
          transition: background .25s, border-color .25s, box-shadow .25s, opacity .25s;
        }
        .c-cell span { font-size: 24px; line-height: 1; display: block; }
        .c-cell.spin { background: rgba(39,230,236,.06); }
        .c-cell.spin span { animation: waveCspin .11s linear infinite; }
        .c-cell.glow {
          background: rgba(39,230,236,.22);
          border-color: #27E6EC;
          box-shadow: 0 0 22px rgba(39,230,236,.6), inset 0 0 18px rgba(39,230,236,.2);
          animation: waveGlowpulse .5s ease infinite;
          z-index: 1;
        }
        .c-cell.glow span { transform: scale(1.12); }
        .c-cell.boom { background: rgba(255,107,138,.28); border-color: #ff6b8a; }
        .c-cell.boom span { animation: waveCboom .48s cubic-bezier(.2,.8,.2,1) forwards; }
        .c-cell.drop span { animation: waveCdrop .5s cubic-bezier(.2,.85,.2,1); }
        .c-cell.fall-1 span { animation: waveFall1 .38s cubic-bezier(.2,.9,.2,1.1); }
        .c-cell.fall-2 span { animation: waveFall2 .46s cubic-bezier(.2,.9,.2,1.1); }
        .c-cell.fall-3 span { animation: waveFall3 .54s cubic-bezier(.2,.9,.2,1.1); }
        .c-cell.empty { opacity: .22; background: rgba(8,16,24,.5); }
        .c-cell.empty span { opacity: 0; }
        .wave-fx-float {
          position: absolute;
          z-index: 6;
          pointer-events: none;
          font-family: var(--font-mono);
          font-weight: 700;
          font-size: 16px;
          color: #27E6EC;
          text-shadow: 0 0 12px rgba(39,230,236,.55);
          animation: waveFxfloat .8s ease forwards;
          transform: translateX(-50%);
        }
        .wave-bubble-wrap {
          height: 220px;
          display: grid;
          place-items: center;
          position: relative;
          overflow: visible;
        }
        .wave-bubble {
          width: 78px;
          height: 78px;
          border-radius: 50%;
          background: radial-gradient(circle at 35% 30%, #fff, #27E6EC 42%, #5E35B1);
          box-shadow: 0 0 28px rgba(39,230,236,.5), 0 0 48px rgba(126,87,194,.28);
          transition: transform .12s cubic-bezier(.2,.8,.2,1), box-shadow .2s, opacity .3s;
        }
        .wave-bubble.pop { animation: waveBubpop .5s ease forwards; }
        .wave-bubble-wrap.shake { animation: waveShake .45s ease; }
        .wave-burst, .wave-burst-flash, .wave-shock {
          position: absolute;
          inset: 0;
          pointer-events: none;
        }
        .wave-burst-flash {
          background: radial-gradient(circle, rgba(255,255,255,.72), rgba(39,230,236,.35) 28%, transparent 68%);
          animation: waveFlash .42s ease forwards;
        }
        .wave-shock {
          left: 50%;
          top: 50%;
          width: 40px;
          height: 40px;
          margin: -20px 0 0 -20px;
          border-radius: 50%;
          border: 3px solid rgba(39,230,236,.85);
          animation: waveShock .7s cubic-bezier(.12,.8,.2,1) forwards;
        }
        .wave-burst i {
          position: absolute;
          left: 50%;
          top: 50%;
          width: var(--s, 8px);
          height: var(--s, 8px);
          margin: calc(var(--s, 8px) / -2);
          border-radius: 50%;
          background: radial-gradient(circle, #fff, #27E6EC 40%, #7E57C2);
          box-shadow: 0 0 8px rgba(39,230,236,.8);
          animation: waveShard .72s ease-out forwards;
          animation-delay: var(--delay, 0s);
        }
        .wave-tank {
          position: relative;
          height: 200px;
          border-radius: 16px;
          overflow: hidden;
          background: radial-gradient(ellipse at 50% 120%, rgba(39,230,236,.22), rgba(13,17,26,.88));
          border: 1px solid rgba(39,230,236,.2);
        }
        .wave-fish {
          position: absolute;
          width: 48px;
          height: 48px;
          margin: 0;
          padding: 0;
          display: grid;
          place-items: center;
          font-size: 32px;
          line-height: 1;
          background: transparent;
          border: 0;
          cursor: pointer;
          z-index: 2;
          color: #fff;
          -webkit-text-fill-color: #fff;
          left: 0;
          top: 0;
          text-shadow: 0 0 10px rgba(39,230,236,.45);
          touch-action: manipulation;
          user-select: none;
          will-change: transform;
        }
        .wave-fish.catch { animation: waveFishpop .32s ease forwards; pointer-events: none; will-change: auto; }
        .wave-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; }
        .wave-pad {
          min-height: 52px;
          border-radius: 12px;
          border: 1px solid rgba(39,230,236,.22);
          background: rgba(13,17,26,.75);
          color: #eaf6fb;
          font-weight: 800;
          cursor: pointer;
          transition: background .2s, box-shadow .25s, transform .2s, color .2s;
        }
        .wave-pad.on { background: linear-gradient(135deg, #26C6DA, #7E57C2); color: #0D111A; }
        .wave-pad.zap { box-shadow: 0 0 18px #27E6EC; outline: 2px solid #27E6EC; }
        .wave-pad.win { background: #27E6EC; color: #0D111A; }
        .wave-zap-flash {
          pointer-events: none;
          position: absolute;
          inset: -6px;
          border-radius: 18px;
          background: radial-gradient(circle, rgba(39,230,236,.35), transparent 70%);
          animation: waveFlash .4s ease forwards;
          z-index: 3;
        }
        .wave-pointer {
          width: 0;
          height: 0;
          border-left: 10px solid transparent;
          border-right: 10px solid transparent;
          border-top: 16px solid #27E6EC;
          margin: 0 auto -8px;
          position: relative;
          z-index: 2;
        }
        .wave-vortex {
          display: flex;
          flex-direction: column;
          align-items: center;
          margin: 4px 0 10px;
        }
        #wVcan {
          display: block;
          width: min(72vw, 280px);
          height: min(72vw, 280px);
          margin: 0 auto;
          transform-origin: 50% 50%;
          border-radius: 50%;
          background: #121620;
          box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 14px 32px rgba(8,12,20,.4);
        }
        #wVcan.spin { animation: waveWheel 4s cubic-bezier(.15,.75,.1,1) forwards; will-change: transform; }
        .wave-vstakes {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 8px;
          width: min(100%, 320px);
          margin: 0 auto 8px;
        }
        .wave-vstake {
          border-radius: 14px;
          padding: 10px 12px;
          text-align: center;
          background: rgba(8, 12, 20, .38);
          border: 1px solid rgba(255,255,255,.08);
        }
        .wave-vstake span {
          display: block;
          font-size: 12px;
          letter-spacing: .04em;
          color: var(--text-soft, #b7c2d6);
        }
        .wave-vstake b {
          display: block;
          margin-top: 4px;
          font-size: 18px;
          font-family: var(--font-mono);
        }
        .wave-vstake.on { border-color: rgba(38, 198, 218, .45); }
        .wave-vstake.win { border-color: #26C6DA; box-shadow: 0 0 16px rgba(38,198,218,.25); }
        .wave-target {
          width: 220px;
          height: 220px;
          margin: 10px auto;
          border-radius: 50%;
          background: radial-gradient(circle, rgba(39,230,236,.35) 0 18%, rgba(126,87,194,.25) 18% 42%, rgba(18,39,56,.8) 42% 70%, rgba(39,230,236,.12) 70% 100%);
          position: relative;
          border: 1px solid rgba(39,230,236,.3);
        }
        .wave-target .mark {
          position: absolute;
          left: 50%;
          top: 50%;
          width: 14px;
          height: 14px;
          margin: -7px 0 0 -7px;
          border-radius: 50%;
          background: #27E6EC;
          box-shadow: 0 0 12px #27E6EC;
          z-index: 2;
        }
        .wave-needle {
          position: absolute;
          left: 50%;
          top: 50%;
          width: 4px;
          height: 96px;
          margin: -96px 0 0 -2px;
          background: #27E6EC;
          transform-origin: bottom center;
          border-radius: 4px;
          box-shadow: 0 0 10px rgba(39,230,236,.7);
        }
        .wave-board-grid { max-width: 360px; gap: 8px; }
        .wave-board-grid .mine-tile { font-size: 22px; border-radius: 12px; cursor: default; }
        .wave-board-grid .mine-tile.can { cursor: pointer; }
        .wave-board-grid .mine-tile:not(.can):hover { transform: none; }
        .wave-board-grid .mine-tile.pending { transform: scale(.92); opacity: .7; }
        .wave-board-grid .mine-tile.revealed-gem.by-foe {
          border-color: #7E57C2;
          box-shadow: 0 0 14px rgba(126,87,194,.45);
          filter: hue-rotate(40deg);
        }
        .wave-board-turn {
          width: fit-content;
          margin: 0 auto 12px;
          padding: 7px 16px;
          border-radius: 999px;
          border: 1px solid rgba(38,198,218,.2);
          font: 700 12px var(--font-mono);
          letter-spacing: .1em;
          text-transform: uppercase;
          color: var(--text-muted);
          transition: background .2s, color .2s, border-color .2s;
        }
        .wave-board-turn:empty { display: none; }
        .wave-board-turn.me { color: #0D111A; background: linear-gradient(135deg, #26C6DA, #00B0FF); border-color: transparent; }
        .wave-board-turn.foe { color: #D1C4E9; background: rgba(94,53,177,.18); border-color: rgba(126,87,194,.5); }
        .wave-board-setup { margin-top: 14px; }
        .wave-board-live .wave-board-setup,
        .wave-board-live .wave-betbar { display: none; }
        .wave-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 0 auto; }
        .wave-grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 300px; margin: 0 auto; }
        .wave-mines-row {
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 10px;
          flex-wrap: wrap;
          margin: 0 0 12px;
        }
        .wave-mines-lab {
          font-size: 12px;
          letter-spacing: .04em;
          color: var(--text-soft, #9bb4c4);
          text-transform: uppercase;
        }
        .wave-grid5 .wave-cell {
          min-width: 0;
          min-height: 48px;
          font-size: 15px;
        }
        .wave-cell {
          min-width: 44px;
          min-height: 56px;
          border-radius: 12px;
          border: 1px solid rgba(39,230,236,.2);
          background: rgba(13,17,26,.7);
          color: #eaf6fb;
          font-weight: 700;
          cursor: pointer;
        }
        .wave-cell.hit { background: rgba(39,230,236,.25); border-color: var(--neon); animation: waveDoorwin .4s ease; }
        .wave-cell.miss { opacity: .45; }
        .wave-cell.scan { box-shadow: 0 0 16px rgba(39,230,236,.55); border-color: #27E6EC; }
        .wave-vs {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          margin-bottom: 14px;
        }
        .wave-vs span {
          flex: 1;
          text-align: center;
          background: rgba(26,51,74,.6);
          border-radius: 14px;
          padding: 10px;
          border: 1px solid rgba(39,230,236,.15);
        }
        .wave-bomb {
          width: 110px;
          height: 110px;
          margin: 8px auto;
          border-radius: 50%;
          display: grid;
          place-items: center;
          font-size: 40px;
          background: radial-gradient(circle at 40% 35%, #ffd0da, #ff6b8a 55%, #5E35B1);
          animation: wavePulse .8s infinite;
        }
        .wave-bomb.hot { animation: waveShake .35s ease infinite; }
        .wave-bomb.boom { animation: waveBubpop .5s ease forwards; }
        .wave-count {
          position: absolute;
          inset: 0;
          z-index: 8;
          display: grid;
          place-items: center;
          background: rgba(8, 14, 24, .78);
          border-radius: 18px;
        }
        .wave-count span {
          font-family: var(--font-mono);
          font-size: 84px;
          font-weight: 700;
          letter-spacing: .08em;
          line-height: 1;
          background: linear-gradient(135deg, #26C6DA, #7E57C2);
          -webkit-background-clip: text;
          background-clip: text;
          color: transparent;
          animation: waveCountpop .55s cubic-bezier(.2, 1.4, .3, 1);
        }
        .wave-count span.go {
          font-size: 56px;
          letter-spacing: .28em;
          color: #27E6EC;
          -webkit-text-fill-color: #27E6EC;
          background: none;
        }
        @keyframes waveDealin { from { transform: translateY(-16px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
        @keyframes waveFlip {
          0% { transform: rotateY(0); }
          50% { transform: rotateY(90deg); }
          100% { transform: rotateY(0); }
        }
        @keyframes waveShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
        @keyframes waveCspin { 0% { transform: translateY(-90%); opacity: .35; } 100% { transform: translateY(90%); opacity: .95; } }
        @keyframes waveCdrop {
          0% { transform: translateY(-130%); opacity: 0; }
          72% { transform: translateY(10%); opacity: 1; }
          100% { transform: none; }
        }
        @keyframes waveCboom {
          0% { transform: scale(1); }
          30% { transform: scale(1.42); filter: brightness(1.7); }
          100% { transform: scale(0); opacity: 0; }
        }
        @keyframes waveGlowpulse { 50% { box-shadow: 0 0 30px rgba(39,230,236,.9), inset 0 0 22px rgba(39,230,236,.28); } }
        @keyframes waveFall1 { from { transform: translateY(-100%); } to { transform: none; } }
        @keyframes waveFall2 { from { transform: translateY(-200%); } to { transform: none; } }
        @keyframes waveFall3 { from { transform: translateY(-300%); } to { transform: none; } }
        @keyframes waveHudpop { 50% { transform: scale(1.12); border-color: #27E6EC; } }
        @keyframes waveFxfloat {
          0% { opacity: 0; transform: translate(-50%, 8px); }
          18% { opacity: 1; }
          100% { opacity: 0; transform: translate(-50%, -28px); }
        }
        @keyframes waveDoorwin { 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
        @keyframes waveWheel { to { transform: rotate(var(--spin, 2160deg)); } }
        @keyframes waveBubpop {
          0% { transform: scale(1.2); }
          35% { transform: scale(1.7); filter: brightness(1.55); }
          100% { transform: scale(.12); opacity: 0; }
        }
        @keyframes waveFlash { from { opacity: 1; } to { opacity: 0; } }
        @keyframes waveShock {
          from { transform: scale(.4); opacity: 1; }
          to { transform: scale(6.4); opacity: 0; }
        }
        @keyframes waveShard {
          0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; }
          100% { transform: rotate(var(--a)) translateY(calc(var(--d, 90px) * -1)) scale(.15); opacity: 0; }
        }
        @keyframes waveFishpop {
          0% { transform: scale(1); }
          40% { transform: scale(1.45); filter: brightness(1.5); }
          100% { transform: scale(.15); opacity: 0; }
        }
        @keyframes wavePulse { 50% { transform: scale(1.12); opacity: .85; } }
        @keyframes waveCountpop {
          0% { transform: scale(.42); opacity: 0; }
          55% { transform: scale(1.12); opacity: 1; }
          100% { transform: scale(1); }
        }
        .wave-wait-banner {
          margin: 10px 0 0;
          text-align: center;
          font-size: 14px;
          letter-spacing: .04em;
          color: var(--lw-cyan, #26C6DA);
        }
        .lw-join-note {
          position: fixed;
          left: 16px;
          right: 16px;
          bottom: calc(var(--lw-tabbar-h, 50px) + 12px);
          z-index: 12000;
          max-width: 420px;
          margin: 0 auto;
          padding: 14px 18px;
          border-radius: 18px;
          text-align: center;
          font-size: 15px;
          font-weight: 600;
          letter-spacing: .02em;
          color: #e8f4ff;
          background: linear-gradient(180deg, rgba(22, 28, 42, .96), rgba(13, 17, 26, .98));
          border: 1px solid rgba(38, 198, 218, .35);
          box-shadow: 0 12px 32px rgba(8, 12, 22, .55);
          transform: translateY(140%);
          opacity: 0;
          pointer-events: none;
          transition: transform .38s cubic-bezier(.2, .85, .2, 1), opacity .38s ease;
        }
        .lw-join-note.on {
          transform: translateY(0);
          opacity: 1;
        }
        @media (max-width: 520px) {
          .wave-hub-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
          .wave-card { min-height: 132px; padding: 12px; }
        }

        /* Phones: blur, animated shadows and CSS filters are repainted every frame by mobile GPUs. */
        @media (hover: none) and (pointer: coarse) {
          *, *::before, *::after {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
          }
          header.terminal-header { background: rgba(18, 39, 56, 0.97); }
          .terminal-panel { background: var(--panel-bg-alt); }
          .modal-backdrop { background: rgba(8, 18, 28, 0.94); }
          .toast-item { background-color: rgba(18, 30, 44, 0.97); }
          .terminal-grid-overlay { display: none; }
          .jackpot-pill,
          .crash-cashout-main,
          .c-cell.glow { animation: none; }
          .wave-card, .game-card { transition: transform .2s ease, opacity .2s ease; }
          html .mine-tile.revealed-gem,
          html[data-theme] .mine-tile.revealed-gem,
          html .mine-tile.revealed-mine,
          html[data-theme] .mine-tile.revealed-mine,
          html .mine-tile.faded,
          html[data-theme] .mine-tile.faded,
          .mine-tile.revealed-gem::before,
          .wave-board-grid .mine-tile.revealed-gem.by-foe,
          .wave-scratch button.open { filter: none !important; }
          .wave-board-grid .mine-tile.revealed-gem.by-foe { background: rgba(94, 53, 177, .35) !important; }
          .mine-tile:hover:not(.revealed-gem):not(.revealed-mine) { transform: none; }
        }
