/* =========================================================
   CLOVERDONUT CASINO - PRODUCTION DESIGN SYSTEM & TOKENS
   Strict Color Science, Harmonious Gradients, Inter Typography
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

:root {
    /* 1. Canvas & Surface Hierarchy (Softened Neutrals - No Pure #000000 or Harsh White) */
    --bg-canvas: #0a0e17;
    --bg-surface: #121824;
    --bg-surface-elevated: #1a2232;
    --bg-surface-hover: #222c40;
    --bg-input: #0e131f;

    /* 2. Active Functional Tokens (Limited to 5 Essential Roles) */
    --action-primary: #10b981;
    --action-primary-hover: #059669;
    --action-accent: #00e5ff;
    --action-accent-hover: #38bdf8;
    --action-accent-subtle: rgba(0, 229, 255, 0.08);

    /* 3. High-Legibility Typography Contrast Tokens (WCAG AAA/AA Compliant) */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0a0e17;

    /* 4. Structural Borders & Focus Rings */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-focus: rgba(0, 229, 255, 0.45);
    --border-focus-danger: rgba(239, 68, 68, 0.45);

    /* 5. Semantic Action & Danger States */
    --color-success: #10b981;
    --color-success-subtle: rgba(16, 185, 129, 0.15);
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-danger-subtle: rgba(239, 68, 68, 0.15);
    --color-warning: #f59e0b;
    --color-warning-subtle: rgba(245, 158, 11, 0.15);

    /* Component Compatibility Aliases */
    --bg-void: var(--bg-canvas);
    --bg-primary: var(--bg-surface);
    --bg-card: var(--bg-surface);
    --bg-card-hover: var(--bg-surface-hover);
    --border-color: var(--border-subtle);
    --border-hover: var(--border-strong);
    --accent: var(--action-accent);
    --accent-hover: var(--action-accent-hover);
    --accent-subtle: var(--action-accent-subtle);

    /* Typography Hierarchy (Single Font Family System - Inter) */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
    --text-sm: clamp(0.84375rem, 0.8rem + 0.2vw, 0.90625rem);
    --text-base: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
    --text-xl: clamp(1.3125rem, 1.2rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.625rem, 1.45rem + 0.75vw, 1.875rem);
    --text-3xl: clamp(2rem, 1.75rem + 1.1vw, 2.375rem);

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

    --tracking-tight: -0.02em;
    --tracking-normal: 0em;
    --tracking-wide: 0.03em;

    /* Ergonomic Touch & Elevation Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Modern Depth Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.35), 0 2px 5px -2px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.45), 0 4px 8px -4px rgba(0, 0, 0, 0.3);
    --shadow-glow-cyan: 0 0 20px rgba(0, 229, 255, 0.25);
    --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.25);
}

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

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: var(--tracking-tight);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Minimal Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-elevated);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--bg-surface-hover);
}

/* =========================================================
   STARTUP AUTH GATE (SINGLE-AXIS VERTICAL FORM & SKELETONS)
   ========================================================= */
.auth-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.auth-gate-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.brand-icon-clover {
    font-size: 40px;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.45));
}

.auth-gate-title {
    font-size: var(--text-xl);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
}

.auth-gate-sub {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.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: 8px 14px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-auth-tab.active {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

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

/* Single-Axis Vertical Form Group */
.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: 46px;
    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: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-input:focus {
    border-color: var(--action-accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.25);
}

.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: 14px;
    padding: 4px;
}

/* Password Strength & Criteria Checklist */
.pwd-meter-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.pwd-meter-track {
    width: 100%;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
}

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

.pwd-meter-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* GDPR Unbundled Opt-In Checkbox */
.gdpr-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    margin-top: 4px;
}

.gdpr-consent-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--action-primary);
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.gdpr-consent-row a {
    color: var(--action-accent);
    text-decoration: underline;
}

/* Fitts's Law 100% Full-Width CTA Buttons */
.btn-action {
    width: 100%;
    min-height: 48px;
    padding: 12px 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.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-play {
    background: linear-gradient(135deg, var(--action-primary) 0%, var(--action-primary-hover) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-play:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow-emerald);
}

.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);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-hover) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    filter: brightness(1.1);
}

/* =========================================================
   APPLICATION LAYOUT ARCHITECTURE
   ========================================================= */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    height: 64px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 500;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.brand-logo-donut {
    font-size: 26px;
}

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

.brand-name {
    font-size: var(--text-base);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 9.5px;
    font-weight: var(--font-bold);
    letter-spacing: 0.12em;
    color: var(--action-accent);
}

.server-status-pill {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
}

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

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

.btn-header-faucet {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-header-faucet:hover {
    background: var(--color-warning);
    color: #0a0e17;
}

.wallet-header-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 8px;
}

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

.balance-label {
    font-size: 10px;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.balance-amount {
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    font-family: var(--font-mono);
    color: var(--action-primary);
}

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

.btn-wallet-action {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.btn-wallet-deposit {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.btn-wallet-deposit:hover {
    background: var(--action-primary);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-wallet-withdraw {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--action-accent);
}

.btn-wallet-withdraw:hover {
    background: var(--action-accent);
    color: #0a0e17;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* User Profile Header Card */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px 12px 4px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-profile-header:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-strong);
}

.header-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-surface-elevated);
    object-fit: cover;
    image-rendering: pixelated;
}

.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.04em;
    color: var(--action-accent);
}

.btn-auth-switch {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.btn-icon-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

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

/* =========================================================
   LIVE CHAT FLOATING DOCK & SLIDE-OUT PANEL
   ========================================================= */
.btn-chat-dock-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 229, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-chat-dock-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--action-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 229, 255, 0.35);
}

.live-chat-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 340px;
    height: 480px;
    max-height: calc(100vh - 120px);
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 950;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.live-chat-panel.chat-closed {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

.chat-panel-header {
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 14px;
    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(--color-success);
    margin-left: 6px;
}

.btn-close-chat {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
}

.btn-close-chat:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.chat-rain-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    border-bottom: 1px solid var(--action-primary);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.chat-message-row:hover, .chat-msg-row:hover {
    background: var(--bg-surface-elevated);
}

.chat-avatar, .chat-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    image-rendering: pixelated;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

.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 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.rank-host, .badge-host { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.rank-vip, .badge-vip { background: rgba(0, 229, 255, 0.15); color: var(--action-accent); border: 1px solid rgba(0, 229, 255, 0.3); }
.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: var(--bg-input);
    border-top: 1px solid var(--border-subtle);
    padding: 8px 10px;
    display: flex;
    gap: 6px;
    align-items: center;
}

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

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

.app-sidebar {
    width: 240px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

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

.nav-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    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.12s ease;
    text-align: left;
}

.nav-tab-btn:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.nav-tab-btn.active {
    background: var(--action-accent-subtle);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--action-accent);
}

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

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

.view-section {
    display: none;
}

.view-section.active-view {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

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

/* =========================================================
   SHIMMER SKELETON LOADERS (DOHERTY THRESHOLD)
   ========================================================= */
.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-surface-elevated) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        var(--bg-surface-elevated) 100%
    );
    background-size: 200% 100%;
    animation: skeletonPulse 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   SEGMENTED 6-DIGIT OTP / PIN INPUT (MILLER'S LAW)
   ========================================================= */
.otp-segment-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
}

.otp-box {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: var(--text-xl);
    font-family: var(--font-mono);
    font-weight: var(--font-bold);
    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.15s ease;
}

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

/* =========================================================
   MODALS & CELEBRATION CARDS (PEAK-END RULE)
   ========================================================= */
.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(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
}

.modal-window {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

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

.modal-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

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

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    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: slideInToast 0.25s ease-out;
    pointer-events: auto;
    max-width: 380px;
}

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

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-info { border-left: 4px solid var(--action-accent); }

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

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

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

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.live-bets-title {
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    letter-spacing: 0.05em;
    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(--action-accent);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.live-bets-sub {
    font-size: 11px;
    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: 10px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 10.5px;
    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: 420px;
    overflow-y: auto;
}

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

@keyframes betSlideIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.live-bet-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-strong);
}

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

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

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

.bet-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    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: 12px;
}

.bet-game-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-input);
    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: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: var(--font-extrabold);
    font-family: var(--font-mono);
}

.mult-win {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    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(--color-success);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

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

