/* =====================================================
   FETAN GAMES - Premium Gaming Platform Styles
   Ethiopia's Premier Gaming & Sports Betting Platform
   ===================================================== */

/* ===== CSS Reset & Variables ===== */
@import url('https://fonts.googleapis.com/css2?family=Menbere&family=Oswald:wght@200..700&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Colors - Dark Premium Theme */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --bg-card-hover: #1f2a42;
    --bg-elevated: #243049;
    --bg-body: var(--bg-primary);

    /* Accent Colors */
    --accent-primary: #f59e0b;
    --accent-primary-glow: rgba(245, 158, 11, 0.3);
    --accent-secondary: #6366f1;
    --accent-secondary-glow: rgba(99, 102, 241, 0.3);
    --accent-success: #10b981;
    --accent-success-glow: rgba(16, 185, 129, 0.2);
    --accent-danger: #ef4444;
    --accent-danger-glow: rgba(239, 68, 68, 0.2);
    --accent-warning: #f59e0b;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #f59e0b;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706, #f59e0b);
    --gradient-purple: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-dark: linear-gradient(135deg, #1a2236, #0a0e1a);
    --gradient-card: linear-gradient(145deg, rgba(26, 34, 54, 0.9), rgba(17, 24, 39, 0.95));
    --gradient-header: linear-gradient(180deg, #111827 0%, rgba(17, 24, 39, 0) 100%);
    --gradient-casino: linear-gradient(145deg, rgba(26,16,5,0.95), rgba(10,14,26,0.95));
    --gradient-gold-shine: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706, #f59e0b, #fbbf24);

    /* Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(245, 158, 11, 0.3);
    --border-gold: rgba(245, 158, 11, 0.35);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.15);
    --shadow-gold-strong: 0 0 28px rgba(245, 158, 11, 0.25);
    --shadow-inset-gold: inset 0 1px 0 rgba(255,255,255,0.05);

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.15s var(--ease-out);
    --transition-normal: 0.3s var(--ease-out);
    --transition-slow: 0.5s var(--ease-out);

    /* Keno Neon Theme (from keno.html) */
    --bg-color: #030407;
    --panel-bg: #0d0f18;
    --neon-cyan: #00f2fe;
    --neon-gold: #FFD700;
    --neon-purple: #9d00ff;
    --neon-red: #ff1744;
    --neon-green: #00e676;
    --shadow-cyan: 0 0 12px rgba(0, 242, 254, 0.6);
    --shadow-gold: 0 0 15px rgba(255, 215, 0, 0.7);
    --shadow-purple: 0 0 15px rgba(157, 0, 255, 0.7);
    --font-mono: 'Courier New', Courier, monospace;
}

/* ===== GAME GRID NAVIGATION ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 5px 10px;
    max-width: 95%;
    margin: 0 auto;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    min-height: 120px;
    background: rgba(26, 34, 54, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #ffffff;
}

.game-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(31, 42, 66, 0.8);
    color: #fff;
    transform: translateY(-1px);
}

.game-card.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.game-card .game-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.game-card .game-icon-fallback {
    font-size: 28px;
    display: none;
}

.game-card .game-icon:not([src]),
.game-card img[src=""]+.game-icon-fallback,
.game-card img[src="icons/icon-bingo.svg"]+.game-icon-fallback {
    display: inline;
}

.game-card .game-icon[src]:not([src=""]) {
    display: inline;
}

.game-card .game-icon[src]:not([src=""])~.game-icon-fallback {
    display: none;
}

.game-card .game-name {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
}

.game-back-btn {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(26, 34, 54, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #8892b0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.game-back-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

body {
    font-family: 'Menbere', 'Oswald', sans-serif;
    background: linear-gradient(145deg, #0a0e1a 0%, #1a1005 40%, #0a0e1a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
}

.abyssinica-sil-regular {
    font-family: "Abyssinica SIL", serif;
    font-weight: 400;
    font-style: normal;
}

.menbere-400 {
    font-family: "Menbere", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, #4e4c2ce8 0%, #ffc50f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
    flex-direction: column;
    text-align: center;
    transition: opacity 1s ease-out;
}

.vegas-bingo {
    display: flex;
    margin-bottom: 2rem;
}

/* ===== Vegas Bingo Logo Styles ===== */
.vegas-bingo-logo {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    perspective: 1000px;
}

.letter {
    font-family: 'Arial Black', sans-serif;
    /* Thick font for that casino look */
    font-size: 72px;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 0 10px;
    border: 4px solid #fff;
    border-radius: 8px;
    background: #1a1a1a;
    /* Dark backing to make colors pop */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.5);
    animation: bounce-glow 1.5s ease-in-out infinite;
}






.bingo-letter {
    font-family: 'Oswald', sans-serif;
    /* A bold font */
    font-weight: 700;
    font-size: 5rem;
    margin: 0 0.2em;
    position: relative;
    animation: jump 1.5s infinite;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px currentColor, 0 0 30px currentColor;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

/* Letter Colors & Animations */
.bingo-letter.b {
    color: #ff3333;
    background-image: linear-gradient(180deg, #ff8c8c, #ff3333);
    animation-delay: 0s;
}

.bingo-letter.i {
    color: #3377ff;
    background-image: linear-gradient(180deg, #8cb3ff, #3377ff);
    animation-delay: 0.1s;
}

.bingo-letter.n {
    color: #ffcc00;
    background-image: linear-gradient(180deg, #ffee8c, #ffcc00);
    animation-delay: 0.2s;
}

.bingo-letter.g {
    color: #33cc33;
    background-image: linear-gradient(180deg, #8cff8c, #33cc33);
    animation-delay: 0.3s;
}

.bingo-letter.o {
    color: #333;
    background-image: linear-gradient(180deg, #999, #333);
    animation-delay: 0.4s;
}


@keyframes jump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.brand-title,
.good-luck-message {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.brand-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: #ffd700;
    /* Gold */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 10px #ffc400;
    animation-delay: 1.5s;
    /* Appears after BINGO animation starts */
}

.good-luck-message {
    font-family: 'Abyssinica SIL', serif;
    font-size: 1.2rem;
    color: #fff;
    margin-top: 1rem;
    animation-delay: 2s;
    /* Appears after brand title */
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Individual Letter Colors & Neon Glows */
.letter.b {
    color: #ff0000;
    border-color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
    animation-delay: 0.1s;
}

.letter.i {
    color: #0080ff;
    border-color: #0080ff;
    text-shadow: 0 0 10px #0080ff;
    animation-delay: 0.2s;
}

.letter.n {
    color: #ffcc00;
    border-color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00;
    animation-delay: 0.3s;
}

.letter.g {
    color: #00ff00;
    border-color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    animation-delay: 0.4s;
}

.letter.o {
    color: #ffffff;
    border-color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
    background: #000;
    animation-delay: 0.5s;
}

/* Animation: Jumping and Shining */
@keyframes bounce-glow {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }

    50% {
        transform: translateY(-15px) scale(1.1);
        filter: brightness(1.5);
        /* Creates the "flash" effect */
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    }
}

/* Background pulse for the whole screen to keep it dynamic */


/* Enhance the Title to look more "Gold" */
.loading-title {
    font-size: 36px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s var(--ease-out);
}

.loading-logo {
    font-size: 64px;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-title {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.loading-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-status {
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== App Container ===== */
.app {
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 40px;
}

/* ===== Header ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}

.header-text h1 {
    font-size: 16px;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-badge {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.balance-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--gradient-card);
    border: 1px solid var(--border-glow);
    padding: 8px 7px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    transition: var(--transition-fast);
}

.balance-card:active {
    transform: scale(0.97);
}

.balance-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.balance-amount {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary);
}

.header-profile-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    cursor: pointer;
    font-size: 20px;
}

.header-profile-btn:active {
    transform: scale(0.95);
}

/* ===== Main Content ===== */
main {
    padding: 0 8px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s var(--ease-out);
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.refresh-btn:active {
    transform: rotate(180deg);
    background: var(--bg-card-hover);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ===== Match Cards ===== */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 200px;
}

.match-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.match-card:hover {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: var(--shadow-md);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.match-league {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-time {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.team {
    flex: 1;
    text-align: center;
}

.team-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.match-vs {
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.match-odds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.odds-btn {
    padding: 10px 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: inherit;
}

.odds-btn:active {
    transform: scale(0.95);
}

.odds-btn.selected {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.odds-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.odds-value {
    font-size: 18px;
    font-weight: 700;
}

/* ===== Bet Slip ===== */
.bet-slip {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    border-top: 2px solid var(--accent-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
    z-index: 50;
    transition: var(--transition-normal);
}

.bet-slip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
}

.bet-slip-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bet-count {
    background: var(--accent-primary);
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.bet-slip-toggle {
    color: var(--text-muted);
    font-size: 18px;
    transition: transform var(--transition-normal);
}

.bet-slip.collapsed .bet-slip-toggle {
    transform: rotate(180deg);
}

.bet-slip.collapsed .bet-slip-body {
    display: none;
}

.bet-slip-body {
    padding: 0 20px 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.selected-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    animation: fadeIn 0.2s var(--ease-out);
}

.selected-match-info {
    flex: 1;
}

.selected-match-teams {
    font-weight: 600;
    font-size: 12px;
}

.selected-match-pick {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
}

.remove-match {
    background: var(--accent-danger);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
    transition: var(--transition-fast);
}

.remove-match:active {
    transform: scale(0.85);
}

.bet-input-group {
    margin: 16px 0;
}

.bet-input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.bet-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.bet-input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.bet-input-group input::placeholder {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

.bet-summary {
    margin: 12px 0 16px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    color: var(--text-secondary);
}

.summary-row.highlight {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 16px;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border-color);
}

.summary-value {
    font-weight: 700;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-gold);
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    letter-spacing: 0.5px;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ===== Tickets Tab ===== */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ticket-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ticket-status {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.ticket-status.won {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.ticket-status.lost {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.ticket-matches {
    margin-bottom: 12px;
}

.ticket-match-item {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.ticket-match-item:last-child {
    border-bottom: none;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.ticket-stake {
    color: var(--text-secondary);
}

.ticket-potential {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ===== Bingo Lobby (Stake Selection) ===== */
.stake-table-header {
    display: grid;
    grid-template-columns: 70px 1.5fr 60px 80px 70px;
    padding: 14px 10px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    gap: 10px;
}

.stake-table-header>div {
    min-width: 0;
    white-space: nowrap;
}

/* Header alignments to match body */
.stake-table-header .th-stake {
    text-align: left;
}

.stake-table-header .th-status {
    text-align: center;
}

.stake-table-header .th-players {
    text-align: center;
}

.stake-table-header .th-derash {
    text-align: center;
}

.stake-table-header .th-play {
    text-align: right;
}

.stake-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

.stake-row {
    display: grid;
    grid-template-columns: 70px 1.5fr 60px 80px 70px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(26,16,5,0.95), rgba(15,23,42,0.9));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: all 0.2s, transform 0.15s;
    animation: fadeInUp 0.4s var(--ease-out) both;
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
    min-height: 56px;
}

/* Semantic Column Alignments */
.col-stake {
    text-align: left;
}

.col-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-players {
    text-align: center;
}

.col-derash {
    text-align: center;
}

.col-action {
    display: flex;
    justify-content: flex-end;
}

.stake-row:last-child {
    border-radius: var(--radius-md);
}

.stake-row:hover {
    background: linear-gradient(135deg, rgba(26,16,5,0.98), rgba(15,23,42,0.95));
    border-color: rgba(245,158,11,0.65);
    box-shadow: 0 0 24px rgba(245,158,11,0.2), var(--shadow-inset-gold);
    transform: translateY(-1px);
}

.col-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.status-dot.waiting {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.col-players {
    color: var(--text-secondary);
}

.col-derash {
    font-weight: 800;
    color: #fbbf24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    text-shadow: 0 0 6px rgba(245,158,11,0.35);
}

.btn-play-sm {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    color: #000;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(245,158,11,0.5);
    letter-spacing: 0.5px;
}

.btn-open-sm {
    padding: 8px 16px;
    border: 1px solid rgba(245,158,11,0.5);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(245,158,11,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
    letter-spacing: 0.5px;
}

.btn-low-balance-sm {
    padding: 4px 6px;
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 10px;
    font-weight: 700;
    cursor: not-allowed;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.btn-active-sm {
    padding: 4px 8px;
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.9));
    color: #10b981;
    font-size: 10px;
    font-weight: 800;
    cursor: not-allowed;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255,255,255,0.05);
    letter-spacing: 0.5px;
}

.btn-disabled-sm {
    padding: 4px 8px;
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: not-allowed;
}

/* ===== Slot Selection ===== */
.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

/* .countdown-badge {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-primary);
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-full);
    display: inline-block;
} */

.slot-stats-bar {
    display: flex;
    justify-content: space-between;
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.slot-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slot-stat .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.slot-stat .value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Slots Pagination */
.slots-pagination {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
}

.slot-page-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.slot-page-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.slots-grid-container {
    height: 200px;
    /* overflow-y: auto; */
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 5px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
    gap: 4px;
}

.slot-item {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.slot-item:active {
    transform: scale(1.1);
    background: var(--bg-hover);
}



.slot-item.taken:active {
    transform: none;
}

.slot-item.taken {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-danger);
    cursor: not-allowed;
    opacity: 0.7;
}

.slot-item.selected {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--accent-primary-glow);
    z-index: 2;
}

.selection-footer {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border);
}

.selected-info {
    text-align: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.slot-selection-footer {
    background: var(--bg-card);
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.selection-summary {
    margin-bottom: 5px;
    text-align: center;
    font-size: 12px;
}

/* Compact Board Previews */
#board-preview-container {
    margin: 6px 0;
    padding: 8px;
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    border-radius: var(--radius-md);
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
}

.previews-compact {
    display: flex;
    gap: 12px;
    justify-content: center;
    overflow-x: auto;
    padding: 8px 4px;
}

.board-previews {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 120px;
}

.preview-board {
    width: 160px;
    padding: 6px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-md);
    border: 1px solid rgba(245,158,11,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
}

.preview-board h4 {
    font-size: 10px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
}

.preview-cell {
    aspect-ratio: 1;
    background: #0f172a;
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #e2e8f0;
}

/* ===== Bingo Game Area ===== */
.game-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.icon-btn-back {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    border: 1px solid var(--border-gold);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow);
}

.icon-btn-back:hover {
    border-color: var(--accent-primary);
    color: #fff;
}

.game-header-item {
    flex: 1;
    text-align: center;
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-gold);
    min-width: 0;
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
}

.game-header-label {
    display: block;
    font-size: 9px;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
}

.game-header-val {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 6px rgba(245,158,11,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-info-bar {
    display: flex;
    flex: 1;
}

.game-info-item {
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    padding: 6px 4px;
    text-align: center;
    border: 1px solid var(--border-gold);
    flex: 1;
    min-width: 0;
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
}

.game-info-item.highlight {
    background: linear-gradient(180deg, rgba(26,16,5,0.95), rgba(15,23,42,0.9));
    border: 1px solid rgba(245,158,11,0.45);
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 24px rgba(245,158,11,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
}

.game-info-bar.highlight .game-info-item {
    border: none;
    border-right: 1px solid #1e293b;
}

.game-info-bar.highlight .game-info-item:last-child {
    border-right: none;
}

.info-label {
    display: block;
    font-size: 10px;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-value {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.game-countdown-badge {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    padding: 4px 10px;
    background: var(--gradient-gold-shine);
    border-radius: var(--radius-full);
    white-space: nowrap;
    margin-left: 4px;
    box-shadow: 0 0 12px rgba(245,158,11,0.45);
}

/* Split View - Height Matched */
.game-split-view {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-grow: 1;
    min-height: 0;
    /* Fix for flexbox overflow */
}

/* Master Board - Fixed Height */
.master-board-panel {
    flex: 0 0 38%;
    background: linear-gradient(180deg, #1a1005, #0f172a);
    border-radius: var(--radius-md);
    padding: 6px;
    border: 2px solid rgba(245,158,11,0.4);
    box-shadow: 0 0 24px rgba(245,158,11,0.1), inset 0 0 12px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    height: auto;
}

.master-board-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    row-gap: 4px;
    /* Vertical spacing only */
    column-gap: 2px;
    flex-grow: 1;
    /* Allow grid to fill available space */
}

.master-header {
    text-align: center;
    font-weight: 800;
    color: var(--accent-primary);
    font-size: 10px;
    padding: 2px 0;
}

.master-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    font-size: 10px;
    background: #0f172a;
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 4px;
    color: #e2e8f0;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.master-cell.called {
    color: #000;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
    border-color: #fbbf24;
}

.master-cell.blinking {
    animation: blinker 1.2s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.5;
    }
}

/* Player Card Panel - Height Matched to Master Board */
.player-card-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Prevent flexbox overflow issues */
}

.player-card-header {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
}

.status-badge {
    font-size: 11px;
    color: var(--accent-success);
    font-weight: 700;
}

.my-board-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary);
}

.current-call-display {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.last-call-ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.last-call-text {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

.icon-btn-mute {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn-mute:hover {
    opacity: 1;
}

.icon-btn-mute.muted {
    opacity: 0.4;
}

/* Bingo Cards Container - Scrollable within fixed height */
.bingo-card-container {
    flex: 1;
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    border-radius: var(--radius-lg);
    padding: 12px;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow-y: visible;
    position: relative;
    z-index: 1;
}

.placeholder-board {
    /*border: 2px dashed var(--border-color);*/
    /*background: rgba(0,0,0,0.1);*/
    /*display: flex;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    /*color: var(--text-muted);*/
    border: 2px dashed var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    min-height: 180px;
}

.placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Clear Separation Between Boards */
.board-stack-item {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-md);
    padding: 10px;
    border: 1px solid rgba(245,158,11,0.3);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    margin-bottom: 10px;
}

.board-stack-item:last-child {
    margin-bottom: 0;
}

.board-stack-label {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 6px;
    padding: 4px;
    background: linear-gradient(90deg, rgba(245,158,11,0.15), transparent);
    border-bottom: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-sm);
}

.bingo-card-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.bingo-card-header span {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-primary);
}

.bingo-card {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
}

.bingo-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition-fast);
    cursor: pointer;
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.bingo-cell.marked {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
    color: #000;
    border-color: #fbbf24;
}

.bingo-cell.free-space {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(245,158,11,0.5);
}

/* BINGO Shout Button - Placed Below Split View */
.bingo-shout-container {
    margin: 8px 0;
}

.bingo-shout-btn {
    /*width: 100%;*/
    /*padding: 12px;*/
    /*background: var(--accent-danger);*/
    /*color: white;*/
    /*border: none;*/
    /*border-radius: var(--radius-md);*/
    /*font-size: 16px;*/
    /*font-weight: 800;*/
    /*cursor: pointer;*/
    /*box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);*/
    /*transition: var(--transition-fast);*/
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: 2px solid rgba(245,158,11,0.5);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(239,68,68,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* .bingo-shout-btn:active:not(:disabled) {
    transform: scale(0.98);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
} */

.bingo-shout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-elevated);
}

.bingo-shout-btn:active {
    transform: scale(0.98);
}



/* Fixed Bottom Actions */
.bingo-footer-actions-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: var(--bg-body);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.bingo-game-area {
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    position: relative;
}

.bingo-game-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(245,158,11,0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.bingo-game-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(245,158,11,0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.btn-secondary {
    padding: 12px 20px;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(26,16,5,0.9), rgba(15,23,42,0.9));
    color: #fbbf24;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-inset-gold), var(--shadow-glow);
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* ===== Winner Banner ===== */
.winner-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease-out;
}

.winner-banner-content {
    background: linear-gradient(145deg, rgba(26,16,5,0.98), rgba(15,23,42,0.95));
    border: 2px solid rgba(245,158,11,0.6);
    border-radius: var(--radius-lg);
    padding: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.winner-title {
    color: var(--accent-primary);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.winner-info-badge {
    background: var(--bg-elevated);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.winner-board-preview {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.winner-board-preview .board-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    max-width: 200px;
}

.winner-board-preview>div {
    flex: 0 0 auto;
}

.winner-board-preview .board-grid div {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: #0f172a;
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 4px;
    color: #e2e8f0;
    font-weight: 700;
}

/* Game countdown display */
#game-status-countdown {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-primary);
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-full);
    margin-left: 8px;
}

.winner-board-preview .board-grid .winning-cell {
    background: var(--accent-primary);
    color: #000;
    font-weight: 800;
}

.winner-actions {
    display: flex;
    justify-content: center;
}

.play-again-btn {
    background: var(--gradient-gold-shine);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    transition: transform 0.2s;
    width: 100%;
}

.play-again-btn:active {
    transform: scale(0.95);
}

/* ===== Profile Tab - Compact Version ===== */
.profile-header-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px 0;
}

.profile-header-compact h2 {
    font-size: 18px;
    font-weight: 700;
}

.profile-card-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    align-items: center;
}

.profile-avatar-small {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.profile-info-compact {
    flex: 1;
}

.profile-name-compact {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-username-compact {
    color: var(--text-muted);
    font-size: 12px;
}

.balance-chip {
    background: var(--accent-primary);
    color: #000;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    margin-left: auto;
}

.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.stat-item {
    background: var(--bg-card);
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-item .stat-icon {
    font-size: 16px;
    display: block;
    margin-bottom: 2px;
}

.stat-item .stat-value {
    font-size: 13px;
    font-weight: 700;
    display: block;
}

.stat-item .stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.referral-compact {
    margin-bottom: 12px;
}

.referral-code-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.code-label {
    font-size: 11px;
    color: var(--text-muted);
}

.code-value {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-secondary);
    letter-spacing: 1px;
}

.copy-btn-small {
    padding: 4px 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-secondary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.share-btn-small {
    padding: 4px 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-info);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.profile-actions-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.action-btn {
    padding: 10px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn:active {
    transform: scale(0.97);
}

.deposit-btn {
    background: var(--gradient-green);
    color: white;
}

.withdraw-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 20px 16px;
    color: var(--text-muted);
    font-size: 11px;
}

/* ===== Notifications ===== */
#notification-container {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.4s var(--ease-out);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.notification.success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.notification.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.notification.info {
    background: rgba(99, 102, 241, 0.9);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.notification.leaving {
    animation: slideUp 0.3s var(--ease-out) forwards;
}

/* ===== Debug Logger Panel ===== */
.debug-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(12px);
    border-top: 2px solid var(--accent-secondary);
    z-index: 9999;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    transition: transform 0.3s var(--ease-out);
}

.debug-panel.minimized {
    transform: translateY(140px);
}

.debug-header {
    background: rgba(99, 102, 241, 0.2);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

@keyframes shineToast {
    100% {
        left: 200%;
    }
}

/* ==================== LUCKY DRAW STYLES (Mobile-First) ==================== */

.lucky-draw-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
}

.lucky-draw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none;
}

.lucky-draw-header:active {

    background: rgba(255, 255, 255, 0.05);
}

.lucky-draw-header-left {
    display: flex;
    align-items: left;
    gap: 10px;
    flex: 1;
}

.lucky-draw-header h2 {
    color: #ffd700;
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.campaign-badge {
    background: linear-gradient(135deg, #f59e0b, #f2a51f);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.lucky-draw-header-right {
    display: flex;
    align-items: right;
    gap: 10px;
}

.lucky-draw-header-left h2 {
    color: #000;
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.prize-preview {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.9rem;
}

.toggle-icon {
    color: #ffd700;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(-180deg);
}

/* Collapsible Content */
.lucky-draw-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 20px;
}

.lucky-draw-content.expanded {
    max-height: 2000px;
    padding: 0 20px 20px 20px;
    transition: max-height 0.5s ease-in, padding 0.3s ease;
}

.countdown-display {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.countdown-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-timer {
    font-family: 'Menbere', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    /* text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.9); */
    margin: 10px 0;
    letter-spacing: 2px;
}

.countdown-info {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 8px;
}

.prize-info-card {
    background: linear-gradient(135deg, #f59e0b, #f2a51f);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    margin: 8px 0;
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

.prize-amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.prize-details {
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: #000;
    font-size: 0.85rem;
    gap: 4px;
    flex-wrap: wrap;
}

.prize-details span {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.participation-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-value {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Menbere', sans-serif;
}

.winner-board-container {
    margin: 15px 0;
}

.winner-board-container h3 {
    color: #ffd700;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winner-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.winner-list::-webkit-scrollbar {
    width: 6px;
}

.winner-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.winner-list::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.winner-item {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid #ffd700;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.winner-item:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: translateX(5px);
}

.winner-rank {
    color: #ffd700;
    font-weight: bold;
    font-size: 1rem;
    min-width: 35px;
}

.winner-name {
    color: white;
    flex: 1;
    margin: 0 10px;
    font-size: 0.9rem;
    word-break: break-word;
}

.winner-prize {
    color: #34d399;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
}

.participation-notice {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 15px;
    text-align: center;
}

.participation-notice p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 5px 0;
}

.participation-notice p:first-child {
    color: #818cf8;
    font-weight: 600;
}

/* Tablet and Desktop Enhancements */
@media (min-width: 768px) {
    .lucky-draw-header {
        padding: 18px 25px;
    }

    .lucky-draw-header h2 {
        font-size: 1.4rem;
    }

    .prize-preview {
        font-size: 1rem;
    }

    .lucky-draw-content.expanded {
        padding: 0 25px 25px 25px;
    }

    .countdown-timer {
        font-size: 2.5rem;
    }

    .prize-amount {
        font-size: 2.2rem;
    }

    .winner-list {
        max-height: 300px;
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .lucky-draw-container {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== Game Countdown ===== */
.game-countdown-text {
    font-size: 0.8em;
    color: var(--accent-primary);
    font-weight: 600;
    padding: 4px 0;
    text-align: center;
}



/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
    .info-label {
        font-size: 8px;
    }

    .info-value {
        font-size: 10px;
    }

    .balance-chip {
        padding: 4px 6px;
        font-size: 9px;
    }

    .stake-table-header,
    .stake-row {
        grid-template-columns: 60px 1.2fr 45px 75px 65px;
        gap: 6px;
        padding: 10px 6px;
    }

    .game-split-view {
        flex-direction: row;
    }

    .master-board-panel,
    .player-card-panel {
        height: auto;
        min-height: 480px;
    }

    .stats-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Winner banner close button */
.winner-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.close-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: #dc2626;
}

.close-btn:active {
    transform: scale(0.95);
}

/* Board preview container */

/* .previews-compact {
    display: flex;
    gap: 15px;
    justify-content: center;
    overflow-x: auto;
    padding: 8px 4px;
} */

.preview-board {
    min-width: 130px;
    padding: 5px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.preview-board h4 {
    font-size: 11px;
    text-align: center;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

/* .preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
} */

.preview-cell {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Buy another board button */
#buy-board-btn {
    margin-top: 10px;
    background: var(--gradient-gold-shine);
    color: #000;
    border: 1px solid rgba(245,158,11,0.5);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(245,158,11,0.4);
}

#buy-board-btn:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Game countdown display */
.game-countdown-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-primary);
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-full);
    margin-right: 8px;
}

/* BINGO button styling */
.bingo-shout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.bingo-shout-btn.bingo-ready-animation:not(:disabled) {
    animation: pulse-bingo 1.5s infinite;
}

@keyframes pulse-bingo {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
}

.bingo-shout-btn:active:not(:disabled) {
    transform: scale(0.98);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.bingo-shout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-elevated);
    box-shadow: none;
    animation: none;
}

/* Placeholder board styling */
.placeholder-board {
    border: 2px dashed var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    min-height: 180px;
}

.placeholder-board .bingo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
}

/* Winner board preview area */
.winner-board-preview {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.winner-board-preview>div {
    flex: 0 0 auto;
    background: var(--bg-elevated);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Slot selection improvements */
.slot-item.selected {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--accent-primary-glow);
    z-index: 2;
    font-weight: 800;
}

.slot-item.taken {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-danger);
    cursor: not-allowed;
    opacity: 0.7;
    text-decoration: line-through;
}

/* Countdown badge in lobby/slots */
.countdown-badge,
.game-countdown-badge {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-primary);
    padding: 2px 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-full);
    display: inline-block;
}

.lobby-countdown-badge {
    font-size: 10px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-primary);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: 800;
    transition: all 0.3s ease;
}

/* Countdown urgent animation - last 5 seconds */
.lobby-countdown-badge.urgent,
.countdown-badge.urgent,
.game-countdown-badge.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.4);
    animation: countdown-pulse 1s infinite;
}

@keyframes countdown-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Winner banner close button (✕) */
.winner-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
    line-height: 1;
}

.winner-close-btn:hover {
    background: #ef4444;
    color: white;
}

.winner-close-btn:active {
    transform: scale(0.9);
}

.winner-banner-content {
    position: relative;
}

/* Winning board number display */
.winning-board-number {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 4px;
}

/* Shake animation for uncalled number click */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

.bingo-cell.shake {
    animation: shake 0.3s ease-in-out;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Callable cells - numbers that have been called and can be marked */
.bingo-cell.callable {
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.15);
}

.bingo-cell.callable:not(.marked) {
    background: rgba(16, 185, 129, 0.1);
}

/* Placeholder board matching actual board size */
.placeholder-board .bingo-card {
    min-height: 140px;
    aspect-ratio: 1;
}

/* =====================================================
   REAL-TIME NOTIFICATIONS
   ===================================================== */
#notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.realtime-toast {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 40, 0.95));
    border: 2px solid #f59e0b;
    /* Gold border */
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3), inset 0 0 15px rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideDownToast 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, floatToast 3s ease-in-out infinite, fadeOutToast 0.5s ease 4.5s forwards;
    position: relative;
    overflow: hidden;
}

.realtime-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shineToast 2s infinite;
}

.toast-icon {
    font-size: 32px;
    animation: bounceToast 1s infinite alternate;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 800;
    color: #f59e0b;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    color: #e2e8f0;
}

.toast-message strong {
    color: #10b981;
    /* Green for amount */
    font-size: 14px;
}

@keyframes slideDownToast {
    0% {
        transform: translateY(-50px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes floatToast {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes fadeOutToast {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }
}

@keyframes bounceToast {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

@keyframes shineToast {
    100% {
        left: 200%;
    }
}

/* ===== KENO (mockup-based) ===== */
#keno-tab.active {
    display: flex;
    flex-direction: column;
    background-color: #111a24;
    border-radius: 8px;
    min-height: 700px;
}

#keno-tab .keno-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}

#keno-tab .keno-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .03em;
    /* background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14); */
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
}

#keno-tab .keno-funmode {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .05em;
    background: linear-gradient(180deg, #ffb648, #e8901f);
    color: #3a2400;
    padding: 8px 22px;
    border-radius: 18px;
    margin: 0 auto;
}

#keno-tab .keno-sound-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

#keno-tab .keno-sound-btn.muted {
    color: #e88b7c;
}

#keno-tab .keno-help-btn {
    font-weight: 600;
    font-size: 11px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9a0;
    padding: 6px 10px;
    border-radius: 14px;
    cursor: pointer;
}

#keno-tab .keno-body {
    flex: 1;
    position: relative;
    padding: 6px 14px 0;
}

#keno-tab .keno-toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
    white-space: nowrap;
}

#keno-tab .keno-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#keno-tab .keno-drawstrip {
    min-height: 46px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 10px;
}

#keno-tab .keno-idle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .2);
    border-radius: 14px;
    padding: 6px 12px;
    overflow-x: auto;
}

#keno-tab .keno-idle-row .grp {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

#keno-tab .keno-idle-row .num {
    background: rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 2px 7px;
}

#keno-tab .keno-idle-row .calc {
    margin-left: auto;
    opacity: .7;
}

#keno-tab .keno-ball-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

#keno-tab .keno-ball-chip {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: radial-gradient(circle at 35% 30%, #4a86e8, #2a5cc4);
}

#keno-tab .keno-ball-chip.matched {
    background: radial-gradient(circle at 35% 30%, #e560c8, #b8309e);
}

#keno-tab .keno-strip-progress {
    height: 3px;
    background: rgba(255, 255, 255, .1);
    border-radius: 2px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

#keno-tab .keno-strip-progress-bar {
    height: 100%;
    width: 0%;
    background: #3d8f24;
    transition: width .2s linear;
}

#keno-tab .keno-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    flex-wrap: wrap;
}

#keno-tab .keno-mode {
    display: flex;
    gap: 4px;
    flex: 1;
}

#keno-tab .keno-mode button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 8px 12px;
    cursor: pointer;
}

#keno-tab .keno-mode button.active {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#keno-tab .keno-picks {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, .22);
    padding: 7px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

#keno-tab .keno-board-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 4px 0;
}

#keno-tab .keno-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 5px;
    width: 100%;
}

#keno-tab .kno-cell {
    height: 36px;
    /* background-color: #17212d; */
    background: linear-gradient(180deg, #333F46 0%, #242B31 100%);
    border: 1px solid #223042;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #A0A0A0;
    position: relative;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

#keno-tab .kno-cell:hover {
    border-color: #3b4d63;
    color: #ffffff;
}

#keno-tab .kno-cell.drawn:not(.picked) {
    background-color: #0b1118;
    border-color: #00b894;
    color: #ffffff;
}

#keno-tab .kno-cell.picked::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ff4757;
    box-shadow: 0 0 4px #ff4757;
}

#keno-tab .kno-cell.drawn-hit {
    background-color: #00b894;
    border-color: #55efc4;
    color: #000000;
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.5);
}

#keno-tab .kno-cell.drawn-miss {
    opacity: 0.5;
}


#keno-tab .keno-logo {
    font-size: 18px;
    font-weight: 900;
    font-style: italic;
    color: #ffffff;
    letter-spacing: 0.5px;
    font-family: 'Oswald', sans-serif;
}

#keno-tab .keno-logo span {
    color: #2ecc71;
}

#keno-tab .timer-display {
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    color: #55efc4;
    text-shadow: 0 0 10px rgba(85, 239, 196, 0.7);
    margin: 8px 0;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
}

#keno-tab .draw-hub-area {
    position: relative;
    width: 100%;
    height: 180px;
    background: radial-gradient(circle at center, #1b2838 0%, #0d141f 70%);
    border: 1px solid #223042;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

#keno-tab .radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(85, 239, 196, 0.2);
    box-shadow: 0 0 15px rgba(85, 239, 196, 0.05);
}

#keno-tab .ring-1 {
    width: 120px;
    height: 120px;
    animation: pulseRing 4s infinite linear;
}

#keno-tab .ring-2 {
    width: 200px;
    height: 200px;
    animation: pulseRing 4s infinite linear 1.33s;
}

#keno-tab .ring-3 {
    width: 280px;
    height: 280px;
    animation: pulseRing 4s infinite linear 2.66s;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

#keno-tab .status-message {
    position: absolute;
    top: 4px;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#keno-tab .status-message.win {
    color: #2ecc71;
    text-shadow: 0 0 12px rgba(46, 204, 113, 0.6);
}

#keno-tab .status-message.lose {
    color: #ff4757;
    text-shadow: 0 0 12px rgba(255, 71, 87, 0.6);
}

#keno-tab .status-message.visible {
    opacity: 1;
}

#keno-tab .draw-counter {
    position: absolute;
    top: 30px;
    font-size: 12px;
    color: #8b9bb4;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#keno-tab .draw-counter.visible {
    opacity: 1;
}

#keno-tab .drawn-tray {
    position: absolute;
    bottom: 10px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

#keno-tab .tray-row {
    display: flex;
    justify-content: space-between;
    /* 10 balls + gaps must never overflow a 360px phone */
    gap: clamp(2px, 1.1vw, 8px);
}

/*
 * EMPTY slots are INVISIBLE. The tray used to render 20 dashed circles up
 * front, which read as "all the balls are already here". The slots still
 * reserve layout space (so the balls land in sequence) but only become
 * visible as each ball arrives.
 */
#keno-tab .tray-slot {
    /* explicit responsive square. 6vw (not 7) so ten balls plus gaps still have
       ~35px of slack inside the tray on a 390px phone rather than sitting on the
       edge. An aspect-ratio + flexible width resolves ambiguously inside a flex
       row and was collapsing the balls to ~19px, hence fixed clamp sizes. */
    width: clamp(14px, 6vw, 30px);
    height: clamp(14px, 6vw, 30px);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#keno-tab .tray-slot.filled,
#keno-tab .tray-slot:has(.ball-sphere) {
    border: 1px solid transparent;
    background: transparent;
}

#keno-tab .anim-flying-ball {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0e6ed 45%, #95a5a6 85%, #7f8c8d 100%);
    border: 2px solid #ff9f43;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #1e272e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 159, 67, 0.7);
    z-index: 100;
    pointer-events: none;
    transform: scale(0);
    opacity: 0;
    transition: left 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                top 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                width 0.4s ease,
                height 0.4s ease,
                font-size 0.4s ease,
                opacity 0.18s ease;
    will-change: left, top, transform, opacity;
}

#keno-tab .anim-flying-ball.match {
    background: radial-gradient(circle at 35% 30%, #55efc4 0%, #00b894 45%, #00816a 85%, #005646 100%);
    border-color: #00d2d3;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 210, 211, 0.9);
}

#keno-tab .active-spawn-ball {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0e6ed 45%, #95a5a6 85%, #7f8c8d 100%);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #1e272e;
    box-shadow: inset 0 4px 6px rgba(255, 255, 255, 0.9), inset 0 -4px 8px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.8);
    z-index: 10;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

#keno-tab .active-spawn-ball.match {
    background: radial-gradient(circle at 35% 30%, #55efc4 0%, #00b894 45%, #00816a 85%, #005646 100%);
    border-color: #55efc4;
    color: #ffffff;
    box-shadow: inset 0 4px 6px rgba(255, 255, 255, 0.9), inset 0 -4px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 184, 148, 0.9);
}

#keno-tab .ball-sphere {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0e6ed 45%, #95a5a6 85%, #7f8c8d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: #1e272e;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), inset 0 -2px 6px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 6;
    animation: ballPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ballPop {
    0% { transform: scale(0.6); }
    100% { transform: scale(1); }
}

#keno-tab .ball-sphere.match {
    background: radial-gradient(circle at 35% 30%, #55efc4 0%, #00b894 45%, #00816a 85%, #005646 100%);
    color: #ffffff;
}

#keno-tab .keno-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

#keno-tab .keno-toolbar button {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    padding: 6px 9px;
    cursor: pointer;
}

#keno-tab .keno-toolbar button.qp {
    min-width: 28px;
}

#keno-tab .keno-toolbar button.active {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#keno-tab .keno-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 2px;
}

#keno-tab .keno-status {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #fff;
    margin: 0;
}

#keno-tab .keno-countdown {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ffd166;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 209, 102, .35);
    border-radius: 20px;
    padding: 3px 10px;
}

#keno-tab .keno-countdown span {
    font-weight: 700;
    color: #fff;
}

#keno-tab .keno-paytable {
    background: rgba(0, 0, 0, .28);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px auto 0;
    max-width: 600px;
}

#keno-tab .keno-pt-drawinfo {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #9d8fc7;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

#keno-tab .keno-pt-head {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #dcd0ff;
    margin-bottom: 6px;
}

#keno-tab .keno-pt-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

#keno-tab .keno-pt-chip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #dcd0ff;
}

#keno-tab .keno-pt-chip.matched {
    background: radial-gradient(circle at 35% 30%, #e560c8, #b8309e);
    color: #fff;
}

#keno-tab .keno-pt-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

#keno-tab .keno-pt-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
    background: rgba(255, 255, 255, .05);
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 3px;
}

#keno-tab .keno-pt-row.hit {
    background: #3d8f24;
    color: #fff;
}

#keno-tab .keno-tabs {
    display: flex;
    gap: 4px;
    margin-top: 14px;
}

#keno-tab .keno-tabs button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 8px 6px;
    cursor: pointer;
}

#keno-tab .keno-tabs button.active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border-color: rgba(255, 255, 255, .3);
}

#keno-tab .keno-subtabs {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

#keno-tab .keno-subtabs button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #9d8fc7;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 5px 4px;
    cursor: pointer;
}

#keno-tab .keno-subtabs button.active {
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
}

#keno-tab .keno-tabcontent {
    margin-top: 10px;
    max-height: 280px;
    overflow-y: auto;
}

#keno-tab .keno-allbets-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 14px;
}

#keno-tab .keno-prevbtn {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    padding: 6px 12px;
    cursor: pointer;
}

#keno-tab .keno-hist-card {
    background: rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
}

#keno-tab .keno-hist-card .row1 {
    display: flex;
    justify-content: space-between;
    color: #9d8fc7;
    font-size: 10px;
    margin-bottom: 4px;
}

#keno-tab .keno-hist-card .row2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#keno-tab .keno-hist-card .hitratio {
    background: rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 2px 8px;
    font-weight: 700;
}

#keno-tab .keno-hist-card .row3 {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

#keno-tab .keno-hist-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #dcd0ff;
}

#keno-tab .keno-rounds-card {
    background: rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 6px;
}

#keno-tab .keno-rounds-card .rid {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #9d8fc7;
    margin-bottom: 5px;
}

#keno-tab .keno-rounds-numrow {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

#keno-tab .keno-rounds-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #dcd0ff;
    font-family: var(--font-mono);
}

#keno-tab .keno-rounds-num.last {
    background: radial-gradient(circle at 35% 30%, #e560c8, #b8309e);
    color: #fff;
}

#keno-tab .keno-stats-title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #8b9bb0;
    margin-bottom: 8px;
}

#keno-tab .keno-stats-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

#keno-tab .keno-stats-bar-row .n {
    width: 18px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #8b9bb0;
}

#keno-tab .keno-stats-bar-track {
    flex: 1;
    background: rgba(255, 255, 255, .06);
    border-radius: 3px;
    height: 6px;
    overflow: hidden;
}

#keno-tab .keno-stats-bar-fill {
    height: 100%;
    background: #00b894;
    border-radius: 3px;
}

#keno-tab .keno-stats-bar-fill.hot {
    background: #ff4757;
}

#keno-tab .keno-stats-bar-row .v {
    width: 22px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #ffffff;
}

#keno-tab .keno-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dcd0ff;
}

#keno-tab .keno-top-row.first {
    background: rgba(92, 191, 58, .18);
}

#keno-tab .keno-top-row .badge {
    background: var(--marquee);
    color: #3a2400;
    border-radius: 8px;
    padding: 2px 8px;
    font-weight: 700;
}

#keno-tab .keno-top-row .grow {
    flex: 1;
}

#keno-tab .keno-top-row .win {
    color: #8be07a;
    font-weight: 700;
}

#keno-tab .bet-field {
    flex: 1 1 100%;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#keno-tab .bf-row1 {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

#keno-tab .bf-row1 .lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
}

#keno-tab .bf-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, .35);
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 16px;
    width: 84px;
    outline: none;
    padding: 0 0 2px;
}

#keno-tab .bf-input:focus {
    border-bottom-color: var(--marquee);
}

#keno-tab .bf-row2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#keno-tab .preset-grid {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

#keno-tab .preset {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    padding: 5px 9px;
    cursor: pointer;
}

#keno-tab .preset:hover {
    background: rgba(255, 255, 255, .22);
}

#keno-tab .preset.selected {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#keno-tab .stepper {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

#keno-tab .stepper:hover {
    background: rgba(255, 255, 255, .22);
}

#keno-tab .keno-stake-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

#keno-tab .keno-action-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
}

#keno-tab .keno-stake-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

#keno-tab .keno-stake-chip {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    padding: 5px 9px;
    cursor: pointer;
}

#keno-tab .keno-stake-chip:hover {
    background: rgba(255, 255, 255, .22);
}

#keno-tab .keno-stake-chip.active {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#keno-tab .keno-mult-row {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

#keno-tab .keno-mult-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    padding: 5px 9px;
    cursor: pointer;
}

#keno-tab .keno-mult-btn.active {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#keno-tab .keno-bet-manual {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

#keno-tab .keno-bet-input {
    width: 70px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    padding: 4px 6px;
    outline: none;
    text-align: right;
}

#keno-tab .keno-bet-input:focus {
    border-color: var(--marquee);
}

#keno-tab .keno-bet-cur {
    font-size: 10px;
    color: var(--text-secondary);
}

#keno-tab .g-footer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    margin-top: auto;
    background: rgba(0, 0, 0, .16);
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
}

#keno-tab .btn-keno-clear {
    background: rgba(0, 0, 0, .25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
}

#keno-tab .btn-keno-play {
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
    color: #fff;
    flex: 1;
}


#keno-tab .messenger {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s;
}

#keno-tab .messenger.win {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--neon-gold);
    color: var(--neon-gold);
    text-shadow: var(--shadow-gold);
    animation: pulse-win 0.8s infinite alternate;
}

#keno-tab .messenger.lose {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--neon-red);
    color: var(--neon-red);
}

@keyframes bounce-hit {
    0% {
        transform: scale(0.6);
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulse-win {
    from {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }

    to {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
    }
}

#keno-tab .keno-result-card {
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    margin: 10px auto 0;
    max-width: 600px;
}

#keno-tab .keno-result-card h4 {
    color: #ffb648;
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 16px;
}

#keno-tab .keno-result-card p {
    font-size: 12px;
    color: #8b93a3;
    margin: 0 0 8px;
}

#keno-tab .keno-result-amount {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
}

#keno-tab .keno-result-amount.win {
    color: #5cbf3a;
}

#keno-tab .keno-result-amount.lose {
    color: #e5533f;
}

#keno-tab .keno-total-bet {
    font-size: 12px;
    color: #8b93a3;
    margin-left: 8px;
    font-family: var(--font-mono);
}

#keno-tab .keno-result-ticket {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
}

#keno-tab .keno-rt-label {
    color: #8b93a3;
    min-width: 60px;
}

#keno-tab .keno-result-total {
    font-weight: 700;
    font-size: 14px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: right;
    font-family: var(--font-mono);
}

/* ===== AVIATOR (mockup-based) ===== */
#aviator-tab.active {
    display: flex;
    flex-direction: column;
    background: #0a0c16;
    border-radius: 10px;
    min-height: 700px;
}

#aviator-tab .aviator-container {
    max-width: 640px;
    padding: 4px 8px;
}

#aviator-tab .aviator-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 90;
    background: #0a0c16;
}

#aviator-tab .aviator-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    color: #e5533f;
    font-style: italic;
}

#aviator-tab .aviator-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

#aviator-tab .aviator-help-btn {
    font-weight: 600;
    font-size: 11px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9a0;
    padding: 6px 10px;
    border-radius: 14px;
    cursor: pointer;
}

#aviator-tab .aviator-sound-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

#aviator-tab .aviator-sound-btn.muted {
    color: #e88b7c;
}

#aviator-tab .aviator-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 14px 0;
    overflow-y: auto;
    flex: 1;
}

#aviator-tab .aviator-toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
    white-space: nowrap;
}

#aviator-tab .aviator-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#aviator-tab .av-history {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 0 8px;
    overflow-x: auto;
    max-height: 60px;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

#aviator-tab .av-hist-pill {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 10px;
    color: #fff;
    flex: 0 0 auto;
}

#aviator-tab .av-hist-pill.low {
    background: #2f5a9e;
}

#aviator-tab .av-hist-pill.mid {
    background: #6b3fa0;
}

#aviator-tab .av-hist-pill.high {
    background: #c23b7a;
}

#aviator-tab .av-hist-more {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #9aa4b8;
    border: none;
    font-size: 12px;
    cursor: pointer;
}

#aviator-tab .av-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width:640px) {
    #aviator-tab .av-main {
        /* grid-template-columns: 1fr 1fr; */
    }
}

#aviator-tab .av-stage {
    position: relative;
    flex: 2 1 340px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #05060a;
}

#aviator-tab .av-betfeed-wrapper {
    width: 100%;
    margin-top: 10px;
}

#aviator-tab .av-betfeed {
    max-height: 280px;
    background: rgba(0, 0, 0, .3);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

#aviator-tab .av-feed-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

#aviator-tab .av-feed-tabs button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: #9aa4b8;
    background: rgba(255, 255, 255, .05);
    border: none;
    border-radius: 10px;
    padding: 5px 2px;
    cursor: pointer;
}

#aviator-tab .av-feed-tabs button.active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

#aviator-tab .av-feed-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

#aviator-tab .av-feed-subtabs button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 9px;
    color: #7b8496;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 3px 2px;
    cursor: pointer;
}

#aviator-tab .av-feed-subtabs button.active {
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

#aviator-tab .av-round-result {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #9aa4b8;
    padding: 6px 0;
}

#aviator-tab .av-round-result .x {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: #c78ae8;
    margin-top: 2px;
}

#aviator-tab .av-betfeed-head {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #9aa4b8;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

#aviator-tab .av-progress {
    height: 3px;
    background: rgba(255, 255, 255, .1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

#aviator-tab .av-progress-bar {
    height: 100%;
    width: 0%;
    background: #5cbf3a;
    transition: width .1s linear;
}

#aviator-tab .av-betfeed-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr .8fr 1fr;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: #6b7386;
    padding: 2px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 2px;
}

#aviator-tab .av-betfeed-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#aviator-tab .av-bf-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr .8fr 1fr;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #dfe3ec;
    background: rgba(255, 255, 255, .03);
    border-radius: 5px;
    padding: 4px;
}

#aviator-tab .av-bf-row.won {
    background: rgba(92, 191, 58, .18);
    color: #bdf0a0;
}

#aviator-tab .av-bf-row .x {
    color: #c78ae8;
    font-weight: 600;
}

#aviator-tab .av-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: #dfe3ec;
    background: rgba(255, 255, 255, .04);
    border-radius: 6px;
    padding: 5px 7px;
    margin-bottom: 3px;
}

#aviator-tab .av-top-row .name {
    color: #9aa4b8;
}

#aviator-tab .av-top-row .x {
    color: #c78ae8;
    font-weight: 700;
}

#aviator-tab .av-stage {
    position: relative;
    flex: 2 1 340px;
    min-height: 260px;
    max-height: 400px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #05060a;
}

#aviator-tab .av-rays {
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from 195deg at 2% 100%, rgba(255, 80, 60, .05) 0deg 5deg, transparent 5deg 13deg);
}

#aviator-tab .av-curve-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#aviator-tab .av-plane {
    position: absolute;
    left: 20px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    z-index: 3;
    object-fit: contain;
    /* No left/bottom transition — movement is driven frame-by-frame
       by the RAF flyFrame so the plane never stalls between server polls. */
    transition: opacity 0.3s ease;
}

/* Exhaust particle system */
#aviator-tab .av-exhaust-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

#aviator-tab .av-exhaust-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 160, 40, 0.9) 0%, rgba(255, 80, 20, 0.4) 60%, transparent 100%);
    pointer-events: none;
    animation: av-exhaust-fade 0.6s ease-out forwards;
}

@keyframes av-exhaust-fade {
    0% {
        opacity: 0.8;
        transform: scale(1) translate(0, 0);
    }

    100% {
        opacity: 0;
        transform: scale(0.3) translate(-20px, 10px);
    }
}

/* Crash screen shake */
@keyframes av-crash-shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-4px, 2px);
    }

    20% {
        transform: translate(3px, -3px);
    }

    30% {
        transform: translate(-3px, 1px);
    }

    40% {
        transform: translate(2px, -2px);
    }

    50% {
        transform: translate(-2px, 3px);
    }

    60% {
        transform: translate(3px, -1px);
    }

    70% {
        transform: translate(-1px, 2px);
    }

    80% {
        transform: translate(1px, -1px);
    }

    90% {
        transform: translate(-1px, 1px);
    }
}

#aviator-tab .av-stage.av-shake {
    animation: av-crash-shake 0.5s ease-out;
}

#aviator-tab .av-mult {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 182, 72, .5), 0 0 40px rgba(255, 140, 40, .2);
    z-index: 4;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

#aviator-tab .av-mult.crashed {
    color: #e5533f;
    text-shadow: 0 0 20px rgba(229, 83, 63, .6), 0 0 40px rgba(229, 83, 63, .3);
    animation: av-crash-pulse 0.5s ease-out;
}

@keyframes av-crash-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1.3);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

#aviator-tab .av-status {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #ffd28a;
    background: rgba(0, 0, 0, .4);
    padding: 5px 14px;
    border-radius: 12px;
    z-index: 5;
}

/* ---- Animated dotted axes (signature Aviator visual) ---- */
#aviator-tab .av-axis {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

#aviator-tab .av-axis-x {
    left: 34px;
    right: 0;
    bottom: 10px;
    height: 12px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .28) 2px, transparent 2.6px);
    background-size: 20px 12px;
    background-repeat: repeat-x;
}

#aviator-tab .av-axis-y {
    top: 0;
    bottom: 34px;
    left: 10px;
    width: 12px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .22) 2px, transparent 2.6px);
    background-size: 12px 20px;
    background-repeat: repeat-y;
}

/* ---- Fly-away crash exit ---- */
#aviator-tab .av-plane.av-flew-away {
    transform: translate(320px, -220px) rotate(18deg) !important;
    opacity: 0 !important;
    transition: transform 1.15s cubic-bezier(.45, -0.1, .85, .55), opacity 1.15s ease-in !important;
}

/* ---- Waiting loader ring (replaces text + progress bar) ---- */
#aviator-tab .av-waiting {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 5;
}

#aviator-tab .av-spinner-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .12);
    border-top-color: #e5533f;
    animation: av-spin .9s linear infinite;
}

@keyframes av-spin {
    to { transform: rotate(360deg); }
}

#aviator-tab .av-waiting span {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 2.5px;
    color: #ffd28a;
    animation: av-wait-blink 1.2s ease-in-out infinite;
}

@keyframes av-wait-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

/* ---- Smooth game-tab transitions (no more hard screen swap) ---- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tab-slide-in 0.24s cubic-bezier(.25, .8, .35, 1);
}

@keyframes tab-slide-in {
    from { opacity: 0; transform: translateY(10px) scale(0.995); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .tab-content.active { animation: none; }
}

/* ---- Multiplier breathing pulse while flying ---- */
#aviator-tab .av-mult:not(.crashed) {
    animation: av-mult-breathe 1.5s ease-in-out infinite;
}

@keyframes av-mult-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.06); }
}

/* ---- Keno drawn-ball entrance + hit flash ---- */
.keno-tray .ball-sphere,
.ball-sphere {
    animation: keno-ball-in 0.5s cubic-bezier(.2, .9, .3, 1.25);
}

@keyframes keno-ball-in {
    0% { transform: translateY(-26px) scale(0.4); opacity: 0; }
    60% { transform: translateY(3px) scale(1.12); opacity: 1; }
    80% { transform: translateY(-2px) scale(0.97); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.ball-sphere.match {
    box-shadow: 0 0 0 2px #ffd54a, 0 0 14px rgba(255, 213, 74, .55);
}

#keno-board .kno-cell.drawn-hit {
    animation: keno-hit-pop 0.45s ease;
}

#keno-board .kno-cell.drawn-miss {
    animation: keno-miss-fade 0.35s ease;
}

@keyframes keno-hit-pop {
    0% { transform: scale(0.7); }
    55% { transform: scale(1.22); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes keno-miss-fade {
    from { opacity: 0.25; }
    to { opacity: 1; }
}

#aviator-tab .av-panels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

#aviator-tab .av-bet-panel {
    position: relative;
    background: rgba(0, 0, 0, .26);
    border-radius: 12px;
    padding: 10px;
}

#aviator-tab .av-collapse {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #9aa4b8;
    border: none;
    font-size: 12px;
    cursor: pointer;
}

#aviator-tab .av-bet-panel.collapsed .av-tabs,
#aviator-tab .av-bet-panel.collapsed .av-bet-control,
#aviator-tab .av-bet-panel.collapsed .av-presets,
#aviator-tab .av-bet-panel.collapsed .av-auto-row,
#aviator-tab .av-bet-panel.collapsed .av-bet-btn {
    display: none;
}

#aviator-tab .av-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

#aviator-tab .av-tabs button {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: #9aa4b8;
    border: none;
    cursor: pointer;
}

#aviator-tab .av-tabs button.active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

#aviator-tab .av-bet-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

#aviator-tab .av-bet-value {
    width: 56px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background: rgba(0, 0, 0, .25);
    border: none;
    border-radius: 6px;
    padding: 6px 2px;
}

#aviator-tab .av-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

#aviator-tab .av-presets button {
    font-family: var(--font-mono);
    font-size: 10.5px;
    padding: 5px 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}

#aviator-tab .av-presets button.selected {
    background: var(--marquee);
    color: #3a2400;
    border-color: var(--marquee);
}

#aviator-tab .av-bet-btn {
    width: 100%;
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
}

#aviator-tab .av-bet-btn.cashout {
    background: linear-gradient(180deg, #f0a743, #d9822a);
    color: #3a2400;
}

#aviator-tab .av-bet-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

#aviator-tab .av-auto-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #9aa4b8;
    margin-bottom: 8px;
}

#aviator-tab .av-auto-row input {
    width: 56px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    border-radius: 6px;
    padding: 3px 6px;
    font-family: var(--font-mono);
    font-size: 11px;
}

#aviator-tab .av-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #6b7386;
    padding: 8px 2px 0;
}

#aviator-tab .aviator-caption {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: rgba(255, 255, 255, .45);
    text-align: center;
    padding: 6px 14px 12px;
}

#aviator-tab .aviator-howto-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .8);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

#aviator-tab .aviator-howto-overlay.show {
    display: flex;
}

#aviator-tab .aviator-howto-card {
    background: #151a22;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 20px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    color: #eef1f5;
}

#aviator-tab .aviator-howto-card h3 {
    color: #ffb648;
    margin: 0 0 12px;
    font-size: 16px;
}

#aviator-tab .aviator-howto-card p {
    font-size: 12px;
    color: #8b93a3;
    line-height: 1.6;
    margin: 6px 0;
}

#aviator-tab .aviator-howto-close {
    display: block;
    margin: 14px auto 0;
    padding: 8px 24px;
    background: #ffb648;
    color: #3a2400;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width:480px) {
    #aviator-tab .aviator-header {
        gap: 6px;
    }

    #aviator-tab .aviator-logo {
        font-size: 12px;
    }

    #aviator-tab .aviator-help-btn {
        font-size: 10px;
        padding: 5px 8px;
    }

    #aviator-tab .av-stage {
        min-height: 200px;
    }

    #aviator-tab .av-mult {
        font-size: 32px;
    }

    #aviator-tab .av-plane {
        width: 36px;
        height: 36px;
    }

    #aviator-tab .av-betfeed {
        max-height: 220px;
    }
}

/* ===== PLINKO (mockup-based) ===== */
#plinko-tab .plinko-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 8px 16px;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 20%, #1a9e97 0%, #0c6a70 55%, #0a4d55 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 12px 30px rgba(0, 0, 0, .35);
}

#plinko-tab .plinko-game-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    flex-wrap: wrap;
}

#plinko-tab .plinko-game-select {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .03em;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
}

#plinko-tab .plinko-help-btn {
    font-weight: 600;
    font-size: 11px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9a0;
    padding: 6px 10px;
    border-radius: 14px;
}

#plinko-tab .plinko-funmode {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .05em;
    background: linear-gradient(180deg, #ffb648, #e8901f);
    color: #3a2400;
    padding: 6px 16px;
    border-radius: 14px;
    margin: 0 auto;
}

#plinko-tab .plinko-header-balance {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}

#plinko-tab .plinko-header-balance small {
    opacity: .6;
    font-weight: 500;
}

#plinko-tab .plinko-sound-btn,
#plinko-tab .plinko-menu-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

#plinko-tab .plinko-sound-btn.muted {
    color: #e88b7c;
}

#plinko-tab .plinko-history-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

#plinko-tab .plinko-history-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
}

#plinko-tab .plinko-history-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

#plinko-tab .plinko-history-pill {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 10px;
    color: #fff;
    padding: 3px 7px;
    border-radius: 8px;
}

#plinko-tab .plinko-history-pill.green {
    background: #3d8f24;
}

#plinko-tab .plinko-history-pill.yellow {
    background: #c78a1f;
}

#plinko-tab .plinko-history-pill.red {
    background: #b52e1e;
}

#plinko-tab .plinko-pins-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 4px 12px;
    border-radius: 14px;
}

#plinko-tab .plinko-pegfield {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    max-width: 100%;
}

#plinko-tab .plinko-peg {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 4px rgba(255, 255, 255, .6);
    transform: translate(-50%, -50%);
}

#plinko-tab .plinko-ball {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #ffd35a 60%, #d98e00);
    box-shadow: 0 0 8px rgba(255, 210, 90, .8);
    transform: translate(-50%, -50%);
    transition: left .14s linear, top .14s linear;
    z-index: 5;
}

@keyframes plinko-bump {
    0% {
        transform: translate(-50%, -50%) scale(1, 1)
    }

    35% {
        transform: translate(-50%, -50%) scale(1.5, .65)
    }

    65% {
        transform: translate(-50%, -50%) scale(.8, 1.2)
    }

    100% {
        transform: translate(-50%, -50%) scale(1, 1)
    }
}

#plinko-tab .plinko-ball.bump {
    animation: plinko-bump .16s ease;
}

#plinko-tab .plinko-mult-board {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px auto;
    max-width: 640px;
}

#plinko-tab .plinko-mult-row {
    display: flex;
    gap: 2px;
    justify-content: center;
}

#plinko-tab .plinko-mult-row.dim {
    opacity: .35;
}

#plinko-tab .plinko-mult-cell {
    flex: 1;
    max-width: 40px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 10px;
    padding: 5px 0;
    border-radius: 4px;
    color: #fff;
}

#plinko-tab .plinko-mult-row[data-row="0"] .plinko-mult-cell {
    background: #4a9a2e;
}

#plinko-tab .plinko-mult-row[data-row="1"] .plinko-mult-cell {
    background: #c78a1f;
}

#plinko-tab .plinko-mult-row[data-row="2"] .plinko-mult-cell {
    background: #c23b2c;
}

#plinko-tab .plinko-mult-cell.flash {
    outline: 2px solid #fff;
    transform: scale(1.15);
    transition: transform .2s ease;
}

#plinko-tab .plinko-bet-field {
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    padding: 8px 10px;
    margin: 8px 0;
}

#plinko-tab .plinko-bet-row1 {
    display: flex;
    align-items: center;
    gap: 6px;
}

#plinko-tab .plinko-bet-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, .55);
}

#plinko-tab .plinko-bet-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, .35);
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    width: 60px;
    outline: none;
    padding: 0 0 2px;
}

#plinko-tab .plinko-bet-input:focus {
    border-bottom-color: #ffb648;
}

#plinko-tab .plinko-stepper {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#plinko-tab .plinko-coin-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#plinko-tab .plinko-preset-dropdown {
    position: relative;
}

#plinko-tab .plinko-preset-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    background: #1a2236;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
    min-width: 60px;
    z-index: 10;
}

#plinko-tab .plinko-preset-menu .plinko-preset {
    padding: 6px 8px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 7px;
    cursor: pointer;
}

#plinko-tab .plinko-preset-menu .plinko-preset:hover {
    background: rgba(255, 255, 255, .22);
}

#plinko-tab .plinko-preset-menu .plinko-preset.selected {
    background: #ffb648;
    color: #3a2400;
    border-color: #ffb648;
}

#plinko-tab .plinko-risk-row {
    display: flex;
    gap: 8px;
}

#plinko-tab .plinko-risk-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    color: #fff;
    letter-spacing: .03em;
    transition: all .15s;
}

#plinko-tab .plinko-risk-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#plinko-tab .plinko-risk-btn.green {
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
}

#plinko-tab .plinko-risk-btn.yellow {
    background: linear-gradient(180deg, #e8b23a, #c78a1f);
}

#plinko-tab .plinko-risk-btn.red {
    background: linear-gradient(180deg, #e5533f, #b52e1e);
}

#plinko-tab .plinko-risk-btn.selected {
    outline: 2px solid #fff;
}

#plinko-tab .plinko-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 200;
    white-space: nowrap;
}

#plinko-tab .plinko-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
}

.plinko-howto-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .8);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.plinko-howto-overlay.show {
    display: flex;
}

.plinko-howto-card {
    background: #151a22;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 20px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    color: #eef1f5;
}

.plinko-howto-card h3 {
    color: #ffb648;
    margin: 0 0 12px;
    font-size: 16px;
}

.plinko-howto-card p {
    font-size: 12px;
    color: #8b93a3;
    line-height: 1.6;
    margin: 6px 0;
}

.plinko-howto-close {
    display: block;
    margin: 14px auto 0;
    padding: 8px 24px;
    background: #ffb648;
    color: #3a2400;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* ===== BALLOON ===== */
#balloon-tab .balloon-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 4px;
}

#balloon-tab .balloon-game-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

#balloon-tab .balloon-game-select {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .03em;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
}

#balloon-tab .balloon-help-btn {
    font-weight: 600;
    font-size: 11px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9a0;
    padding: 6px 10px;
    border-radius: 14px;
    cursor: pointer;
}

#balloon-tab .balloon-sound-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

#balloon-tab .balloon-sound-btn.muted {
    color: #e88b7c;
}

#balloon-tab .balloon-scene {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: linear-gradient(180deg, #8fd3dd 0%, #cfeadd 45%, #f4e2ac 100%);
    border-radius: 12px;
    margin: 6px 0;
}

/* ---- Living background: glow + slow zoom/drift while the balloon is heating ---- */
#balloon-tab .balloon-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s ease;
    background: radial-gradient(circle at 50% 62%, rgba(255, 196, 87, .55) 0%, rgba(255, 145, 60, .22) 45%, transparent 72%);
}

#balloon-tab .balloon-scene.live .balloon-bg {
    animation: balloon-bg-zoom 9s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes balloon-bg-zoom {
    from { transform: scale(1) translateX(0); }
    to   { transform: scale(1.12) translateX(-8px); }
}

#balloon-tab .balloon-scene.live {
    animation: balloon-sky-shift 9s ease-in-out infinite alternate;
}

@keyframes balloon-sky-shift {
    from { filter: saturate(1); }
    to   { filter: saturate(1.35) brightness(1.06); }
}

#balloon-tab .balloon-timer {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, .4);
    padding: 3px 14px;
    border-radius: 12px;
    z-index: 10;
}

#balloon-tab .balloon-timer.urgent {
    color: #ff4444;
    animation: pulse-win 0.5s infinite alternate;
}

#balloon-tab .balloon-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

#balloon-tab .balloon-layer {
    position: absolute;
    width: 60px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    transition: transform .3s ease, opacity .5s ease;
}

#balloon-tab .balloon-layer.layer-0 {
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* stars bg - full screen */
#balloon-tab .balloon-layer.layer-1 {
    z-index: 1;
    top: 15%;
    left: 75%;
}

/* clouds */
#balloon-tab .balloon-layer.layer-2 {
    z-index: 1;
    top: 20%;
    left: 8%;
}

/* plane */
#balloon-tab .balloon-layer.layer-3 {
    z-index: 1;
    top: 8%;
    left: 55%;
}

/* comet */
#balloon-tab .balloon-layer.layer-4 {
    z-index: 1;
    top: 12%;
    left: 82%;
}

/* satellite */
#balloon-tab .balloon-layer.layer-5 {
    z-index: 1;
    top: 18%;
    left: 30%;
}

/* tesla */
#balloon-tab .balloon-layer.layer-6 {
    z-index: 1;
    top: 5%;
    left: 60%;
}

/* ufo */
#balloon-tab .balloon-wrap {
    position: absolute;
    left: 50%;
    bottom: 20px;
    width: 110px;
    min-height: 140px;
    transform: translate(-50%, 0);
    transition: transform .12s linear;
    z-index: 5;
}

#balloon-tab .balloon-img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .15));
}

#balloon-tab .balloon-mult {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

#balloon-tab .balloon-fire {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: auto;
    opacity: 0;
    transition: opacity .2s;
    z-index: 4;
}

#balloon-tab .balloon-mult.popped {
    color: #c23b2c;
}

#balloon-tab .balloon-bet-field {
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    padding: 8px 10px;
    margin: 8px 0;
}

#balloon-tab .balloon-bet-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

#balloon-tab .balloon-bet-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, .55);
}

#balloon-tab .balloon-bet-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, .35);
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    width: 60px;
    outline: none;
    padding: 0 0 2px;
}

#balloon-tab .balloon-bet-input:focus {
    border-bottom-color: #ffb648;
}

#balloon-tab .balloon-stepper {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#balloon-tab .balloon-coin-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#balloon-tab .balloon-preset-dropdown {
    position: relative;
}

#balloon-tab .balloon-preset-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    background: #1a2236;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
    min-width: 60px;
    z-index: 10;
}

#balloon-tab .balloon-preset {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 7px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: center;
}

#balloon-tab .balloon-preset:hover {
    background: rgba(255, 255, 255, .22);
}

#balloon-tab .balloon-preset.selected {
    background: #ffb648;
    color: #3a2400;
    border-color: #ffb648;
}

#balloon-tab .balloon-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

#balloon-tab .balloon-round-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #3aa1ff, #1c6fd4);
    color: #fff;
    font-size: 18px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

#balloon-tab .balloon-heat-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(180deg, #7ec14a, #4f9a2c);
    color: #fff;
    user-select: none;
}

#balloon-tab .balloon-heat-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#balloon-tab .balloon-heat-btn.active {
    filter: brightness(1.2);
}

#balloon-tab .balloon-take-btn {
    min-width: 100px;
    padding: 12px 16px;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    background: linear-gradient(180deg, #f0a743, #d9822a);
    color: #3a2400;
}

#balloon-tab .balloon-take-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#balloon-tab .balloon-take-btn span {
    font-size: 11px;
    opacity: .8;
}

#balloon-tab .balloon-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 200;
}

#balloon-tab .balloon-toast.show {
    opacity: 1;
}

/* ===== HI-LO ===== */
#hilo-tab .hilo-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 4px 8px;
}

#hilo-tab .hilo-game-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0 8px;
}

#hilo-tab .hilo-game-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    flex: 1;
}

#hilo-tab .hilo-howto-btn {
    background: rgba(0, 0, 0, .25);
    border: none;
    color: #fff;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

#hilo-tab .hilo-sound-btn {
    background: rgba(0, 0, 0, .25);
    border: none;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 32px;
    text-align: center;
}

#hilo-tab .hilo-sound-btn.muted {
    opacity: 0.4;
}

#hilo-tab .hilo-body {
    background: radial-gradient(circle at 50% 0%, #b9761f 0%, #7a4e12 70%);
    border-radius: 16px;
    padding: 14px;
    position: relative;
    min-height: 340px;
}

#hilo-tab .hilo-toast {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 20;
    white-space: nowrap;
}

#hilo-tab .hilo-toast.show {
    opacity: 1;
}

#hilo-tab .hilo-timer {
    position: absolute;
    top: 8px;
    left: 12px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--neon-cyan);
    z-index: 5;
}

#hilo-tab .hilo-timer.urgent {
    color: var(--neon-red);
    animation: pulse-win 0.4s infinite alternate;
}

#hilo-tab .hilo-streakbox {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(0, 0, 0, .28);
    border-radius: 10px;
    padding: 6px 12px;
    text-align: center;
    z-index: 5;
}

#hilo-tab .hilo-streak-n {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 13px;
}

#hilo-tab .hilo-streak-m {
    font-family: var(--font-mono);
    background: #3d8f24;
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    padding: 2px 8px;
    margin-top: 3px;
    display: inline-block;
}

#hilo-tab .hilo-history {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px 4px;
    margin-top: 32px;
    margin-bottom: 10px;
    max-width: 100%;
    min-height: 52px;
    align-items: center;
}

#hilo-tab .hilo-hist-card {
    flex: 0 0 auto;
    width: 34px;
    height: 48px;
    border-radius: 6px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}

#hilo-tab .hilo-hist-card.red {
    color: #c23b2c;
}

#hilo-tab .hilo-hist-card.black {
    color: #1a1a1a;
}

#hilo-tab .hilo-table {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 6px 0 8px;
}

#hilo-tab .hilo-card {
    width: 110px;
    height: 156px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    font-weight: 700;
}

#hilo-tab .hilo-card .hilo-rank {
    font-size: 28px;
    line-height: 1;
}

#hilo-tab .hilo-card .hilo-suit {
    font-size: 36px;
    align-self: center;
}

#hilo-tab .hilo-card.red {
    color: #c23b2c;
}

#hilo-tab .hilo-card.black {
    color: #1a1a1a;
}

#hilo-tab .hilo-card-back {
    width: 110px;
    height: 156px;
    border-radius: 10px;
    background: #8b0000;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    position: relative;
    overflow: hidden;
}

#hilo-tab .hilo-card-back::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(255, 215, 0, .4);
    border-radius: 4px;
    background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255, 215, 0, .08) 4px, rgba(255, 215, 0, .08) 8px);
}

#hilo-tab .hilo-card-back::after {
    content: '♠';
    font-size: 36px;
    color: rgba(255, 215, 0, .5);
    position: relative;
    z-index: 1;
}

#hilo-tab .hilo-card {
    transition: transform 0.15s ease;
}

#hilo-tab .hilo-hist-card {
    animation: hiloHistIn 0.2s ease-out;
}

@keyframes hiloHistIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes hiloShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

#hilo-tab .hilo-bust-flash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 16px;
    animation: hiloFlashIn 0.2s ease;
}

@keyframes hiloFlashIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#hilo-tab .hilo-guesses {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: nowrap;
}

#hilo-tab .hilo-guess-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

#hilo-tab .hilo-guess-btn {
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .01em;
    border: none;
    border-radius: 12px;
    padding: 8px 4px;
    cursor: pointer;
    min-width: 0;
    width: 100%;
    color: #3a2400;
    white-space: nowrap;
}

#hilo-tab .hilo-btn-high {
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
}

#hilo-tab .hilo-btn-same {
    background: linear-gradient(180deg, #ffd28a, #e8a13a);
}

#hilo-tab .hilo-btn-low {
    background: linear-gradient(180deg, #ff6b6b, #c23b2c);
    color: #fff;
}

#hilo-tab .hilo-guess-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#hilo-tab .hilo-odds {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #ffe6b8;
}

#hilo-tab .hilo-odds-same {
    color: #ffd28a;
    font-weight: bold;
}

#hilo-tab .hilo-reset {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    border: none;
    color: #fff;
    margin: 10px auto 0;
    cursor: pointer;
    font-size: 14px;
}

#hilo-tab .hilo-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

#hilo-tab .hilo-bet-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

#hilo-tab .hilo-bet-label {
    color: #8892b0;
    font-size: 0.7rem;
    min-width: 40px;
}

#hilo-tab .hilo-bet-input {
    width: 52px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 5px;
    text-align: center;
}

#hilo-tab .hilo-stepper {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
}

#hilo-tab .hilo-preset-dropdown {
    position: relative;
}

#hilo-tab .hilo-coin-btn {
    background: rgba(255, 255, 255, .08);
    border: none;
    padding: 4px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#hilo-tab .hilo-preset-menu {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
    z-index: 30;
}

#hilo-tab .hilo-preset {
    background: rgba(255, 255, 255, .04);
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

#hilo-tab .hilo-preset:hover {
    background: var(--neon-cyan);
    color: #000;
}

#hilo-tab .hilo-preset.selected {
    background: var(--neon-cyan);
    color: #000;
}

#hilo-tab .hilo-actions {
    display: flex;
    gap: 6px;
}

#hilo-tab .hilo-bet-btn {
    flex: 1;
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

#hilo-tab .hilo-bet-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#hilo-tab .hilo-cashout-btn {
    flex: 1;
    background: linear-gradient(180deg, #e8a13a, #c47d20);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

#hilo-tab .hilo-cashout-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#hilo-tab .hilo-cashout-btn span {
    font-size: 11px;
    opacity: .8;
}

/* ===== GOAL ===== */
#goal-tab .goal-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 4px 8px;
}

#goal-tab .goal-game-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0 8px;
}

#goal-tab .goal-game-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    flex: 1;
}

#goal-tab .goal-howto-btn {
    background: rgba(0, 0, 0, .25);
    border: none;
    color: #fff;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

#goal-tab .goal-sound-btn {
    background: rgba(0, 0, 0, .25);
    border: none;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    min-width: 32px;
    text-align: center;
}

#goal-tab .goal-sound-btn.muted {
    opacity: 0.4;
}

#goal-tab .goal-body {
    background: radial-gradient(circle at 50% 0%, #2c8f45 0%, #145623 75%);
    border-radius: 16px;
    padding: 14px;
    position: relative;
    min-height: 360px;
}

#goal-tab .goal-toast {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 20;
    white-space: nowrap;
}

#goal-tab .goal-toast.show {
    opacity: 1;
}

#goal-tab .goal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#goal-tab .goal-field-label {
    font-size: 0.7rem;
    color: #a0d8a0;
}

#goal-tab .goal-next-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffd700;
    background: rgba(0, 0, 0, .3);
    padding: 4px 10px;
    border-radius: 8px;
}

#goal-tab .goal-track {
    position: relative;
    height: 28px;
    background: rgba(0, 0, 0, .25);
    border-radius: 14px;
    margin: 0 auto 10px;
    max-width: 100%;
    overflow: hidden;
}

#goal-tab .goal-track-ball {
    position: absolute;
    top: 2px;
    left: 6px;
    font-size: 18px;
    transition: left .4s ease;
}

#goal-tab .goal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    max-width: 100%;
    margin: 0 auto;
}

#goal-tab .goal-tile {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background .15s;
}

#goal-tab .goal-tile:hover:not(.revealed):not(.bomb):not(.disabled) {
    background: rgba(255, 255, 255, .18);
}

#goal-tab .goal-tile.active-col {
    border-color: rgba(255, 215, 0, .5);
    box-shadow: 0 0 8px rgba(255, 215, 0, .3);
}

#goal-tab .goal-tile.revealed {
    background: rgba(255, 215, 0, .2);
    border-color: #ffd700;
}

#goal-tab .goal-tile.bomb {
    background: rgba(255, 0, 0, .4);
    border-color: #ff4444;
}

#goal-tab .goal-tile.disabled {
    cursor: not-allowed;
    opacity: .6;
}

#goal-tab .goal-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#goal-tab .goal-random-btn {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
}

#goal-tab .goal-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

#goal-tab .goal-bet-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

#goal-tab .goal-bet-label {
    color: #8892b0;
    font-size: 0.7rem;
    min-width: 40px;
}

#goal-tab .goal-bet-input {
    width: 52px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 5px;
    text-align: center;
}

#goal-tab .goal-stepper {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
}

#goal-tab .goal-preset-dropdown {
    position: relative;
}

#goal-tab .goal-coin-btn {
    background: rgba(255, 255, 255, .08);
    border: none;
    padding: 4px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#goal-tab .goal-preset-menu {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
    z-index: 30;
}

#goal-tab .goal-preset {
    background: rgba(255, 255, 255, .04);
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

#goal-tab .goal-preset:hover {
    background: var(--neon-cyan);
    color: #000;
}

#goal-tab .goal-preset.selected {
    background: var(--neon-cyan);
    color: #000;
}

#goal-tab .goal-footer-actions {
    display: flex;
    gap: 6px;
}

#goal-tab .goal-reset-btn {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: #fff;
    width: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

#goal-tab .goal-cashout-btn {
    flex: 1;
    background: linear-gradient(180deg, #e8a13a, #c47d20);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

#goal-tab .goal-cashout-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#goal-tab .goal-cashout-btn span {
    font-size: 11px;
    opacity: .8;
}

/* ===== MINI ROULETTE ===== */
#miniroulette-tab .roulette-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 4px 8px;
}

#miniroulette-tab .roulette-game-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    flex-wrap: wrap;
}

#miniroulette-tab .roulette-game-title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .03em;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
}

#miniroulette-tab .roulette-howto-btn {
    font-weight: 600;
    font-size: 11px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9a0;
    padding: 6px 10px;
    border-radius: 14px;
    cursor: pointer;
}

#miniroulette-tab .roulette-sound-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
}

#miniroulette-tab .roulette-sound-btn.muted {
    color: #e88b7c;
}

#miniroulette-tab .roulette-body {
    position: relative;
}

#miniroulette-tab .roulette-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 200;
    white-space: nowrap;
}

#miniroulette-tab .roulette-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
}

#miniroulette-tab .roulette-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

#miniroulette-tab .wheel-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

#miniroulette-tab .wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(.13, .75, .18, 1);
    box-shadow: 0 0 0 6px #0a3d20, 0 10px 30px rgba(0, 0, 0, .5);
}

#miniroulette-tab .wheel.spinning {
    transition: transform 5s cubic-bezier(.13, .75, .18, 1);
}

#miniroulette-tab .wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #ccc 70%);
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
    z-index: 5;
}

#miniroulette-tab .wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 14px solid #ffb648;
    z-index: 6;
}

#miniroulette-tab .roulette-controls {
    flex: 1;
    min-width: 260px;
}

#miniroulette-tab .roulette-bet-total {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
}

#miniroulette-tab .bet-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 40px) 36px;
    gap: 4px;
    max-width: 400px;
    margin: 0 auto;
}

#miniroulette-tab .num-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: transform .1s ease, outline .1s ease;
}

#miniroulette-tab .num-cell.red {
    background: #b32c2c;
}

#miniroulette-tab .num-cell.black {
    background: #1c1c1c;
}

#miniroulette-tab .num-cell.outside {
    grid-row: 3;
    background: rgba(0, 0, 0, .28);
    font-size: 10px;
    font-family: var(--font-mono);
    color: #fff;
    font-weight: 600;
}

#miniroulette-tab .num-cell.swatch.red {
    background: #b32c2c;
}

#miniroulette-tab .num-cell.swatch.black {
    background: #1c1c1c;
}

#miniroulette-tab .num-cell.selected {
    outline: 2px solid #ffb648;
}

#miniroulette-tab .num-cell.has-bet {
    outline: 2px solid #fff;
}

#miniroulette-tab .chip-mark {
    position: absolute;
    bottom: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ffb648;
    color: #3a2400;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #0d5a30;
    z-index: 3;
    padding: 0 4px;
}

#miniroulette-tab .rl-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

#miniroulette-tab .rl-mini {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dff5e6;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 6px 12px;
    cursor: pointer;
}

#miniroulette-tab .roulette-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-top: 10px;
    background: rgba(0, 0, 0, .16);
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
    justify-content: center;
}

#miniroulette-tab .chip-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

#miniroulette-tab .chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    border: 2px dashed rgba(255, 255, 255, .55);
    transition: transform .1s ease, outline .1s ease;
}

#miniroulette-tab .chip.selected {
    outline: 3px solid #ffb648;
    transform: scale(1.08);
}

#miniroulette-tab .chip[data-v="1"] {
    background: #555;
}

#miniroulette-tab .chip[data-v="10"] {
    background: #b32c2c;
}

#miniroulette-tab .chip[data-v="50"] {
    background: #2a5cc4;
}

#miniroulette-tab .chip[data-v="100"] {
    background: #2f8f4c;
}

#miniroulette-tab .chip[data-v="500"] {
    background: #111;
}

#miniroulette-tab .spin-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #5cbf3a, #3d8f24);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    font-weight: 700;
}

#miniroulette-tab .spin-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

#miniroulette-tab .roulette-caption {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: rgba(255, 255, 255, .45);
    text-align: center;
    padding: 6px 14px 12px;
}

#miniroulette-tab .roulette-history {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px auto 2px;
    max-width: 640px;
}

#miniroulette-tab .roulette-history-pill {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 11px;
    color: #fff;
    padding: 4px 9px;
    border-radius: 10px;
}

#miniroulette-tab .roulette-history-pill.red-pill {
    background: #b32c2c;
}

#miniroulette-tab .roulette-history-pill.black-pill {
    background: #1c1c1c;
}

#miniroulette-tab .roulette-history-pill.green-pill {
    background: #3d8f24;
}

/* ===== BALANCE BAR IN GAME HEADERS ===== */
.bar-balance {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== STICKY GAME HEADERS (all except bingo) ===== */
.keno-header,
.plinko-game-header,
.balloon-game-header,
.hilo-game-header,
.goal-game-header,
.roulette-game-header,
.aviator-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* ===== PLINKO RESPONSIVENESS ===== */
#plinko-tab .plinko-container {
    max-width: 100%;
    overflow-x: hidden;
}

#plinko-tab .plinko-pegfield {
    max-width: 100%;
    overflow: hidden;
}

/* ===== AVIATOR RESPONSIVENESS ===== */
#aviator-tab .aviator-container {
    max-width: 100%;
    padding: 4px 4px;
}

#aviator-tab .av-stage {
    max-height: 340px;
}

#aviator-tab .av-betfeed-wrapper {
    max-height: 260px;
    overflow-y: auto;
}

/* ===== KENO RESTRUCTURED ===== */
#keno-tab .keno-countdown {
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    color: var(--neon-gold);
    padding: 6px 0;
}

#keno-tab .keno-drawn-area {
    min-height: 200px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

#keno-tab .keno-drawn-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--neon-cyan);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: kenoPop .3s ease-out;
}

@keyframes kenoPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#keno-tab .keno-bet-row {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 8px 0;
}

#keno-tab .keno-bet-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 4px;
    border-radius: 3px;
    padding: 0;
    position: relative;
    flex: 1 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #242B31;
    background: linear-gradient(180deg, #242B31 0%, #333F46 100%);
}

#keno-tab .keno-bet-input-wrap input {
    flex: 1;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px;
    font-size: 16px;
    font-weight: 700;
    min-width: 0;
}

#keno-tab .keno-bet-step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    padding: 4px;
    text-align: center;
    height: 100%;
    cursor: pointer;
}

#keno-tab .keno-bet-mult {
    flex: 1;
    padding: 10px 0;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(16% - 0.375em);
    margin-left: 4px;
    text-transform: lowercase;
    width: 20%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    border-radius: 3px;
    background: #333F46;
    background: linear-gradient(180deg, #333F46 0%, #242B31 100%);
}

#keno-tab .keno-play-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--neon-cyan);
    color: #000;
    font-weight: 800;
    font-size: 16px;
    border: none;
    cursor: pointer;
    margin-top: 6px;
    height: 44px;
    position: relative;
    text-align: center;
    border-radius: 3px;
    background: #4C8B65;
    background: linear-gradient(180deg, #4C8B65 0%, #254632 100%);
    opacity: 0.6;
}

#keno-tab .keno-play-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

#keno-tab .keno-game-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-color);
}

#keno-tab .keno-game-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    font-size: 12px;
}

#keno-tab .keno-game-row .pick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

#keno-tab .keno-game-row .pick-chip {
    background: var(--bg-elevated);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

#keno-tab .keno-game-row .pick-chip.matched {
    background: var(--neon-cyan);
    color: #000;
}

/* --- Aviator Bet/Auto mode switching + auto bet switch --- */
#aviator-tab .av-bet-panel.auto-mode .av-bet-control,
#aviator-tab .av-bet-panel.auto-mode .av-presets { display:none; }
#aviator-tab .av-bet-panel:not(.auto-mode) .av-auto-feature { display:none; }
#aviator-tab .av-autobet { display:flex; align-items:center; gap:8px; font-size:13px;
  font-weight:600; color:#dbe4f0; cursor:pointer; user-select:none; }
#aviator-tab .av-autobet input { width:18px; height:18px; accent-color:#e5533f; cursor:pointer; }

/* ===== KENO FINAL THEME — authoritative overrides =====
   Placed LAST so these win over the earlier keno blocks
   (mockup @3259, ball anims @5055, sticky header @7403,
   restructured @7443). Targets the FastKeno reference layout:
   dark charcoal 10x8 grid, green drawn numbers, amber timer,
   dark/green ball tray, green BET bar. */

/* --- Header / logo --- */
#keno-tab .keno-header {
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    background: #17191b;
    border-bottom: 1px solid #26292c;
}

#keno-tab .keno-logo {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: .6px;
    color: #f2f4f5;
}

#keno-tab .keno-logo span {
    color: #35b558;
}

/* --- Timer (amber, monospace — matches "00 : 74") --- */
#keno-tab .timer-display {
    color: #e39b2f;
    font-family: 'Courier New', Courier, monospace;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: none;
    margin: 6px 0;
}

/* --- Draw hub --- */
#keno-tab .draw-hub-area {
    background: radial-gradient(120% 120% at 20% 0%, #1d2a20 0%, #14181a 60%, #101213 100%);
    border: 1px solid #23282b;
    border-radius: 10px;
}

#keno-tab .status-message {
    color: #35b558;
}

/* --- Board --- */
#keno-tab .keno-board {
    gap: 4px;
    background: #0d0e0f;
    padding: 6px;
    border-radius: 8px;
}

#keno-tab .kno-cell {
    height: 42px;
    background: linear-gradient(180deg, #2a2f32 0%, #1f2326 100%);
    border: 1px solid #14171a;
    border-radius: 6px;
    color: #cfd4d7;
    font-size: 15px;
    font-weight: 700;
}

#keno-tab .kno-cell:hover {
    background: linear-gradient(180deg, #343a3e 0%, #262b2f 100%);
    border-color: #3c4448;
    color: #ffffff;
}

#keno-tab .kno-cell.drawn:not(.picked) {
    background: #16281b;
    border-color: #2c6b3d;
    color: #a9e8ba;
}

#keno-tab .kno-cell.drawn-hit {
    background: linear-gradient(180deg, #40ad57 0%, #2c7d3e 100%);
    border-color: #4ec466;
    color: #05150a;
    box-shadow: 0 0 8px rgba(64, 173, 87, .40);
}

#keno-tab .kno-cell.picked:not(.drawn-hit) {
    background: linear-gradient(180deg, #21422c 0%, #183220 100%);
    border-color: #35b558;
    color: #d6f0dd;
}

#keno-tab .kno-cell.picked::after {
    top: 2px;
    right: 2px;
    width: 5px;
    height: 5px;
    background-color: #5ea9ff;
    box-shadow: none;
}

/* --- Ball tray (two rows of 10) --- */
#keno-tab .drawn-tray {
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    gap: 8px;
}

/* size comes from .tray-slot (responsive square); the ball just fills it */
#keno-tab .ball-sphere {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    font-size: clamp(9px, 2.6vw, 12px);
    color: #e9edf0;
    border: 1px solid #4a545a;
    background: radial-gradient(circle at 35% 28%, #3a4348 0%, #22282c 55%, #14181b 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .18), 0 2px 6px rgba(0, 0, 0, .55);
}

#keno-tab .ball-sphere.match {
    color: #05170b;
    border-color: #7bf09a;
    background: radial-gradient(circle at 35% 28%, #6ee88a 0%, #35b558 55%, #1f7a37 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .35), 0 0 10px rgba(53, 181, 88, .55);
}

/* --- Bet bar: [-] [2] [+]  X2  MAX  [BET] --- */
#keno-tab .keno-bet-row {
    gap: 6px;
    padding: 8px 0 4px;
}

#keno-tab .keno-bet-input-wrap {
    flex: 0 0 42%;
    background: linear-gradient(180deg, #242a2d 0%, #1b2023 100%);
    border: 1px solid #14171a;
    border-radius: 8px;
}

#keno-tab .keno-bet-input-wrap input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

#keno-tab .keno-bet-step {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2c3236 0%, #20262a 100%);
    border: 1px solid #14171a;
    color: #ffffff;
    font-size: 20px;
}

#keno-tab .keno-bet-mult {
    flex: 0 0 auto;
    width: auto;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2c3236 0%, #20262a 100%);
    border: 1px solid #14171a;
    color: #35b558;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    margin-left: 0;
}

#keno-tab .keno-play-btn {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #4bbf63 0%, #2b7d3e 100%);
    color: #04140a;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1px;
    opacity: 1;
}

#keno-tab .keno-play-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ===== TEST MODE BANNER =====
   Shown while settings.test_mode is on: every non-Bingo game runs for 0 ETB.
   Bingo is unaffected. Lives inside #app; applyTestMode() toggles display. */
#test-mode-banner,
.test-mode-banner {
    display: none;
    margin: 6px 10px 2px;
    padding: 4px 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .2px;
    color: #ffd166;
    background: rgba(107, 86, 25, .28);
    border: 1px solid #6b5619;
    border-radius: 6px;
}

body.test-mode-active #keno-tab,
body.test-mode-active #aviator-tab,
body.test-mode-active #plinko-tab,
body.test-mode-active #hilo-tab,
body.test-mode-active #goal-tab,
body.test-mode-active #balloon-tab,
body.test-mode-active #roulette-tab {
    /* subtle cue that money is not in play */
    box-shadow: inset 0 3px 0 0 rgba(255, 209, 102, .55);
}

/* ===== TEST MODE BANNER (bingo pilot) =====
   Shown when settings.test_mode is on: the lobby offers only the free 0 ETB
   game, boards cost nothing and no prize is credited. */
#bingo-lobby .test-mode-banner {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a2f10 0%, #241d09 100%);
    border: 1px solid #6b5619;
    color: #ffd166;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    letter-spacing: .3px;
}

/* ===== Website sign-in ===== */
.website-auth-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background:
        radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, .2), transparent 48%),
        rgba(5, 10, 19, .97);
}

.website-auth-gate[hidden] {
    display: none;
}

.website-auth-card {
    width: min(100%, 440px);
    padding: clamp(24px, 6vw, 40px);
    text-align: center;
    border: 1px solid rgba(245, 190, 72, .38);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(24, 40, 49, .98), rgba(11, 17, 29, .99));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55), 0 0 32px rgba(16, 185, 129, .1);
}

.website-auth-logo {
    width: 84px;
    height: 76px;
    object-fit: contain;
    margin: 0 auto 8px;
}

.website-auth-kicker {
    color: #f3bd4f;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .2em;
}

.website-auth-card h1 {
    margin: 6px 0 10px;
    color: #fff6dd;
    font-size: clamp(1.5rem, 6vw, 2rem);
}

.website-auth-description,
.website-auth-note {
    color: #b7c5c8;
    font-size: .94rem;
}

.telegram-login-widget {
    display: flex;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    margin: 22px auto 8px;
}

.website-auth-message {
    min-height: 1.5em;
    margin: 10px 0;
    color: #ffd166;
    font-size: .9rem;
}

.website-auth-note {
    margin-top: 16px;
    font-size: .78rem;
}

.website-logout-btn {
    grid-column: 1 / -1;
    border-color: rgba(239, 68, 68, .35);
    color: #fecaca;
}

.website-logout-btn[hidden] {
    display: none;
}

/* ===== Independent player profile ===== */
.profile-page {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px);
    border: 1px solid rgba(245, 190, 72, .18);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(16, 185, 129, .1), transparent 38%),
        linear-gradient(150deg, rgba(19, 31, 40, .96), rgba(9, 15, 25, .98));
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.profile-page-header {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3vw, 28px);
    margin-bottom: 24px;
}

.profile-page-header h2 {
    margin: 2px 0 0;
    color: #fff6dd;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.profile-page-kicker {
    margin: 0;
    color: #f3bd4f;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.profile-back-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    color: #edf3f2;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
}

.profile-back-button:hover {
    border-color: rgba(245, 190, 72, .5);
    background: rgba(245, 190, 72, .09);
}

.profile-signin-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px 20px;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid rgba(245, 190, 72, .25);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(32, 49, 53, .78), rgba(14, 22, 33, .88));
}

.profile-signin-panel[hidden],
.profile-details[hidden] {
    display: none;
}

.profile-signin-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(245, 190, 72, .3);
    border-radius: 16px;
    background: rgba(245, 190, 72, .1);
    color: #ffd166;
    font-size: 1.5rem;
}

.profile-signin-panel h3 {
    margin: 6px 0;
    color: #fff6dd;
    font-size: clamp(1.05rem, 3vw, 1.35rem);
}

.profile-signin-panel p:not(.profile-page-kicker) {
    margin: 0;
    color: #b7c5c8;
    font-size: .92rem;
    line-height: 1.6;
}

.profile-signin-button {
    grid-column: 2;
    justify-self: start;
    min-height: 46px;
    padding-inline: 20px;
    background: linear-gradient(135deg, #f2c14e, #dc9228);
    color: #1d1708;
}

.profile-details {
    display: grid;
    gap: 16px;
}

.profile-details .profile-card-compact {
    min-height: 96px;
    margin: 0;
    padding: 18px;
    border-color: rgba(245, 190, 72, .22);
    background: linear-gradient(135deg, rgba(33, 49, 56, .92), rgba(15, 24, 35, .96));
}

.profile-connection-label {
    margin: 4px 0 0;
    color: #7dd3a7;
    font-size: .75rem;
    font-weight: 700;
}

.profile-details .stats-grid-compact {
    gap: 10px;
    margin: 0;
}

.profile-details .stat-item {
    min-width: 0;
    padding: 14px 8px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(7, 13, 22, .58);
}

.profile-details .stat-value {
    overflow-wrap: anywhere;
}

.profile-details .referral-compact {
    margin: 0;
}

.profile-details .referral-code-compact {
    min-height: 68px;
    padding: 12px 16px;
    border-color: rgba(99, 102, 241, .24);
    background: rgba(7, 13, 22, .58);
}

.referral-copy {
    display: grid;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.profile-details .profile-actions-compact {
    margin: 0;
}

@media (max-width: 520px) {
    .profile-page {
        padding: 16px;
        border-radius: 18px;
    }

    .profile-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .profile-signin-panel {
        grid-template-columns: 1fr;
    }

    .profile-signin-button {
        grid-column: 1;
        justify-self: stretch;
    }

    .profile-details .stats-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-details .profile-card-compact {
        flex-wrap: wrap;
    }

    .profile-details .balance-chip {
        max-width: 100%;
        margin-left: 0;
    }

    .profile-details .referral-code-compact {
        flex-wrap: wrap;
    }

    .referral-copy {
        flex-basis: 100%;
    }
}

/* ===== Responsive shared lobby and game navigation ===== */
.app {
    width: min(100%, 1440px);
    max-width: 1440px;
    min-height: 100svh;
    margin-inline: auto;
    padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}

#main-header,
#main-content,
.tab-content {
    min-width: 0;
}

#bingo-lobby .stake-table-header {
    display: none;
}

#bingo-lobby .stake-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
    padding: 8px 0;
}

#bingo-lobby .stake-row {
    min-width: 0;
    min-height: 190px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "stake status"
        "players derash"
        "action action";
    align-items: center;
    gap: 14px 10px;
    padding: 16px;
    border: 1px solid rgba(245, 190, 72, .28);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(16, 185, 129, .13), transparent 58%),
        linear-gradient(145deg, rgba(25, 39, 48, .98), rgba(12, 19, 31, .98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px rgba(0, 0, 0, .2);
}

#bingo-lobby .col-stake {
    grid-area: stake;
    min-width: 0;
}

#bingo-lobby .stake-amount {
    display: block;
    color: #ffcf62;
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.15;
}

#bingo-lobby .stake-caption {
    display: block;
    margin-top: 4px;
    color: #a8b8bc;
    font-size: .78rem;
}

#bingo-lobby .col-status {
    grid-area: status;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    color: #f3f6f7;
    font-size: .78rem;
}

#bingo-lobby .lobby-countdown-badge {
    white-space: nowrap;
}

#bingo-lobby .col-players {
    grid-area: players;
}

#bingo-lobby .col-derash {
    grid-area: derash;
    text-align: right;
}

#bingo-lobby .col-players,
#bingo-lobby .col-derash {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    color: #fff;
}

#bingo-lobby .stake-meta-label {
    color: #9caeb2;
    font-size: .72rem;
    font-weight: 600;
}

#bingo-lobby .stake-value {
    color: #eff7f3;
    font-size: 1rem;
    font-weight: 800;
}

#bingo-lobby .col-action {
    grid-area: action;
}

#bingo-lobby .col-action button {
    width: 100%;
    min-height: 44px;
    border-radius: 11px;
    font-size: .95rem;
    font-weight: 800;
}

.game-card {
    min-width: 0;
    border-color: rgba(245, 190, 72, .17);
    background: linear-gradient(150deg, rgba(24, 40, 49, .96), rgba(12, 18, 30, .98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 8px 20px rgba(0, 0, 0, .2);
}

.game-card.active,
.game-card:hover {
    border-color: rgba(245, 190, 72, .62);
    box-shadow: 0 0 20px rgba(245, 190, 72, .13);
}

@media (max-width: 520px) {
    #main-header {
        gap: 8px;
        padding-inline: 10px;
    }

    #main-header .header-logo img {
        width: 48px;
        height: auto;
    }

    #main-header .balance-chip {
        max-width: calc(100vw - 116px);
        overflow: hidden;
        white-space: nowrap;
        font-size: 9px !important;
    }

    #main-header .balance-chip span {
        font-size: 10px !important;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
        gap: 9px;
        padding-inline: 10px;
    }

    .game-card {
        min-height: 104px;
        padding: 10px 7px;
    }

    .game-card .game-icon {
        width: 52px;
        height: 52px;
    }

    .game-card .game-name {
        font-size: .82rem;
        text-align: center;
        line-height: 1.25;
    }

    #bingo-lobby .stake-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #bingo-lobby .stake-row {
        min-height: 174px;
        gap: 12px 6px;
        padding: 12px 10px;
    }

    #bingo-lobby .col-status {
        font-size: .7rem;
    }
}

@media (min-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 1120px;
        gap: 14px;
        padding: 12px 16px;
    }

    .game-card {
        min-height: 142px;
    }

    .game-card .game-icon {
        width: 76px;
        height: 76px;
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    #main-header {
        padding-inline: 24px;
    }

    #bingo-tab {
        max-width: 1240px;
        margin-inline: auto;
    }
}

/* ===== MULTI HOT 5 (slot) — SmartSoft-style stage UI (scoped) ===== */
#multihot5-tab { --gold:#f6c744; --line:#d9a93a; --pink:#d6204f; --panel:#06261c; --text:#fff3b0; }
#multihot5-tab.active { display:block; position:fixed; inset:0; z-index:40; overflow:hidden;
  background:#04180f; font-family:"Lilita One","Trebuchet MS",Impact,sans-serif; user-select:none;
  -webkit-tap-highlight-color:transparent;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
#multihot5-tab * { box-sizing:border-box; }
#multihot5-tab .mt-back { position:fixed; left:10px; top:10px; z-index:9999; width:44px; height:44px;
  background:rgba(0,0,0,.45); color:#fff3b0; border:2px solid #d9a93a; border-radius:10px;
  font-size:20px; line-height:1; cursor:pointer; }
#multihot5-tab #stage { position:absolute; left:50%; top:50%; width:1705px; height:798px; transform-origin:center;
  background:linear-gradient(rgba(3,22,14,.30), rgba(3,22,14,.55)), url("icons/mh5/background.jpg") center/cover no-repeat; }
#multihot5-tab .abs { position:absolute; }
#multihot5-tab #stage h1 { position:absolute; left:0; width:1705px; top:22px; margin:0; text-align:center; font-size:84px; letter-spacing:3px; font-weight:400; background:linear-gradient(#fff2a0,#f6b820 55%,#b97a10); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 0 14px rgba(255,200,40,.4)) drop-shadow(0 3px 0 #6b4308); }
#multihot5-tab #stage h1 b { font-weight:400; background:linear-gradient(#ffd0e0,#ff4f86 60%,#b0124a); -webkit-background-clip:text; background-clip:text; color:transparent; margin-left:8px; }
#multihot5-tab .lbl { font-size:19px; color:var(--gold); letter-spacing:1px; top:118px; }
#multihot5-tab .lbl b { font-size:25px; font-weight:400; }
#multihot5-tab .frame { border:3px solid var(--line); background:var(--panel); box-shadow:0 0 0 2px #5b3f0b,inset 0 0 30px rgba(0,0,0,.55); overflow:hidden; }
#multihot5-tab .strip { position:absolute; left:0; top:0; width:100%; will-change:transform; }
#multihot5-tab .strip>div { display:flex; align-items:center; justify-content:center; }
#multihot5-tab #reels { left:554px; top:151px; width:782px; height:496px; }
#multihot5-tab .col { position:absolute; top:0; height:100%; width:261px; border-right:3px solid #0b6b4a; overflow:hidden; }
#multihot5-tab .col:last-child { border:0; }
#multihot5-tab .col .strip>div { height:165px; font-size:100px; line-height:1; filter:drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
#multihot5-tab .p { display:flex; font-weight:400; }
#multihot5-tab .p>* { margin:0 -6px; }
#multihot5-tab .pl { display:inline-block; width:78px; height:92px; border-radius:50% 50% 48% 48%; background:radial-gradient(circle at 35% 30%,#7b5ab0,#3a1d66 45%,#1c0b3a); position:relative; box-shadow:inset -6px -8px 14px rgba(0,0,0,.45); }
#multihot5-tab .pl:after { content:""; position:absolute; left:38px; top:-12px; width:32px; height:16px; border-radius:0 100% 0 100%; background:#3fae4a; transform:rotate(-10deg); }
#multihot5-tab .s7 { font-size:150px; color:#e4212d; -webkit-text-stroke:5px #f7c33a; font-style:italic; font-weight:700; letter-spacing:-8px; text-shadow:0 5px 0 #8a1a1a; }
#multihot5-tab .sd { font-size:150px; color:#ffc61a; -webkit-text-stroke:4px #d77a0c; letter-spacing:-18px; text-shadow:0 6px 0 #9a5208; }
#multihot5-tab .win { animation:mh5-pulse .5s ease-in-out infinite alternate; }
@keyframes mh5-pulse { to { transform:scale(1.15); filter:drop-shadow(0 0 22px #ffd34a); } }
#multihot5-tab #mult { left:362px; top:150px; width:168px; height:498px; }
#multihot5-tab #mult .strip>div, #multihot5-tab #mwin .strip>div { height:166px; font-size:104px; -webkit-text-stroke:3px rgba(0,0,0,.45); color:var(--c); }
#multihot5-tab #mult .strip>div { opacity:.55; }
#multihot5-tab .mx { font-size:80px; margin-left:2px; color:inherit; }
#multihot5-tab #mhl { left:352px; top:316px; width:188px; height:176px; border:6px solid var(--pink); border-radius:16px; box-shadow:0 0 18px rgba(214,32,79,.8),inset 0 0 14px rgba(214,32,79,.5); z-index:3; pointer-events:none; background:linear-gradient(#27995f,#146b40); }
#multihot5-tab #mwin { left:364px; top:326px; width:164px; height:156px; z-index:4; overflow:hidden; border:3px solid var(--line); border-radius:6px; }
#multihot5-tab #mwin .mx { color:var(--gold); -webkit-text-stroke:3px #8a5a0a; }
#multihot5-tab .hex { width:122px; height:136px; clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background:#2b9467; cursor:pointer; display:flex; align-items:center; justify-content:center; border:0; padding:0; transition:opacity .2s; }
#multihot5-tab .hex>div { width:112px; height:126px; clip-path:inherit; background:#0a3a2a; display:flex; align-items:center; justify-content:center; color:#3aa57b; font-size:50px; }
#multihot5-tab .hex.dim { opacity:.4; }
#multihot5-tab .hex.on>div { color:var(--gold); background:#0f4d38; }
#multihot5-tab .hex svg { width:62px; height:62px; stroke:#3fb083; fill:none; stroke-width:5; stroke-linecap:round; stroke-linejoin:round; }
/* Autoplay ON -> the button turns RED and pulses so it reads as a STOP control
   the player can hit at a glance. (clip-path would clip a box-shadow, so the
   glow is a drop-shadow filter.) */
#multihot5-tab #bAuto.on { background:#a8181f; animation:mh5-autopulse .9s ease-in-out infinite alternate; }
#multihot5-tab #bAuto.on > div { background:#3a0b0e; color:#ff6b6b; }
#multihot5-tab #bAuto.on svg { stroke:#ff4d4d; }
@keyframes mh5-autopulse {
    from { filter:drop-shadow(0 0 6px rgba(255,60,60,.55)); }
    to   { filter:drop-shadow(0 0 16px rgba(255,60,60,1)); }
}
#multihot5-tab #cap { left:1470px; top:236px; width:124px; height:330px; border:3px solid #1e8a5a; border-radius:46px; background:linear-gradient(#0a3a29,#072a1e); box-shadow:inset 0 0 0 4px #0a3d2b; }
#multihot5-tab #cap:before, #multihot5-tab #cap:after { content:""; position:absolute; left:34px; width:50px; height:4px; border-radius:2px; background:var(--gold); }
#multihot5-tab #cap:before { top:12px; }
#multihot5-tab #cap:after { bottom:12px; }
#multihot5-tab .nb { position:absolute; left:1470px; width:124px; text-align:center; color:var(--gold); font-size:25px; line-height:1; transition:opacity .2s; }
#multihot5-tab .nb small { display:block; font-size:19px; }
#multihot5-tab .bbtn { position:absolute; left:1494px; width:76px; height:70px; background:linear-gradient(#35c785,#13774a); border:3px solid #0c5334; border-radius:10px; color:#eafff2; font-size:52px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; transition:opacity .2s; }
#multihot5-tab .bbtn:active { filter:brightness(1.25); }
#multihot5-tab .off { opacity:.35; pointer-events:none; }
#multihot5-tab #cur { left:1438px; top:322px; width:190px; height:170px; clip-path:polygon(20% 0,80% 0,100% 28%,100% 78%,80% 100%,20% 100%,0 78%,0 28%); background:linear-gradient(#ff5a86,#c01744); cursor:pointer; border:0; padding:0; z-index:2; }
#multihot5-tab #cur>div { position:absolute; inset:8px; clip-path:inherit; background:radial-gradient(circle at 50% 25%,#1f7a56,#0a3a29); color:var(--gold); text-align:center; padding-top:26px; font-size:40px; line-height:1; }
#multihot5-tab #cur small { font-size:28px; }
#multihot5-tab #cur svg { display:block; margin:4px auto 0; width:84px; height:36px; stroke:#f5a623; stroke-width:12; fill:none; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 3px 0 #8a5200); }
#multihot5-tab #cur .ld, #multihot5-tab #cur .st { display:none; position:absolute; left:0; right:0; top:0; bottom:0; align-items:center; justify-content:center; }
#multihot5-tab #cur[data-s=load] .ld { display:flex; }
#multihot5-tab #cur[data-s=stop] .st { display:flex; }
#multihot5-tab #cur[data-s=load] .nm, #multihot5-tab #cur[data-s=stop] .nm { visibility:hidden; }
#multihot5-tab .ld svg { width:70px; height:70px; margin:0; stroke:#e5213f; stroke-width:14; fill:none; filter:none; animation:mh5-rot .7s linear infinite; }
@keyframes mh5-rot { to { transform:rotate(360deg); } }
#multihot5-tab .st i { width:34px; height:34px; border-radius:7px; background:radial-gradient(circle at 40% 30%,#ff4a5c,#d50f2c); box-shadow:0 0 10px rgba(255,40,60,.6); }
#multihot5-tab #cv.sw, #multihot5-tab #nv.sw, #multihot5-tab #pv.sw { animation:mh5-sw .22s; }
@keyframes mh5-sw { from { transform:translateY(-14px); opacity:.2; } }
#multihot5-tab #bar { left:452px; top:667px; width:781px; height:60px; background:#07271d; border:3px solid var(--line); clip-path:polygon(0 0,100% 0,96% 100%,4% 100%); display:flex; align-items:center; }
#multihot5-tab #bar>div { flex:1; display:flex; align-items:center; justify-content:center; gap:24px; color:var(--text); font-size:22px; line-height:.95; text-align:center; border-right:2px solid #0f5a3f; }
#multihot5-tab #bar>div:last-child { border:0; }
#multihot5-tab #bar small { display:block; font-size:15px; }
#multihot5-tab #bar svg { width:34px; height:34px; stroke:#2ee08f; fill:none; stroke-width:2.2; stroke-linejoin:round; }
#multihot5-tab #msg { left:554px; top:600px; width:782px; text-align:center; color:#fff; font-size:34px; text-shadow:0 0 12px #ffcf3a,0 2px 0 #000; pointer-events:none; opacity:0; z-index:6; }
#multihot5-tab #msg.show { animation:mh5-fu 1.9s forwards; }
@keyframes mh5-fu { 0% { opacity:0; transform:translateY(10px); } 15%,80% { opacity:1; transform:none; } 100% { opacity:0; } }
#multihot5-tab button:focus-visible { outline:3px solid #fff; }

/* ---- symbol + multiplier artwork (replaces the emoji glyphs) ---- */
/* The Box PNGs are 500x500 with big transparent margins (content ~300x250),
   so the <img> is sized beyond the 165px cell and the cell clips the padding;
   the fruit fills the cell at a bold, glossy size matching the sample design. */
#multihot5-tab .col .strip>div { overflow:hidden; filter:none; }
#multihot5-tab .col .strip>div img.sy {
  height:225px; width:auto; object-fit:contain;
  filter:drop-shadow(0 5px 7px rgba(0,0,0,.62)) drop-shadow(0 0 9px rgba(255,214,90,.42)) saturate(1.1) contrast(1.03);
}
#multihot5-tab #mult .strip>div, #multihot5-tab #mwin .strip>div { overflow:hidden; }
#multihot5-tab #mult .strip>div img.sy, #multihot5-tab #mwin .strip>div img.sy {
  height:170px; width:auto; object-fit:contain;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.55)) drop-shadow(0 0 8px rgba(255,214,90,.45));
}
/* inside-game title image / logo (multihot5_inside_logo_sm.png, 361x100) */
#multihot5-tab #stage h1 { display:none; }
#multihot5-tab .mh5-logo { display:block; left:50%; top:16px; height:96px; width:auto; transform:translateX(-50%);
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.55)); }

/* ---- portrait (phone) layout. Order is unchanged:
   bar (top-right) -> title image -> multiplier -> REELS -> bet row -> options. */
#multihot5-tab.mh5-p #stage { width:820px; height:1330px; }
#multihot5-tab.mh5-p .lbl { display:none; }
#multihot5-tab.mh5-p .mh5-logo { top:66px; }
#multihot5-tab.mh5-p #bar { left:auto; right:8px; top:10px; width:400px; height:50px; }
#multihot5-tab.mh5-p #bar>div { gap:8px; font-size:18px; }
#multihot5-tab.mh5-p #bar svg { width:24px; height:24px; }
#multihot5-tab.mh5-p #bar small { font-size:13px; }
/* compact multiplier window: one value, rolling TOP-DOWN (tall ladder hidden) */
#multihot5-tab.mh5-p #mult { display:none; }
#multihot5-tab.mh5-p #mhl { left:300px; top:196px; width:220px; height:190px; }
#multihot5-tab.mh5-p #mwin { left:310px; top:206px; width:200px; height:176px; }
#multihot5-tab.mh5-p #reels { left:19px; top:410px; }
#multihot5-tab.mh5-p #msg { left:19px; top:860px; width:782px; }
#multihot5-tab.mh5-p #cap { left:104px; top:930px; width:612px; height:206px; border-radius:103px; }
#multihot5-tab.mh5-p #cap:before, #multihot5-tab.mh5-p #cap:after { display:none; }
#multihot5-tab.mh5-p #plus { left:115px !important; top:998px !important; }
#multihot5-tab.mh5-p #nbT { left:191px !important; top:1012px !important; }
#multihot5-tab.mh5-p #cur { left:315px; top:948px; }
#multihot5-tab.mh5-p #nbB { left:505px !important; top:1074px !important; }
#multihot5-tab.mh5-p #minus { left:629px !important; top:998px !important; }
#multihot5-tab.mh5-p #bAuto { left:227px !important; top:1154px !important; }
#multihot5-tab.mh5-p #bTwo { left:349px !important; top:1154px !important; }
#multihot5-tab.mh5-p #bCol { left:471px !important; top:1154px !important; }

/* ==========================================================================
   FETAN RACE X (CarX) — single-player crash game
   The artwork itself is drawn procedurally on canvas at runtime; this block
   only styles the shell, HUD and controls. Everything is scoped to #carx-tab.
   ========================================================================== */
#carx-tab{position:fixed;inset:0;background:#05050c;overflow:hidden;z-index:40}
#cx-stage{position:absolute;inset:0;display:flex;flex-direction:column;background:#0a0a17}
#cx-scroll{flex:1;overflow-y:auto;padding:8px 10px 14px;scrollbar-width:none}
#cx-scroll::-webkit-scrollbar{display:none}

/* the strip of recent crash points — real rounds from /api/carx/history,
   scrollable left <-> right (newest first) */
#cx-hist{display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;height:22px;
  padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
#cx-hist::-webkit-scrollbar{display:none}
.cx-h{flex:none;font-size:10px;font-weight:800;line-height:18px;padding:0 6px;border-radius:6px;
  background:#2a2410;border:1px solid #8a6d1a;color:#ffd54a;animation:cxpop .4s}
.cx-h.lo{background:#1a1a2c;border-color:#444;color:#cfcfe0}
.cx-h.hi{background:#0d3a35;border-color:#2fd1a0;color:#5cffd0}
@keyframes cxpop{from{transform:scale(.3);opacity:0}}

/* the racing window */
#cx-win{position:relative;height:228px;margin-top:6px;overflow:hidden;background:#080814;
  border-radius:26px 26px 52px 52px/26px 26px 38px 38px;
  box-shadow:0 0 0 2px #3556ff,0 0 22px #3556ff99,inset 0 0 26px #3556ff66}
#cx-cv{position:absolute;inset:0;width:100%;height:100%}
#cx-plaque{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:3;padding:5px 32px 10px;
  clip-path:polygon(0 0,100% 0,86% 100%,14% 100%);background:linear-gradient(#3a3a66,#0b0b1e)}
#cx-plaque span{font-weight:900;font-style:italic;font-size:21px;letter-spacing:1px;
  background:linear-gradient(#fff,#bba9ff 55%,#7a5cff);-webkit-background-clip:text;background-clip:text;
  color:transparent;filter:drop-shadow(0 0 6px #7a5cff)}
/* The app's global font is Oswald; the racetrack HUD must use the PREVIEW's
   stack, and the size must scale with the window or a wide phone renders the
   multiplier tiny against a full-width track. */
#cx-mult{position:absolute;left:0;right:0;top:24%;text-align:center;
  font-family:"Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
  font-weight:900;font-style:italic;
  font-size:clamp(44px, 13vw, 74px);line-height:1;letter-spacing:1px;color:#fff;
  text-shadow:0 0 18px #fff6,0 4px 0 #0006;
  transition:color .2s,opacity .3s;z-index:2;pointer-events:none;font-variant-numeric:tabular-nums}
#cx-mult.y{color:#ffe27a}
#cx-mult.g{color:#5dff9d}
#cx-mult.red{color:#ff4a4a;animation:cxpl .3s 3}
@keyframes cxpl{50%{transform:scale(1.12)}}
#cx-sub{position:absolute;left:0;right:0;top:24%;margin-top:clamp(52px, 15vw, 84px);
  text-align:center;font-weight:800;
  font-size:12px;letter-spacing:4px;color:#ff8a8a;z-index:2;text-shadow:0 2px 8px #000}
#cx-wait{position:absolute;left:0;right:0;top:63%;text-align:center;transition:opacity .3s;z-index:2}
#cx-bar{width:54%;height:3px;margin:0 auto 12px;background:#ffffff22;border-radius:9px;overflow:hidden}
#cx-bf{display:block;height:100%;width:0;background:#ffc21a;box-shadow:0 0 8px #ffc21a}
#cx-wait b{font-size:14px;letter-spacing:.5px}
#cx-win:not([data-p=bet]) #cx-wait,
#cx-win[data-p=bet] #cx-mult,
#cx-win[data-p=bet] #cx-sub{opacity:0}
#cx-cr{position:absolute;inset:0;background:radial-gradient(circle,#0000 35%,#ff1e1e88);opacity:0;
  transition:opacity .25s;pointer-events:none}
#cx-win[data-p=crash] #cx-cr{opacity:1}
#cx-fl{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none}
#cx-fl.on{animation:cxfa .4s}
@keyframes cxfa{from{opacity:.9}to{opacity:0}}
#cx-toast{position:absolute;top:34px;left:50%;transform:translate(-50%,-10px);background:#0b0b18ee;
  border:1px solid #ffffff22;border-radius:10px;padding:5px 12px;font-size:12px;font-weight:700;
  opacity:0;transition:.25s;white-space:nowrap;z-index:5;pointer-events:none;max-width:88%}
#cx-toast.on{opacity:1;transform:translate(-50%,0)}
.cx-fl2{position:absolute;left:50%;top:48%;font-weight:900;font-size:22px;color:#5dff9d;
  text-shadow:0 0 12px #5dff9d,0 2px 0 #000;animation:cxup 1.4s forwards;z-index:4;pointer-events:none}
@keyframes cxup{from{transform:translate(-50%,0) scale(.6);opacity:1}
  to{transform:translate(-50%,-70px) scale(1.2);opacity:0}}

/* panels + controls */
.cx-pn{background:#0f1a28;border:1px solid #1f3b4d;border-radius:10px;padding:8px;margin-top:10px}
.cx-ti{font-size:10px;font-weight:700;letter-spacing:.4px;color:#a9bccd}
.cx-ti .gr{color:#4dffa0}
.cx-ti .or{color:#ffb02a}
.cx-row{display:flex;align-items:center;gap:8px;margin-top:8px}
.cx-tg{display:flex;align-items:center;gap:6px;font-size:9px;font-weight:700;color:#8fa3b8;
  cursor:pointer;user-select:none}
.cx-tg .sw{width:26px;height:14px;border-radius:9px;background:#2a3446;position:relative;transition:.2s}
.cx-tg .sw:after{content:"";position:absolute;left:2px;top:2px;width:10px;height:10px;border-radius:50%;
  background:#9aa8bd;transition:.2s}
.cx-tg .sw.on{background:#2fae6b}
.cx-tg .sw.on:after{left:14px;background:#fff}
/* the AUTO BET / AUTO CASHOUT switches glow red while armed, like the MH5 STOP */
.cx-tg.live .sw{background:#a8181f}
.cx-tg.live{color:#ffb3b3}
.cx-stp{display:flex;align-items:center;justify-content:space-between;background:#0a1220;
  border:1px solid #1c2c3d;border-radius:8px;padding:0 6px;height:34px;flex:1;font-weight:800}
.cx-stp b{font-size:13px;font-variant-numeric:tabular-nums}
.cx-stp i{font-style:normal;color:#ffd21f;font-weight:800}
.cx-stp button{width:26px;height:26px;font-size:17px;color:#9fb1c6;background:none;border:0;cursor:pointer}
.cx-stp button:active{color:#fff}
.cx-stp.ax{flex:none;width:118px;margin-left:auto}
.cx-stp.ax b{color:#ffe55a}
.cx-by{position:relative;border-radius:9px;background:linear-gradient(#ffe84a,#f3b800);color:#6b1a05;
  font-weight:900;font-size:14px;letter-spacing:.5px;border:0;cursor:pointer;line-height:1.1;
  box-shadow:0 3px 0 #9c6f00,0 6px 14px #f3b80033;transition:transform .08s,filter .2s}
.cx-by:active{transform:translateY(2px);box-shadow:0 1px 0 #9c6f00}
.cx-by small{display:block;font-size:11px;font-weight:800;opacity:.85}
.cx-by.q{background:linear-gradient(#2a3548,#1b2536);color:#ffd21f;box-shadow:0 3px 0 #0c1320}
.cx-by.co{background:linear-gradient(#6bffa6,#22b866);color:#06210f;box-shadow:0 3px 0 #0f7a40,0 0 22px #39e07a88;animation:cxcop .6s infinite alternate}
@keyframes cxcop{to{filter:brightness(1.18)}}
#cx-mb{flex:1.25;height:50px}

/* range markets */
#cx-rg{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.cx-rc{background:#0f1a28;border:1px solid #1f3b4d;border-radius:10px;padding:8px;transition:.25s}
.cx-rc .cx-by{width:100%;height:32px;margin-top:7px}
.cx-rc .rt b{font-style:italic;font-size:15px;font-weight:900}
.cx-t0{color:#4d8bff}.cx-t1{color:#3cf08a}.cx-t2{color:#31e6c5}.cx-t3{color:#ff5a5a}
.cx-rn{font-size:9px;color:#8fa3b8;margin:3px 0 6px}
.cx-rn span{color:#cfe0ee;font-weight:700}
.cx-rc .cx-stp{height:28px}
.cx-rc .cx-stp b{font-size:12px}
/* a STAGED range bet glows gold before the race (so queuing is visible), then
   green while that race is actually live */
.cx-rc[data-s=armed]{border-color:#ffd21f;box-shadow:0 0 14px #ffd21f66}
.cx-rc[data-s=live]{border-color:#39e07a;box-shadow:0 0 16px #39e07a88}
.cx-rc[data-s=gone]{opacity:.45}
.cx-rc.won{animation:cxwin .6s 3;border-color:#ffd21f}
.cx-rc.lost{border-color:#ff4a4a}
@keyframes cxwin{50%{box-shadow:0 0 26px #ffd21f;transform:scale(1.03)}}

/* round history table */
.cx-r{display:grid;grid-template-columns:1fr .9fr .8fr 1fr;font-size:11px;padding:5px 4px;
  border-bottom:1px solid #ffffff0a;animation:cxri .3s}
@keyframes cxri{from{opacity:0;transform:translateX(-8px)}}
.cx-r i{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-r i:nth-child(n+2){text-align:right}
.cx-r.cx-hd{font-size:9px;font-weight:800;color:#9fb1c6;animation:none}
.cx-r.win{background:#39e07a14;color:#7dffb0}
.cx-r.lost{opacity:.45}
#cx-rows{min-height:60px}

/* footer */
#cx-foot{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#0b1020;
  border-top:1px solid #1b2740}
.cx-ico{font-size:17px;width:38px;height:32px;background:none;border:1px solid #2c3d58;border-radius:7px;
  color:#9fb1c6;cursor:pointer}
#cx-bl{flex:1;text-align:right;font-weight:800;font-size:15px;line-height:1.1;color:#e8ecf5}
#cx-bl small{font-size:9px;opacity:.7}
#cx-bl span{display:block;font-size:8px;color:#4dffa0;letter-spacing:1px}

@media (max-width: 360px) {
    #keno-tab .game-back-btn,
    #keno-tab .keno-help-btn,
    #keno-tab .keno-sound-btn,
    #balloon-tab .game-back-btn,
    #balloon-tab .balloon-help-btn,
    #balloon-tab .balloon-sound-btn,
    #goal-tab .game-back-btn,
    #goal-tab .goal-howto-btn,
    #goal-tab .goal-sound-btn {
        min-height: 44px;
    }

    #keno-tab .game-back-btn,
    #keno-tab .keno-sound-btn,
    #balloon-tab .game-back-btn,
    #balloon-tab .balloon-sound-btn,
    #goal-tab .game-back-btn,
    #goal-tab .goal-sound-btn {
        min-width: 44px;
    }

    #keno-tab .keno-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #keno-tab .keno-tabs button {
        min-width: 0;
        min-height: 44px;
        padding-inline: 2px;
        font-size: 10px;
    }

    #balloon-tab .balloon-game-header,
    #goal-tab .goal-game-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 6px;
        row-gap: 6px;
    }

    #balloon-tab .game-back-btn,
    #goal-tab .game-back-btn {
        grid-row: 1;
        grid-column: 1;
    }

    #balloon-tab .balloon-game-select,
    #goal-tab .goal-game-title {
        grid-row: 1;
        grid-column: 2;
        min-width: 0;
    }

    #balloon-tab .bar-balance,
    #goal-tab .bar-balance {
        grid-row: 1;
        grid-column: 3;
    }

    #balloon-tab .balloon-help-btn,
    #goal-tab .goal-howto-btn {
        grid-row: 2;
        grid-column: 2;
        justify-self: start;
    }

    #balloon-tab .balloon-sound-btn,
    #goal-tab .goal-sound-btn {
        grid-row: 2;
        grid-column: 3;
        justify-self: end;
    }
}

/* ===== Shared casino finish ===== */
:root {
    --bg-primary: #100d09;
    --bg-secondary: #19130c;
    --bg-card: #21190f;
    --bg-card-hover: #302313;
    --bg-elevated: #382a17;
    --accent-primary: #f4c45e;
    --accent-primary-glow: rgba(244, 196, 94, .24);
    --text-primary: #f5f3e9;
    --text-secondary: #c3b9a7;
    --text-muted: #938773;
    --border-color: rgba(246, 224, 183, .1);
    --border-glow: rgba(244, 196, 94, .34);
    --border-gold: rgba(244, 196, 94, .3);
    --gradient-gold: linear-gradient(135deg, #ffe69a 0%, #f4c45e 45%, #c98a2d 100%);
    --gradient-gold-shine: linear-gradient(120deg, #ffe9a6, #f4c45e 42%, #d89a38 70%, #ffe9a6);
    --gradient-card: linear-gradient(145deg, rgba(39, 29, 17, .97), rgba(17, 13, 9, .99));
    --gradient-header: linear-gradient(180deg, rgba(17, 13, 9, .98), rgba(17, 13, 9, .88));
    --shadow-glow: 0 0 24px rgba(244, 196, 94, .12);
}

body {
    background:
        radial-gradient(ellipse at 12% -8%, rgba(175, 117, 34, .18), transparent 38%),
        radial-gradient(ellipse at 92% 14%, rgba(205, 151, 59, .12), transparent 32%),
        linear-gradient(160deg, #100d09 0%, #171109 48%, #0d0b09 100%);
    background-attachment: scroll;
}

.app {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
}

#main-header {
    min-height: 64px;
    padding-block: 8px;
    border-bottom: 1px solid rgba(244, 196, 94, .16);
    background: var(--gradient-header);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

#main-header .header-logo {
    display: inline-flex;
    align-items: center;
}

#main-header .header-logo img {
    display: block;
    width: clamp(46px, 5vw, 58px);
    height: auto;
    filter: drop-shadow(0 3px 12px rgba(244, 196, 94, .18));
}

#main-header .header-right {
    align-items: center;
    gap: 10px;
}

#main-header .balance-chip {
    min-height: 38px;
    padding: 6px 12px !important;
    border-color: rgba(244, 196, 94, .3) !important;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(55, 40, 20, .98), rgba(24, 17, 10, .99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 6px 18px rgba(0, 0, 0, .2) !important;
    color: #f8e8bd;
}

#main-header .balance-chip span {
    color: #ffe09a;
}

.header-profile-btn {
    width: 42px;
    height: 42px;
    margin-left: 0;
    border-color: rgba(244, 196, 94, .22);
    background: linear-gradient(145deg, #3a2b17, #1b140d);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-profile-btn:hover {
    border-color: rgba(244, 196, 94, .6);
    box-shadow: 0 0 18px rgba(244, 196, 94, .14);
}

.game-grid {
    gap: clamp(9px, 1.25vw, 16px);
    padding-block: clamp(12px, 2vw, 20px);
}

.game-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(112px, 12vw, 154px);
    gap: 8px;
    padding: 14px 10px;
    border: 1px solid rgba(223, 196, 130, .2);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% -15%, rgba(173, 120, 43, .18), transparent 60%),
        linear-gradient(150deg, rgba(42, 31, 18, .99), rgba(17, 13, 9, .99) 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 10px 24px rgba(0, 0, 0, .23);
    transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out);
}

.game-card::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .055) 48%, transparent 68%);
    content: "";
    opacity: .55;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-3px);
    border-color: rgba(244, 196, 94, .58);
    background:
        radial-gradient(ellipse at 50% -15%, rgba(220, 164, 71, .22), transparent 60%),
        linear-gradient(150deg, rgba(57, 41, 20, .99), rgba(22, 16, 10, .99) 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 14px 30px rgba(0, 0, 0, .32), 0 0 22px rgba(244, 196, 94, .1);
}

.game-card.active {
    border-color: #f4c45e;
    background:
        radial-gradient(ellipse at 50% -15%, rgba(244, 196, 94, .2), transparent 65%),
        linear-gradient(150deg, rgba(62, 46, 23, .99), rgba(25, 18, 10, .99) 75%);
    box-shadow: inset 0 0 0 1px rgba(244, 196, 94, .16), 0 0 0 1px rgba(244, 196, 94, .12), 0 10px 28px rgba(0, 0, 0, .28), 0 0 22px rgba(244, 196, 94, .12);
}

.game-card .game-icon {
    width: clamp(52px, 6vw, 72px);
    height: clamp(52px, 6vw, 72px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .26));
    transition: transform .2s var(--ease-out);
}

.game-card:hover .game-icon {
    transform: translateY(-2px) scale(1.04);
}

.game-card .game-name {
    color: #f0e7d5;
    font-size: clamp(.78rem, 1.1vw, .94rem);
    font-weight: 700;
    letter-spacing: .055em;
    text-wrap: balance;
}

.game-card.active .game-name {
    color: #ffe3a0;
}

#main-content {
    padding: 0 clamp(10px, 2vw, 22px);
}

.section-header {
    min-height: 52px;
    gap: 12px;
    margin: 8px 0 14px;
    padding: 8px 12px;
    border: 1px solid rgba(244, 196, 94, .12);
    border-radius: 14px;
    background: linear-gradient(100deg, rgba(43, 32, 19, .82), rgba(19, 14, 9, .58));
}

.section-header h2 {
    flex: 1;
    color: #f4f0df;
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    letter-spacing: .025em;
}

.game-back-btn,
.refresh-btn,
.profile-back-button {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid rgba(244, 196, 94, .2);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(56, 42, 23, .97), rgba(23, 17, 10, .98));
    color: #f2dfb2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.game-back-btn:hover,
.refresh-btn:hover,
.profile-back-button:hover {
    border-color: rgba(244, 196, 94, .55);
    color: #ffe6aa;
}

#bingo-lobby .stake-row {
    border-color: rgba(226, 190, 111, .27);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(199, 143, 48, .15), transparent 58%),
        linear-gradient(145deg, rgba(41, 30, 17, .99), rgba(16, 12, 8, .99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 28px rgba(0, 0, 0, .22);
    transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}

#bingo-lobby .stake-row:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 196, 94, .65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 32px rgba(0, 0, 0, .28), 0 0 22px rgba(244, 196, 94, .1);
}

#bingo-lobby .col-action .btn-play-sm,
#bingo-lobby .col-action .btn-open-sm,
#bingo-lobby .col-action .btn-active-sm,
#bingo-lobby .col-action .btn-disabled-sm,
#bingo-lobby .col-action .btn-low-balance-sm {
    min-height: 44px;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 12px rgba(0, 0, 0, .2);
}

.btn-primary,
.action-btn,
.profile-signin-button {
    font-weight: 800;
    letter-spacing: .025em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px rgba(0, 0, 0, .22);
    transition: transform .16s var(--ease-out), filter .16s var(--ease-out), box-shadow .16s var(--ease-out);
}

.btn-primary:hover:not(:disabled),
.action-btn:hover,
.profile-signin-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    cursor: not-allowed;
    filter: saturate(.45) brightness(.72);
    box-shadow: none;
}

.ticket-card,
.profile-details .stat-item,
.profile-details .referral-code-compact {
    border-color: rgba(226, 190, 111, .16);
    background: linear-gradient(145deg, rgba(38, 29, 18, .94), rgba(16, 12, 8, .98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 8px 20px rgba(0, 0, 0, .16);
}

.profile-page {
    border-color: rgba(244, 196, 94, .24);
    background:
        radial-gradient(ellipse at 100% 0, rgba(187, 133, 43, .14), transparent 40%),
        linear-gradient(150deg, rgba(37, 28, 17, .98), rgba(14, 11, 8, .99));
}

.profile-details .profile-card-compact {
    border-color: rgba(244, 196, 94, .2);
    background: linear-gradient(145deg, rgba(44, 33, 19, .97), rgba(18, 14, 9, .99));
}

.website-auth-gate {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(179, 124, 39, .2), transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(216, 159, 59, .12), transparent 42%),
        rgba(11, 9, 7, .98);
}

.website-auth-card {
    border-color: rgba(244, 196, 94, .34);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(173, 120, 43, .14), transparent 60%),
        linear-gradient(150deg, rgba(39, 29, 17, .99), rgba(13, 10, 7, .99));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58), 0 0 32px rgba(244, 196, 94, .08);
}

.loading-screen {
    background:
        radial-gradient(ellipse at 50% 35%, rgba(160, 112, 38, .34), transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(207, 151, 51, .16), transparent 48%),
        #100d09;
}

.bingo-letter,
.bingo-letter.b,
.bingo-letter.i,
.bingo-letter.n,
.bingo-letter.g,
.bingo-letter.o {
    color: #f4c45e;
    background-image: var(--gradient-gold-shine);
    text-shadow: 0 0 8px rgba(255, 224, 154, .28), 0 0 24px rgba(244, 196, 94, .2);
}

.brand-title {
    color: #ffe09a;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55), 0 0 18px rgba(244, 196, 94, .28);
}

.good-luck-message {
    color: #d5dfd4;
}

.keno-header,
.plinko-game-header,
.balloon-game-header,
.hilo-game-header,
.goal-game-header,
.roulette-game-header,
.aviator-header {
    border-bottom: 1px solid rgba(244, 196, 94, .2);
    background: linear-gradient(180deg, rgba(30, 22, 13, .98), rgba(15, 12, 8, .97));
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.game-header-row {
    gap: 10px;
    margin-bottom: 10px;
}

.game-info-bar.highlight {
    border: 1px solid rgba(244, 196, 94, .2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(42, 31, 18, .97), rgba(17, 13, 8, .99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 22px rgba(0, 0, 0, .18);
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #ffe09a;
    outline-offset: 3px;
}

@media (max-width: 520px) {
    #main-header {
        min-height: 58px;
    }

    #main-header .header-right {
        gap: 7px;
    }

    .game-card {
        min-height: 104px;
        padding: 10px 7px;
        border-radius: 15px;
    }

    .section-header {
        margin-block: 6px 10px;
        padding-inline: 9px;
    }

    #main-content {
        padding-inline: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-card,
    .game-card .game-icon,
    #bingo-lobby .stake-row,
    .btn-primary,
    .action-btn,
    .header-profile-btn {
        transition-duration: .01ms !important;
    }

    .game-card:hover,
    #bingo-lobby .stake-row:hover {
        transform: none;
    }

    .bingo-letter,
    .bingo-letter.b,
    .bingo-letter.i,
    .bingo-letter.n,
    .bingo-letter.g,
    .bingo-letter.o {
        animation: none;
    }
}
