/* =========================================================
   DONUTCLOVER CASINO & MARKETS - MASTER MODERN DESIGN SYSTEM
   Luxury Obsidian & Slate Palette | Clover Emerald & Electric Cyan
   Plus Jakarta Sans & JetBrains Mono Typography
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
    /* 1. Canvas & Surface Hierarchy (Luxury Obsidian & High-Tech Slate) */
    --bg-canvas: #090c13;          /* Deepest Space Canvas */
    --bg-surface: #0f1422;         /* App Nav & Main Structural Surface */
    --bg-surface-elevated: #151d30;/* Card & Panel Surfaces */
    --bg-surface-hover: #1c263e;   /* Hover Surface Highlight */
    --bg-surface-active: #222f4d;  /* Active Selection */
    --bg-input: #0a0e18;           /* Recessed Inputs & Wells */
    --bg-input-focus: #0f1524;     /* Focused Input Field */

    /* Backward Compatibility Aliases */
    --bg-void: var(--bg-canvas);
    --bg-primary: var(--bg-surface);
    --bg-card: var(--bg-surface-elevated);
    --bg-card-hover: var(--bg-surface-hover);

    /* 2. Active Functional & Brand Tokens */
    --clover-emerald: #10b981;     /* Primary Clover Brand Neon */
    --clover-emerald-light: #34d399;
    --clover-emerald-dark: #059669;
    --clover-emerald-glow: rgba(16, 185, 129, 0.35);

    --donut-cyan: #00e5ff;         /* Secondary Donut Tech Accent */
    --donut-cyan-light: #38bdf8;
    --donut-cyan-dark: #0284c7;
    --donut-cyan-glow: rgba(0, 229, 255, 0.35);

    --action-primary: var(--clover-emerald);
    --action-primary-hover: var(--clover-emerald-dark);
    --action-accent: var(--donut-cyan);
    --action-accent-hover: #00b4d8;
    --action-accent-subtle: rgba(0, 229, 255, 0.12);
    --accent: var(--action-accent);
    --accent-hover: var(--action-accent-hover);
    --accent-subtle: var(--action-accent-subtle);

    /* 3. Typography & Contrast Hierarchy */
    --text-primary: #f8fafc;       /* Crisp Bright White */
    --text-secondary: #94a3b8;     /* Sleek Cool Slate */
    --text-muted: #64748b;         /* Low-Contrast Subtitles */
    --text-disabled: #475569;
    --text-inverse: #020617;

    /* 4. Structural Borders & Focus Rings */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-hover: rgba(255, 255, 255, 0.22);
    --border-focus: rgba(0, 229, 255, 0.55);
    --border-emerald: rgba(16, 185, 129, 0.4);
    --border-color: var(--border-subtle);

    /* 5. Semantic Action & Alert States */
    --color-success: #10b981;
    --color-success-subtle: rgba(16, 185, 129, 0.15);
    --color-danger: #f43f5e;       /* Modern Rose Crimson */
    --color-danger-hover: #e11d48;
    --color-danger-subtle: rgba(244, 63, 94, 0.15);
    --loss: var(--color-danger);
    --color-warning: #f59e0b;      /* Warm Golden Amber */
    --color-warning-subtle: rgba(245, 158, 11, 0.15);
    --color-gold: #fbbf24;
    --color-purple: #a855f7;       /* Mythic / Epic Rarity */

    /* Typography Scale */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-3xs: 10px;
    --text-2xs: 11px;
    --text-xs: 12px;
    --text-sm: 13.5px;
    --text-base: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 38px;

    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    --tracking-tight: -0.015em;
    --tracking-normal: 0em;
    --tracking-wide: 0.05em;

    /* Modern Fluid Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Depth, Elevation & Glow Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 36px -4px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 48px -6px rgba(0, 0, 0, 0.75);
    --shadow-glow-emerald: 0 0 24px rgba(16, 185, 129, 0.4);
    --shadow-glow-cyan: 0 0 24px rgba(0, 229, 255, 0.4);
    --shadow-glow-gold: 0 0 24px rgba(245, 158, 11, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-canvas);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(0, 229, 255, 0.05), transparent);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: var(--tracking-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Minimalist Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* =========================================================
   STARTUP AUTH GATE MODAL
   ========================================================= */
.auth-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 14, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-gate-overlay.gate-hidden {
    display: none;
}

.auth-gate-card {
    background: linear-gradient(165deg, rgba(21, 29, 48, 0.95) 0%, rgba(15, 20, 34, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    padding: 34px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-xl), 0 0 50px rgba(0, 229, 255, 0.12);
    animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: scale(0.95) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-gate-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.auth-donut-logo {
    font-size: 44px;
    filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.6));
    animation: gentleBob 3s ease-in-out infinite alternate;
}

@keyframes gentleBob {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-4px) rotate(4deg); }
}

.auth-gate-brand h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    background: linear-gradient(135deg, #ffffff 30%, #34d399 70%, #00e5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-gate-brand p {
    font-size: var(--text-2xs);
    font-weight: var(--font-bold);
    color: var(--donut-cyan);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-tab-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.btn-auth-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-tab:hover {
    color: var(--text-primary);
}

.btn-auth-tab.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(0, 229, 255, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-form-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-input {
    width: 100%;
    height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0 14px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.custom-input:focus {
    border-color: var(--donut-cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2), 0 0 16px rgba(0, 229, 255, 0.15);
    background: var(--bg-input-focus);
}

.custom-input::placeholder {
    color: var(--text-muted);
}

.pwd-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    transition: color 0.15s ease;
}

.btn-toggle-pwd:hover {
    color: var(--text-primary);
}

.pwd-meter-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.pwd-meter-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.pwd-meter-fill {
    height: 100%;
    width: 0%;
    background: var(--color-danger);
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-full);
}

.pwd-meter-label {
    font-size: var(--text-3xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.gdpr-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: var(--text-2xs);
    color: var(--text-secondary);
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}

.gdpr-consent-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--clover-emerald);
    cursor: pointer;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.gdpr-consent-row a {
    color: var(--donut-cyan);
    text-decoration: none;
    font-weight: var(--font-semibold);
}

.gdpr-consent-row a:hover {
    text-decoration: underline;
}

.auth-gate-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: var(--text-3xs);
    color: var(--text-muted);
    letter-spacing: 0.06em;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

/* =========================================================
   BUTTON DESIGN SYSTEM
   ========================================================= */
.btn-action {
    width: 100%;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    font-family: inherit;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn-action:active {
    transform: scale(0.98);
}

.btn-play {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-play:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.55);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-hover) 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-danger:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 24px rgba(244, 63, 94, 0.5);
    transform: translateY(-1px);
}

.btn-cashout {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0b0f18;
    font-weight: var(--font-extrabold);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cashout:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.55);
    transform: translateY(-1px);
}

/* =========================================================
   APPLICATION SHELL & NAVIGATION HEADER
   ========================================================= */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    height: 66px;
    background: rgba(15, 20, 34, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
}

.brand-section:hover {
    transform: translateY(-1px);
}

.brand-logo-donut {
    font-size: 28px;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 17px;
    font-weight: var(--font-extrabold);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.brand-sub {
    font-size: 9.5px;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.16em;
    color: var(--donut-cyan);
    text-transform: uppercase;
}

.server-status-pill {
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: default;
}

.server-status-pill:hover {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.06);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid var(--color-success);
    animation: radarPing 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes radarPing {
    0% { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-header-faucet {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.28) 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.btn-header-faucet:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b0f18;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* Unified Wallet Header Group */
.wallet-header-group {
    display: flex;
    align-items: center;
    background: rgba(10, 14, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#btnSyncApi {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    transition: all 0.2s ease;
}

#btnSyncApi:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.balance-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.balance-label {
    font-size: 10px;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.balance-amount {
    font-size: var(--text-base);
    font-weight: var(--font-extrabold);
    font-family: var(--font-mono);
    color: var(--clover-emerald-light);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
    letter-spacing: -0.02em;
}

.wallet-buttons-pair {
    display: flex;
    gap: 4px;
}

.btn-wallet-action {
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid transparent;
}

.btn-wallet-deposit {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.4) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.btn-wallet-deposit:hover {
    background: var(--clover-emerald);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-wallet-withdraw {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.35);
    color: var(--donut-cyan);
}

.btn-wallet-withdraw:hover {
    background: var(--donut-cyan);
    color: #050b14;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
    transform: translateY(-1px);
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 4px 12px 4px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-header:hover {
    background: var(--bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.header-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    object-fit: cover;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-header-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-header-name {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: 1.2;
}

.user-header-rank {
    font-size: 9.5px;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.05em;
    color: var(--donut-cyan);
    text-transform: uppercase;
}

.btn-auth-switch {
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 7px 13px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth-switch:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.btn-icon-toggle {
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-toggle:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* =========================================================
   APP BODY & MODERN SIDEBAR NAVIGATION
   ========================================================= */
.app-body {
    display: flex;
    flex: 1;
}

.app-sidebar {
    width: 250px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    max-height: calc(100vh - 66px);
}

.nav-section-title {
    font-size: 10px;
    font-weight: var(--font-extrabold);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 10px 4px 10px;
}

.nav-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
}

.nav-tab-btn .nav-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nav-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(2px);
}

.nav-tab-btn:hover .nav-icon {
    transform: scale(1.1);
}

.nav-tab-btn.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-weight: var(--font-bold);
    box-shadow: inset 2px 0 0 var(--clover-emerald);
}

.nav-tab-btn.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6));
}

.nav-tab-host {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
}

.nav-tab-host:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.main-content-view {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-canvas);
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: calc(100vh - 66px);
}

.view-section {
    display: none;
}

.view-section.active-view {
    display: block;
    animation: fadeInView 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInView {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   GLOBAL ANNOUNCEMENT BANNER
   ========================================================= */
.global-announcement-banner {
    background: linear-gradient(90deg, #059669 0%, #10b981 50%, #06b6d4 100%);
    color: #ffffff;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    z-index: 1000;
    position: relative;
}

.announcement-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-icon {
    font-size: 18px;
}

.btn-close-announcement {
    background: rgba(0, 0, 0, 0.25);
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.btn-close-announcement:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* =========================================================
   LIVE BETS TICKER FEED (MODERN SLEEK TABLE)
   ========================================================= */
.live-bets-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-md);
}

.live-bets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-bets-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--clover-emerald);
    box-shadow: 0 0 10px var(--clover-emerald);
    animation: liveDotPulse 2s infinite;
}

@keyframes liveDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

.live-bets-title {
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.live-bets-tag {
    font-size: 10.5px;
    font-weight: var(--font-bold);
    background: rgba(0, 229, 255, 0.12);
    color: var(--donut-cyan);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.live-bets-sub {
    font-size: var(--text-2xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
}

.live-bets-col-header {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.live-bets-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 380px;
    overflow-y: auto;
}

.live-bet-item {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    transition: all 0.18s ease;
    animation: betItemSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes betItemSlide {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.live-bet-item:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.live-bet-item.bet-win {
    border-left: 3px solid var(--clover-emerald);
}

.live-bet-item.bet-loss {
    border-left: 3px solid rgba(255, 255, 255, 0.08);
    opacity: 0.85;
}

.bet-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bet-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    image-rendering: pixelated;
    background: var(--bg-input);
    flex-shrink: 0;
}

.bet-username {
    font-weight: var(--font-bold);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--text-xs);
}

.bet-game-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(10, 14, 24, 0.7);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    white-space: nowrap;
}

.bet-mult-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: var(--font-extrabold);
    font-family: var(--font-mono);
}

.mult-win {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mult-loss {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.bet-amount {
    font-family: var(--font-mono);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    font-size: 12px;
}

.bet-profit {
    font-family: var(--font-mono);
    font-weight: var(--font-extrabold);
    font-size: 12px;
    text-align: right;
}

.color-win {
    color: var(--clover-emerald-light);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.color-loss {
    color: var(--text-muted);
}

/* =========================================================
   LIVE CHAT & INTEGRATED CHATBOX
   ========================================================= */
.app-chatbox {
    width: 320px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
}

.live-chat-panel.integrated-chat {
    position: static;
    width: 100%;
    height: 100%;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
}

.live-chat-panel.integrated-chat.chat-closed {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.chat-panel-header {
    background: rgba(10, 14, 24, 0.6);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-panel-header strong {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.chat-online-badge {
    font-size: 10px;
    font-weight: var(--font-bold);
    color: var(--clover-emerald-light);
    margin-left: 6px;
}

.chat-rain-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(0, 229, 255, 0.18) 100%);
    border-bottom: 1px solid rgba(16, 185, 129, 0.35);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 180px);
}

.chat-message-row, .chat-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    background: var(--bg-surface-elevated);
    padding: 9px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: background 0.15s ease;
}

.chat-message-row:hover, .chat-msg-row:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

.chat-avatar, .chat-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-xs);
    image-rendering: pixelated;
    flex-shrink: 0;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-msg-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.chat-user-header, .chat-msg-author-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-username, .chat-msg-author {
    font-weight: var(--font-bold);
    color: var(--text-primary);
    font-size: 11.5px;
}

.chat-rank, .chat-user-badge {
    font-size: 9px;
    font-weight: var(--font-extrabold);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rank-host, .badge-host { 
    background: rgba(245, 158, 11, 0.2); 
    color: #fbbf24; 
    border: 1px solid rgba(245, 158, 11, 0.45); 
}

.rank-vip, .badge-vip { 
    background: rgba(0, 229, 255, 0.15); 
    color: var(--donut-cyan); 
    border: 1px solid rgba(0, 229, 255, 0.35); 
}

.rank-titan, .badge-titan { 
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(245, 158, 11, 0.25)); 
    color: #fde68a; 
    border: 1px solid rgba(245, 158, 11, 0.5); 
}

.rank-member, .badge-member { 
    background: rgba(255, 255, 255, 0.08); 
    color: var(--text-secondary); 
}

.chat-text, .chat-msg-text {
    color: var(--text-secondary);
    word-break: break-word;
    font-size: 11.5px;
    margin-top: 1px;
}

.chat-input-bar {
    background: rgba(10, 14, 24, 0.7);
    border-top: 1px solid var(--border-subtle);
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-field {
    height: 40px;
    font-size: 12px;
    border-radius: var(--radius-md);
    flex: 1;
}

/* =========================================================
   SEGMENTED 6-DIGIT OTP / PIN INPUT
   ========================================================= */
.otp-segment-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 14px 0;
}

.otp-box {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: var(--text-2xl);
    font-family: var(--font-mono);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s ease;
}

.otp-box:focus {
    border-color: var(--donut-cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.25), 0 0 16px rgba(0, 229, 255, 0.2);
    background: var(--bg-surface);
}

/* =========================================================
   MODALS SYSTEM (GLASSMORPHIC DIALOGS)
   ========================================================= */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container.modal-open,
.modal-container.is-active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 14, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-window {
    position: relative;
    background: linear-gradient(165deg, rgba(21, 29, 48, 0.96) 0%, rgba(15, 20, 34, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl);
    padding: 26px 28px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 229, 255, 0.1);
    animation: modalSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.modal-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   CASHIER & DEPOSIT STEPPER
   ========================================================= */
.deposit-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    padding: 0 10px;
}

.deposit-stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: var(--font-extrabold);
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.step-node.active .step-num {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
}

.step-text {
    font-size: 10px;
    font-weight: var(--font-bold);
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.step-node.active .step-text {
    color: var(--text-primary);
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast, .toast-message {
    background: rgba(21, 29, 48, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    max-width: 380px;
}

@keyframes toastSlideUp {
    from { transform: translateY(18px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast-success { border-left: 4px solid var(--clover-emerald); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-info { border-left: 4px solid var(--donut-cyan); }

/* Quick Chips & Buttons */
.quick-chip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.btn-quick {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: var(--font-bold);
    padding: 7px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    font-family: var(--font-mono);
}

.btn-quick:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Vault Inventory & Leaderboard Helpers */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
