/* ============================================================
   PLAYLOTTOGLOBAL - Premium Casino Dashboard
   Rich gradients, deep glow effects, 3D depth, gaming aesthetic
   ============================================================ */

/* =========================
   1. CSS VARIABLES
   ========================= */
:root {
    --bg-body: #0a0a0a;
    --bg-sidebar: #0e0e0e;
    --bg-card: rgba(22, 22, 22, 0.85);
    --bg-card-solid: #141414;
    --bg-card-hover: #1c1c1c;
    --bg-input: rgba(14, 14, 14, 0.9);
    --bg-header: rgba(12, 12, 12, 0.75);
    --bg-elevated: #1c1c1c;
    --bg-glass: rgba(24, 24, 24, 0.5);

    --accent: #c8ff00;
    --accent-rgb: 200, 255, 0;
    --accent-dim: #9acc00;
    --accent-secondary: #7c3aed;
    --accent-sec-rgb: 124, 58, 237;
    --accent-danger: #ef4444;
    --accent-success: #22c55e;
    --accent-warning: #f59e0b;
    --accent-info: #3b82f6;
    --gold: #fbbf24;
    --gold-rgb: 251, 191, 36;

    --text-primary: #f0f0f0;
    --text-secondary: #9a9a9a;
    --text-muted: #555555;
    --text-accent: var(--accent);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(200, 255, 0, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.04);

    --ball-1: #ef4444; --ball-2: #3b82f6; --ball-3: #22c55e;
    --ball-4: #eab308; --ball-5: #a855f7; --ball-6: #f97316; --ball-7: #ec4899;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', monospace;

    --sidebar-w: 240px;
    --sidebar-collapsed: 68px;
    --header-h: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255,255,255,0.05);
    --shadow-lg: 0 12px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(var(--accent-rgb), 0.15), 0 0 60px rgba(var(--accent-rgb), 0.05);
    --shadow-glow-strong: 0 0 15px rgba(var(--accent-rgb), 0.4), 0 0 45px rgba(var(--accent-rgb), 0.2), 0 0 90px rgba(var(--accent-rgb), 0.08);
    --shadow-glow-text: 0 0 30px rgba(var(--accent-rgb), 0.6), 0 0 60px rgba(var(--accent-rgb), 0.3);
    --shadow-purple: 0 0 40px rgba(var(--accent-sec-rgb), 0.15);
    --shadow-gold: 0 0 20px rgba(var(--gold-rgb), 0.3);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* =========================
   2. RESET
   ========================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(var(--accent-sec-rgb), 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(var(--accent-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(var(--accent-sec-rgb), 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; background: none; border: none; outline: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* =========================
   3. LAYOUT
   ========================= */
body {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: 1fr;
}

#sparkle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    background-image: linear-gradient(180deg, rgba(var(--accent-sec-rgb), 0.03) 0%, transparent 40%);
    border-right: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.3s var(--ease), transform 0.3s var(--ease);
    overflow: hidden;
}

#mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
#mobile-overlay.active { opacity: 1; }

#app-wrapper {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#main-header {
    position: sticky;
    top: 0;
    height: var(--header-h);
    background: var(--bg-header);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border-color);
    z-index: 90;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
}

#main-content {
    flex: 1;
    padding: 28px;
    min-width: 0;
    overflow-x: hidden;
    animation: pageEnter 0.45s var(--ease-out);
}

#main-content.page-exit {
    animation: pageExit 0.15s var(--ease) forwards;
}

/* =========================
   4. SIDEBAR STYLES
   ========================= */
.sidebar-logo {
    padding: 22px 20px 26px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), #a0d900);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

.sidebar-logo-text {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}
.sidebar-logo-text span { color: var(--accent); text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4); }

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    padding: 18px 14px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s var(--ease);
    position: relative;
    white-space: nowrap;
}
.nav-item:hover {
    background: rgba(var(--accent-rgb), 0.06);
    color: var(--text-primary);
    transform: translateX(2px);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0.03) 100%);
    color: var(--accent);
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 22px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}
.nav-item svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.25s;
}
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }
.nav-item.active svg { filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.4)); }

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); }
}

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* =========================
   5. HEADER STYLES
   ========================= */
.header-logo-mobile {
    display: none;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}
.header-logo-mobile svg { width: 28px; height: 28px; }
.header-logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.5px; }
.header-logo-text b { color: var(--accent); font-weight: 900; }

.header-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}
.header-toggle-btn {
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-toggle-btn.active {
    background: linear-gradient(135deg, var(--accent), #a8e000);
    color: #000;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}
.header-toggle-btn:not(.active) { color: var(--text-muted); }
.header-toggle-btn:not(.active):hover { color: var(--text-secondary); }

.header-search {
    flex: 1;
    max-width: 340px;
    position: relative;
}
.header-search input {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 16px 0 40px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.3s;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { border-color: var(--border-glow); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.08); }
.header-search svg {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-muted);
}

.header-spacer { flex: 1; }

.header-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.04));
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: var(--radius-full);
    padding: 6px 18px 6px 8px;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.08);
}
.header-balance-icon {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent), #a8e000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #000;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
}
.header-balance-amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.header-btn {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.25s;
    flex-shrink: 0;
    position: relative;
}
.header-btn:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.1);
    transform: scale(1.05);
}
.header-btn svg { width: 18px; height: 18px; }
.header-btn .notification-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    background: var(--accent-danger);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
    animation: pulseGlow 2s infinite;
}

.header-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #000;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
}
.header-avatar:hover { transform: scale(1.1); box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.3); }

/* =========================
   6. COMMON COMPONENTS
   ========================= */

/* Glass Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all 0.35s var(--ease);
    box-shadow: var(--shadow-card);
}
.card:hover { border-color: rgba(255, 255, 255, 0.1); }

.card-glow {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}
.card-glow:hover { box-shadow: var(--shadow-glow-strong); }

/* Gradient border card */
.card-gradient {
    position: relative;
    background: var(--bg-card-solid);
    border: none;
    overflow: hidden;
}
.card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-sec-rgb), 0.3), rgba(var(--accent-rgb), 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a8e000);
    color: #000;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-3px);
}
.btn-primary:active { transform: translateY(-1px); }
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
}
.btn-secondary:hover {
    border-color: var(--border-glow);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.08);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.btn-outline:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.btn-sm { padding: 7px 16px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: var(--radius-lg); letter-spacing: 0.5px; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 0 20px rgba(239,68,68,0.2); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(239,68,68,0.3); }

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
}
.tab-btn {
    padding: 9px 22px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.1);
}

/* Tables */
.data-table { width: 100%; }
.data-table th {
    text-align: left;
    padding: 12px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.data-table td {
    padding: 14px 18px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.data-table tr { transition: background 0.2s; }
.data-table tr:hover td { background: rgba(var(--accent-rgb), 0.02); }
.data-table .amount-positive { color: var(--accent-success); font-weight: 700; text-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
.data-table .amount-negative { color: var(--accent-danger); font-weight: 700; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-accent { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.2); }
.badge-success { background: rgba(34,197,94,0.12); color: var(--accent-success); border: 1px solid rgba(34,197,94,0.2); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--accent-danger); border: 1px solid rgba(239,68,68,0.2); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--accent-warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-info { background: rgba(59,130,246,0.12); color: var(--accent-info); border: 1px solid rgba(59,130,246,0.2); }

/* Avatar */
.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Stats */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.4), transparent);
}
.stat-card .stat-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}
.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 80px; right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 22px;
    background: rgba(20, 20, 40, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.35s var(--ease-bounce);
    min-width: 280px;
    box-shadow: var(--shadow-lg);
}
.toast.toast-success { border-left: 3px solid var(--accent-success); }
.toast.toast-error { border-left: 3px solid var(--accent-danger); }
.toast.toast-info { border-left: 3px solid var(--accent-info); }
.toast.toast-win { border-left: 3px solid var(--accent); box-shadow: var(--shadow-glow), var(--shadow-lg); }
.toast-exit { animation: slideOutRight 0.3s var(--ease) forwards; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s var(--ease);
}
.modal-overlay.hidden { display: none; }
.modal-content {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    animation: scaleIn 0.35s var(--ease-bounce);
    box-shadow: var(--shadow-lg), var(--shadow-purple);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h3 { font-size: 20px; font-weight: 800; }
.modal-close {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

/* =========================
   7. ANIMATIONS
   ========================= */
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pageExit {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

@keyframes neonPulse {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: var(--shadow-glow-strong); }
}

@keyframes ballBounceIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.25) rotate(10deg); }
    80% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(1800deg); }
}

@keyframes diceRoll {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    25% { transform: rotateX(90deg) rotateY(180deg) rotateZ(45deg); }
    50% { transform: rotateX(180deg) rotateY(360deg) rotateZ(90deg); }
    75% { transform: rotateX(270deg) rotateY(540deg) rotateZ(135deg); }
    100% { transform: rotateX(var(--end-x, 0deg)) rotateY(var(--end-y, 0deg)) rotateZ(0deg); }
}

@keyframes shake {
    0%, 100% { transform: translate(-50%,-50%) translateX(0); }
    10%, 50%, 90% { transform: translate(-50%,-50%) translateX(-5px); }
    30%, 70% { transform: translate(-50%,-50%) translateX(5px); }
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glowBreath {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* =========================
   8. HOME PAGE
   ========================= */
.home-hero {
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-sec-rgb), 0.12) 50%, rgba(var(--accent-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow), var(--shadow-purple);
}
.home-hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: glowBreath 4s ease-in-out infinite;
}
.home-hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(var(--accent-sec-rgb), 0.12) 0%, transparent 60%);
    pointer-events: none;
}
.home-hero h1 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 14px;
    position: relative;
    line-height: 1.15;
}
.home-hero h1 span {
    color: var(--accent);
    text-shadow: var(--shadow-glow-text);
}
.home-hero p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 28px;
    max-width: 520px;
    position: relative;
    line-height: 1.7;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-header h2 { font-size: 20px; font-weight: 800; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.game-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 50%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.game-card:hover::before { opacity: 1; }
.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.game-card-icon {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-card-icon svg { width: 28px; height: 28px; }
/* Colored game card icon backgrounds */
.gc-icon-accent { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.gc-icon-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.gc-icon-red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.gc-icon-purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.gc-icon-orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.gc-icon-muted { background: rgba(100, 100, 130, 0.12); color: var(--text-muted); }
/* Colored top border accent on hover */
.gc-accent:hover { border-color: rgba(var(--accent-rgb), 0.3); }
.gc-cyan:hover { border-color: rgba(6, 182, 212, 0.3); box-shadow: 0 0 25px rgba(6, 182, 212, 0.08), var(--shadow-card); }
.gc-red:hover { border-color: rgba(239, 68, 68, 0.3); box-shadow: 0 0 25px rgba(239, 68, 68, 0.08), var(--shadow-card); }
.gc-purple:hover { border-color: rgba(168, 85, 247, 0.3); box-shadow: 0 0 25px rgba(168, 85, 247, 0.08), var(--shadow-card); }
.gc-orange:hover { border-color: rgba(249, 115, 22, 0.3); box-shadow: 0 0 25px rgba(249, 115, 22, 0.08), var(--shadow-card); }
.game-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.game-card p { font-size: 12px; color: var(--text-muted); }
.game-card .game-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
/* Colored player dots */
.game-card .game-players .dot, .dot-accent {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}
.dot-cyan { background: #06b6d4 !important; box-shadow: 0 0 8px rgba(6, 182, 212, 0.5) !important; }
.dot-red { background: #ef4444 !important; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5) !important; }
.dot-purple { background: #a855f7 !important; box-shadow: 0 0 8px rgba(168, 85, 247, 0.5) !important; }
.dot-orange { background: #f97316 !important; box-shadow: 0 0 8px rgba(249, 115, 22, 0.5) !important; }
.dot-muted { background: var(--text-muted) !important; box-shadow: none !important; }

.home-games { margin-bottom: 28px; }

/* Winners ticker */
.winners-ticker {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow-card);
}
.ticker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}
.ticker-label .live-dot {
    width: 8px; height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    animation: pulseGlow 1.5s infinite;
}
.ticker-track {
    display: flex;
    gap: 14px;
    animation: tickerScroll 35s linear infinite;
    width: max-content;
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ticker-item .ticker-game { font-size: 12px; color: var(--text-muted); }
.ticker-item .ticker-amount { font-size: 13px; font-weight: 800; color: var(--accent); text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3); }
.ticker-item .ticker-user { font-size: 13px; font-weight: 600; }

/* =========================
   9. LOTTERY PAGE
   ========================= */
.lottery-hero {
    background: linear-gradient(160deg, rgba(var(--accent-sec-rgb), 0.08) 0%, var(--bg-card-solid) 30%, rgba(var(--accent-rgb), 0.06) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.lottery-hero::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(var(--accent-sec-rgb), 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: glowBreath 5s ease-in-out infinite;
}
.lottery-hero::after {
    content: '';
    position: absolute;
    bottom: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: glowBreath 4s ease-in-out infinite 1s;
}

.lottery-game-id {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 1px;
    position: relative;
}

.lottery-jackpot-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #a8e000);
    color: #000;
    padding: 6px 32px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.35);
    position: relative;
}

.lottery-jackpot-amount {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #e0ff60, var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite, floatUp 4s ease-in-out infinite;
    margin-bottom: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 30px rgba(var(--accent-rgb), 0.3));
    position: relative;
}

.lottery-balls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    position: relative;
}

.lottery-ball {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    animation: ballBounceIn 0.6s var(--ease-bounce) both;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 -3px 6px rgba(0,0,0,0.2), inset 0 3px 6px rgba(255,255,255,0.15);
}
.lottery-ball::before {
    content: '';
    position: absolute;
    top: 6px; left: 10px;
    width: 14px; height: 10px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    transform: rotate(-25deg);
}
.lottery-ball:nth-child(1) { background: linear-gradient(145deg, #f87171, #dc2626); animation-delay: 0s; }
.lottery-ball:nth-child(2) { background: linear-gradient(145deg, #60a5fa, #2563eb); animation-delay: 0.08s; }
.lottery-ball:nth-child(3) { background: linear-gradient(145deg, #4ade80, #16a34a); animation-delay: 0.16s; }
.lottery-ball:nth-child(4) { background: linear-gradient(145deg, #facc15, #ca8a04); animation-delay: 0.24s; }
.lottery-ball:nth-child(5) { background: linear-gradient(145deg, #c084fc, #9333ea); animation-delay: 0.32s; }
.lottery-ball:nth-child(6) { background: linear-gradient(145deg, #fb923c, #ea580c); animation-delay: 0.4s; }
.lottery-ball:nth-child(7) { background: linear-gradient(145deg, var(--accent), #9acc00); animation-delay: 0.48s; box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 20px rgba(var(--accent-rgb), 0.3), inset 0 -3px 6px rgba(0,0,0,0.2), inset 0 3px 6px rgba(255,255,255,0.15); }

.lottery-countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}
.countdown-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.countdown-label svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.countdown-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    min-width: 68px;
    text-align: center;
    backdrop-filter: blur(4px);
}
.countdown-digits {
    font-size: 30px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
.countdown-unit {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 6px;
    font-weight: 700;
}
.countdown-separator {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-muted);
    align-self: flex-start;
    padding-top: 10px;
    animation: glowBreath 1s ease-in-out infinite;
}

.lottery-buy-section { margin-top: 28px; position: relative; }
.lottery-price {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 14px;
}
.lottery-price span { color: var(--accent); font-weight: 800; }

/* Sparkle decorations */
.sparkle {
    position: absolute;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.4));
}
.sparkle svg { fill: var(--accent); width: 100%; height: 100%; }

/* Lottery tabs */
.lottery-tabs-section { margin-bottom: 28px; }
.lottery-tabs-section .tabs { margin-bottom: 20px; }
.tab-content { display: none; animation: fadeIn 0.35s var(--ease); }
.tab-content.active { display: block; }

/* Ticket cards */
.ticket-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    transition: all 0.25s;
    box-shadow: var(--shadow-card);
}
.ticket-card:hover { border-color: var(--border-glow); transform: translateX(4px); }

.ticket-numbers { display: flex; gap: 6px; }
.ticket-number {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.1);
}

/* How it works */
.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.how-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.35s var(--ease);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.how-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 40%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.how-card:hover::before { opacity: 1; }
.how-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.how-card-icon {
    width: 64px; height: 64px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-sec-rgb), 0.08));
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.how-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.how-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.results-header h2 { font-size: 20px; font-weight: 800; }

/* =========================
   10. COINFLIP PAGE
   ========================= */
.coinflip-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 920px;
    margin: 0 auto;
}
.coin-display { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; }
.coin {
    width: 190px; height: 190px;
    border-radius: 50%;
    position: relative;
    perspective: 800px;
    cursor: pointer;
    margin-bottom: 36px;
    filter: drop-shadow(0 10px 30px rgba(var(--gold-rgb), 0.3));
}
.coin-inner {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}
.coin-inner.flipping { animation: coinFlip 2s ease-out forwards; }
.coin-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 900;
    backface-visibility: hidden;
    border: 5px solid rgba(255, 255, 255, 0.2);
}
.coin-heads {
    background: linear-gradient(145deg, #fbbf24, #f59e0b, #d97706);
    color: #78350f;
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.2);
}
.coin-tails {
    background: linear-gradient(145deg, #94a3b8, #64748b, #475569);
    color: #1e293b;
    transform: rotateY(180deg);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.2);
}
.coin-result { font-size: 26px; font-weight: 900; margin-bottom: 8px; min-height: 40px; }
.coin-result.heads { color: #fbbf24; text-shadow: 0 0 20px rgba(var(--gold-rgb), 0.5); }
.coin-result.tails { color: #94a3b8; text-shadow: 0 0 20px rgba(148, 163, 184, 0.3); }

.coinflip-controls { display: flex; flex-direction: column; gap: 16px; }
.choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-btn {
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 800;
    border: 2px solid var(--border-color);
    transition: all 0.25s;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}
.choice-btn:hover { border-color: var(--text-muted); background: rgba(255, 255, 255, 0.04); }
.choice-btn.selected {
    border-color: var(--gold);
    background: rgba(var(--gold-rgb), 0.08);
    color: var(--gold);
    box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.15);
}
.choice-btn.selected-tails {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
}

.coinflip-history { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.history-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}
.history-dot.h { background: rgba(var(--gold-rgb), 0.15); color: #fbbf24; border: 1px solid rgba(var(--gold-rgb), 0.2); }
.history-dot.t { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

/* =========================
   11. CRASH PAGE
   ========================= */
.crash-container { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.crash-chart-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    min-height: 420px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.crash-chart-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(var(--accent-rgb), 0.04) 0%, transparent 60%);
    pointer-events: none;
}
.crash-multiplier {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 900;
    z-index: 2;
    transition: color 0.3s;
}
.crash-multiplier.rising {
    background: linear-gradient(135deg, var(--accent), #e0ff60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(var(--accent-rgb), 0.4));
}
.crash-multiplier.crashed { color: var(--accent-danger); -webkit-text-fill-color: var(--accent-danger); filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.4)); background: none; }
.crash-canvas { width: 100%; height: 300px; display: block; position: relative; z-index: 1; }
.crash-status { text-align: center; margin-top: 16px; font-size: 14px; font-weight: 700; position: relative; z-index: 2; }
.crash-status.waiting { color: var(--text-muted); }
.crash-status.live { color: var(--accent); text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.4); }
.crash-status.crashed-text { color: var(--accent-danger); }

.crash-sidebar { display: flex; flex-direction: column; gap: 16px; }
.crash-history-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.crash-history-item {
    padding: 7px 4px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}
.crash-history-item.high { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); border-color: rgba(var(--accent-rgb), 0.15); }
.crash-history-item.medium { background: rgba(59, 130, 246, 0.1); color: var(--accent-info); border-color: rgba(59, 130, 246, 0.15); }
.crash-history-item.low { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); border-color: rgba(239, 68, 68, 0.15); }

/* =========================
   12. ROULETTE PAGE
   ========================= */
.roulette-container { display: flex; flex-direction: column; align-items: center; gap: 28px; max-width: 800px; margin: 0 auto; }
.roulette-wheel-wrapper { position: relative; width: 320px; height: 320px; filter: drop-shadow(0 0 30px rgba(0,0,0,0.5)); }
.roulette-wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    position: relative;
    border: 8px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.4), 0 0 60px rgba(var(--accent-sec-rgb), 0.1);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}
.roulette-pointer {
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid var(--accent);
    z-index: 5;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.6));
}
.roulette-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    background: var(--bg-card-solid);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    z-index: 3;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.roulette-result { font-size: 30px; font-weight: 900; min-height: 44px; text-align: center; }

.bet-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: 600px; width: 100%; }
.bet-cell {
    padding: 11px 6px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.bet-cell:hover { transform: scale(1.08); }
.bet-cell.selected { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.bet-cell.red { background: rgba(239, 68, 68, 0.25); color: #f87171; border-color: rgba(239,68,68,0.15); }
.bet-cell.black { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); border-color: var(--border-subtle); }
.bet-cell.green { background: rgba(34, 197, 94, 0.25); color: #4ade80; border-color: rgba(34,197,94,0.15); }
.bet-cell.special { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary); grid-column: span 2; border-color: var(--border-subtle); }

/* =========================
   13. DICE PAGE
   ========================= */
.dice-container { display: grid; grid-template-columns: 1fr 380px; gap: 24px; max-width: 920px; margin: 0 auto; }
.dice-display { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; }

.dice-result-display {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 8px;
    min-height: 70px;
}

.dice-controls { display: flex; flex-direction: column; gap: 16px; }

.slider-container { padding: 16px 0; }
.slider-container label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}
.slider-container label span { color: var(--accent); font-weight: 800; }
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-sec-rgb), 0.2));
    border-radius: 4px;
    outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a8e000);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.dice-odds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.dice-odds .odds-item { text-align: center; }
.dice-odds .odds-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.dice-odds .odds-value { font-size: 22px; font-weight: 900; color: var(--accent); text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3); }

/* =========================
   14. PROFILE PAGE
   ========================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 36px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.profile-header::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.05) 0%, transparent 60%);
    pointer-events: none;
}
.profile-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 900;
    color: #000;
    flex-shrink: 0;
    box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.25);
}
.profile-info h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.profile-info .profile-meta {
    display: flex;
    gap: 18px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}
.profile-info .profile-meta span { display: flex; align-items: center; gap: 5px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.profile-section { margin-bottom: 28px; }
.profile-section h2 { font-size: 20px; font-weight: 800; margin-bottom: 18px; }

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.achievement {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.25s;
    box-shadow: var(--shadow-card);
}
.achievement:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.achievement-icon { font-size: 36px; margin-bottom: 10px; }
.achievement h4 { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.achievement p { font-size: 11px; color: var(--text-muted); }
.achievement.locked { opacity: 0.35; }

/* =========================
   15. RESULTS PAGE
   ========================= */
.results-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.results-page-header h1 { font-size: 26px; font-weight: 900; }
.results-filters { display: flex; gap: 8px; }
.filter-btn {
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.25s;
}
.filter-btn:hover { border-color: var(--text-muted); }
.filter-btn.active {
    background: linear-gradient(135deg, var(--accent), #a8e000);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
}

.draw-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-card);
}
.draw-card:hover { border-color: var(--border-glow); transform: translateX(4px); }
.draw-info { display: flex; flex-direction: column; gap: 4px; }
.draw-info .draw-id { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.draw-info .draw-date { font-size: 15px; font-weight: 700; }
.draw-numbers { display: flex; gap: 6px; }
.draw-number {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 -2px 3px rgba(0,0,0,0.2), inset 0 2px 3px rgba(255,255,255,0.1);
}
.draw-prize { text-align: right; }
.draw-prize .prize-amount { font-size: 20px; font-weight: 900; color: var(--accent); text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3); }
.draw-prize .prize-winners { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* =========================
   16. GAME COMMON STYLES
   ========================= */
/* Game Page Header - compact colored icon */
.game-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.game-page-header h1 { font-size: 22px; font-weight: 900; margin: 0; line-height: 1.2; }
.gph-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gph-icon svg { width: 22px; height: 22px; }
.gph-cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; box-shadow: 0 0 20px rgba(6, 182, 212, 0.1); }
.gph-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, 0.1); }
.gph-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); }
.gph-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; box-shadow: 0 0 20px rgba(249, 115, 22, 0.1); }
.gph-info { display: flex; flex-direction: column; }
.gph-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gph-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.gph-dot.cyan { background: #06b6d4; box-shadow: 0 0 6px #06b6d4; }
.gph-dot.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; animation: neonPulse 2s infinite; }
.gph-dot.purple { background: #a855f7; box-shadow: 0 0 6px #a855f7; }
.gph-dot.orange { background: #f97316; box-shadow: 0 0 6px #f97316; }

.game-controls-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
}
.game-controls-card h3 { font-size: 14px; font-weight: 700; color: var(--text-secondary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

.bet-amount-control { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.bet-amount-control .bet-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.bet-amount-control .bet-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.1); }
.bet-amount-control input {
    flex: 1;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
}

.bet-presets { display: flex; gap: 6px; margin-bottom: 16px; }
.bet-presets button {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.2s;
}
.bet-presets button:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.2); }

.profit-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(var(--accent-rgb), 0.04);
    border: 1px solid rgba(var(--accent-rgb), 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.profit-display .profit-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.profit-display .profit-value { font-size: 16px; font-weight: 900; color: var(--accent); text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3); }

/* =========================
   17. UTILITY CLASSES
   ========================= */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* =========================
   NEW DECORATIVE ELEMENTS
   ========================= */

/* Section Dividers */
.section-divider {
    position: relative;
    height: 1px;
    margin: 32px 0;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}
.divider-glow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 16px;
    background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.2) 0%, transparent 70%);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), #9acc00, #c8ff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Card */
.glow-card {
    border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
    box-shadow: var(--shadow-glow), var(--shadow-card) !important;
}

/* Shadow Card */
.shadow-card {
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.05);
}

/* Stat Icon */
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}
.stat-icon svg {
    width: 22px;
    height: 22px;
}
.stat-icon.accent-bg { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.stat-icon.purple-bg { background: rgba(var(--accent-sec-rgb), 0.15); color: var(--accent-secondary); }
.stat-icon.green-bg { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.stat-icon.gold-bg { background: rgba(var(--gold-rgb), 0.15); color: var(--gold); }

/* Small inline icon */
.icon-sm { display: inline-flex; width: 16px; height: 16px; }
.icon-sm svg { width: 16px; height: 16px; }

/* Toast icon */
.toast-icon { display: flex; width: 18px; height: 18px; flex-shrink: 0; }
.toast-icon svg { width: 18px; height: 18px; }

/* Rank badges */
.rank-badge { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: 14px; }
.rank-badge.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.rank-badge.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #000; }
.rank-badge.rank-3 { background: linear-gradient(135deg, #d97706, #b45309); color: #000; }

/* Hero Badge */
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    animation: neonPulse 3s infinite;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Hero Trust */
.hero-trust {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.hero-trust-item svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* Game Page Title */
.game-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Game Page Description */
.game-page-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
    max-width: 500px;
}

/* Game Card Hot */
.game-card-hot {
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    position: relative;
    overflow: hidden;
}
.game-card-hot::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(var(--accent-rgb), 0.03), transparent, transparent);
    animation: rotateSlow 8s linear infinite;
}
@keyframes rotateSlow {
    to { transform: rotate(360deg); }
}

/* Game Card Badge */
.game-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    z-index: 1;
}

/* Profile Avatar Wrapper */
.profile-avatar-wrapper {
    position: relative;
}
.profile-level-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* How Card Step */
.how-card-step {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

/* Lottery Ball Bonus */
.lottery-ball-bonus {
    background: linear-gradient(135deg, var(--accent), #9acc00) !important;
    color: #000 !important;
    font-weight: 900;
}

/* Jackpot Label */
.jackpot-label-icon {
    font-size: 20px;
    margin-right: 6px;
}

/* Achievement States */
.achievement-unlocked {
    font-size: 10px;
    color: var(--accent-success);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.achievement-locked {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ambient Orbs */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.orb-accent {
    width: 300px;
    height: 300px;
    background: rgba(var(--accent-rgb), 0.06);
    top: -80px;
    right: -80px;
    animation: breatheGlow 6s ease-in-out infinite;
}
.orb-purple {
    width: 250px;
    height: 250px;
    background: rgba(var(--accent-sec-rgb), 0.08);
    bottom: -60px;
    left: -60px;
    animation: breatheGlow 8s ease-in-out infinite reverse;
}

/* Ensure relative positioning on parents */
.home-hero,
.lottery-hero,
.game-page-header,
.results-page-header,
.profile-header {
    position: relative;
    overflow: hidden;
}

/* =========================
   SVG SIZING (global constraints)
   ========================= */
/* Default: any SVG inside a flex/inline container that doesn't have explicit sizing */
.hero-badge svg { width: 14px; height: 14px; flex-shrink: 0; vertical-align: middle; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; }
.game-card-badge svg { width: 12px; height: 12px; flex-shrink: 0; }
.game-card-badge { display: flex; align-items: center; gap: 4px; }
.game-card-icon svg { width: 40px; height: 40px; stroke-width: 1.5; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.btn { display: inline-flex; align-items: center; gap: 8px; }
/* Fallback: prevent any SVG from being huge if its parent doesn't size it */
svg { max-width: 100%; }
.sidebar-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.nav-icon svg { width: 20px; height: 20px; }
.header-toggle svg { width: 16px; height: 16px; }
.header-balance svg { width: 16px; height: 16px; }
.lottery-jackpot-label svg { width: 20px; height: 20px; vertical-align: middle; }
.jackpot-label-icon svg { width: 18px; height: 18px; }
.toast-icon svg { width: 18px; height: 18px; }
.achievement-icon svg { width: 28px; height: 28px; }
.profile-meta svg, .profile-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.how-card-icon svg { width: 32px; height: 32px; }
.section-header svg { width: 16px; height: 16px; }

/* Fix stat card layout - icon should be centered */
.stat-card { display: flex; flex-direction: column; align-items: center; }
.stat-icon { margin: 0 auto 12px; }

/* =========================
   18. MOBILE BOTTOM NAV
   ========================= */
#mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(14, 14, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
}
.mob-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}
.mob-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.mob-nav-btn svg { width: 22px; height: 22px; }
.mob-nav-btn span { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.mob-nav-btn.active { color: var(--accent); }
.mob-nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}
/* Games sub-menu */
.mob-games-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
}
.mob-games-menu.show { display: block; }
.mob-games-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}
.mob-games-menu a:hover,
.mob-games-menu a:active { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.mob-games-menu a svg { width: 18px; height: 18px; }
.mob-games-menu a.active { color: var(--accent); }

/* =========================
   19. RESPONSIVE
   ========================= */
@media (max-width: 1024px) {
    body { grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); }
    #sidebar { width: var(--sidebar-collapsed); }
    .sidebar-logo-text, .nav-label, .sidebar-section-label, .nav-badge { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .how-it-works { grid-template-columns: 1fr; }
    .coinflip-container, .crash-container, .dice-container { grid-template-columns: 1fr; }
    .home-stats, .profile-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    /* Layout: kill sidebar, show bottom nav */
    body { grid-template-columns: 1fr; }
    #sidebar { display: none !important; }
    #mobile-overlay { display: none !important; }
    #mobile-bottom-nav { display: block; }
    .header-hamburger { display: none !important; }

    /* Header: compact */
    #main-header {
        padding: 10px 16px;
        height: auto;
        min-height: 52px;
    }
    .header-search { display: none; }
    .header-toggle { display: none; }
    .header-logo-mobile { display: flex; }
    .header-balance { font-size: 13px; padding: 6px 12px; }
    .header-balance svg { width: 14px; height: 14px; }
    .header-user-avatar { width: 32px; height: 32px; font-size: 11px; }
    .header-actions { gap: 8px; }
    .header-actions .btn { padding: 6px 10px; font-size: 12px; }
    .header-actions .btn svg { width: 14px; height: 14px; }

    /* Main content: padding for bottom nav */
    #main-content { padding: 16px; padding-bottom: 80px; }

    /* Home hero */
    .home-hero { padding: 24px 18px; border-radius: var(--radius); }
    .home-hero h1 { font-size: 24px; }
    .home-hero p { font-size: 13px; }
    .hero-badges { gap: 12px; font-size: 11px; }
    .hero-actions { gap: 10px; flex-wrap: wrap; }
    .hero-actions .btn { font-size: 13px; padding: 10px 18px; }

    /* Stats */
    .home-stats, .profile-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 16px 12px; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card .stat-label { font-size: 10px; }

    /* Game grid */
    .game-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Winners ticker */
    .winners-ticker-track { animation-duration: 30s; }

    /* Game page headers */
    .game-page-header { margin-bottom: 16px; }
    .game-page-header h1 { font-size: 18px; }
    .gph-icon { width: 34px; height: 34px; border-radius: 8px; }
    .gph-icon svg { width: 18px; height: 18px; }
    .gph-sub { font-size: 11px; }

    /* Lottery */
    .lottery-jackpot-amount { font-size: 36px; }
    .lottery-balls { gap: 8px; }
    .lottery-ball { width: 42px; height: 42px; font-size: 15px; }
    .countdown-digits { gap: 6px; }
    .countdown-digit-box { width: 54px; height: 60px; }
    .countdown-digit { font-size: 24px; }
    .countdown-digit-label { font-size: 8px; }
    .lottery-hero { padding: 28px 16px; }

    /* Coinflip / Crash / Dice: stack */
    .coinflip-container, .crash-container, .dice-container { grid-template-columns: 1fr; gap: 14px; }
    .coin-display { min-height: 240px; }
    .coin { width: 140px; height: 140px; font-size: 40px; }
    .crash-chart-wrapper { min-height: 220px; }
    .dice-display { min-height: 200px; }

    /* Roulette */
    .roulette-container { flex-direction: column; align-items: center; }
    .roulette-wheel-wrapper { width: 260px; height: 260px; }
    .bet-board { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .bet-cell { padding: 10px 4px; font-size: 13px; }

    /* Game controls */
    .game-controls-card { padding: 16px; }
    .game-controls-card h3 { font-size: 12px; }
    .bet-amount-control input { font-size: 18px; }
    .bet-btn { width: 38px; height: 38px; }

    /* Profile */
    .profile-header { flex-direction: column; text-align: center; padding: 20px 16px; }
    .profile-info .profile-meta { justify-content: center; flex-wrap: wrap; }
    .profile-avatar { width: 64px; height: 64px; font-size: 22px; }
    .profile-level-badge { font-size: 10px; padding: 2px 8px; }
    .achievements-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .achievement-card { padding: 14px 8px; }
    .achievement-card h4 { font-size: 11px; }
    .achievement-card p { font-size: 9px; }

    /* Results */
    .draw-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .draw-balls .lottery-ball { width: 34px; height: 34px; font-size: 13px; }
    .results-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }

    /* Tables */
    .winners-table { font-size: 13px; }
    .winners-table th, .winners-table td { padding: 10px 8px; }
    .tx-table { font-size: 12px; }
    .tx-table th, .tx-table td { padding: 8px 6px; }

    /* Tabs */
    .tab-bar { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-bar .tab { padding: 10px 14px; font-size: 12px; white-space: nowrap; }

    /* How it works */
    .how-it-works { grid-template-columns: 1fr; gap: 10px; }
    .how-card { padding: 18px 14px; }

    /* Side bets / history */
    .side-choice-btn { padding: 14px 8px; }
    .quick-bets { gap: 6px; }
    .quick-bets button { padding: 6px 10px; font-size: 11px; }

    /* Section headers */
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 420px) {
    #main-content { padding: 12px; padding-bottom: 80px; }
    .home-hero { padding: 20px 14px; }
    .home-hero h1 { font-size: 22px; }
    .home-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card .stat-value { font-size: 18px; }
    .game-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .lottery-jackpot-amount { font-size: 30px; }
    .lottery-ball { width: 38px; height: 38px; font-size: 14px; }
    .countdown-digit-box { width: 48px; height: 52px; }
    .countdown-digit { font-size: 20px; }
    .roulette-wheel-wrapper { width: 220px; height: 220px; }
    .bet-board { grid-template-columns: repeat(3, 1fr); }
    .achievements-grid { grid-template-columns: 1fr 1fr; }
    .profile-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .coin { width: 120px; height: 120px; font-size: 36px; }
}
