:root {
    --bg-base: #080010;
    --bg-mid: #0d0520;
    --card: rgba(60, 20, 110, 0.20);
    --border: rgba(120, 50, 200, 0.28);
    --text: rgba(255, 255, 255, 0.96);
    --muted: rgba(180, 160, 220, 0.60);
    --text-secondary: rgba(200, 185, 235, 0.78);
    --surface-elevated: rgba(35, 14, 65, 0.55);
    --surface-glass: rgba(22, 8, 45, 0.72);
    --stroke-soft: rgba(140, 80, 220, 0.32);
    --glow-purple: rgba(147, 51, 234, 0.45);
    --purple: #9333ea;
    --purple-dark: #7c3aed;
    --cyan: #22d3ee;
    --win: rgba(74, 222, 128, 1);
    --lose: rgba(248, 113, 113, 1);
    --draw: rgba(251, 191, 36, 1);
}

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

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: 'Nunito', -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    background:
        radial-gradient(ellipse 95% 55% at 50% -10%, rgba(120, 50, 220, 0.22) 0%, transparent 56%),
        radial-gradient(ellipse 85% 50% at 100% 28%, rgba(34, 211, 238, 0.065) 0%, transparent 52%),
        radial-gradient(ellipse 125% 75% at 50% 108%, rgba(90, 45, 155, 0.09) 0%, transparent 58%),
        radial-gradient(ellipse 70% 55% at -5% 88%, rgba(34, 211, 238, 0.055) 0%, transparent 48%),
        radial-gradient(ellipse 55% 45% at 102% 72%, rgba(147, 80, 220, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-base) 0%, var(--bg-mid) 100%),
        radial-gradient(ellipse 95% 90% at 50% 50%, transparent 30%, rgba(3, 0, 12, 0.38) 100%);
    background-attachment: fixed;
    background-color: var(--bg-base);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── HEADER ── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(8, 0, 16, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--stroke-soft);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 80, 60, 0.30);
    border: 1px solid rgba(34, 211, 150, 0.40);
    padding: 9px 14px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 0 14px rgba(34, 211, 150, 0.20);
    color: #4ade80;
    letter-spacing: -0.2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .fs-box:hover {
        box-shadow: 0 0 24px rgba(34, 211, 150, 0.45);
    }

    .fs-box:active {
        transform: scale(0.96);
    }

.logo {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.2px;
}

    .logo span {
        background: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.balance-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(100, 30, 180, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.45);
    padding: 9px 18px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 0 18px rgba(147, 51, 234, 0.30);
    color: white;
    letter-spacing: -0.2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .balance-box:hover {
        box-shadow: 0 0 28px rgba(147, 51, 234, 0.55);
    }

    .balance-box:active {
        transform: scale(0.96);
    }

.currency {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── GAMES GRID ── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 16px calc(78px + env(safe-area-inset-bottom));
    max-width: 480px;
    margin: 0 auto;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
}

    .app-icon:active .icon-wrap {
        transform: scale(0.92);
    }

.icon-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(70, 30, 120, 0.28) 0%, rgba(40, 15, 75, 0.35) 100%);
    border: 1px solid var(--stroke-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 24px rgba(147, 51, 234, 0.18), 0 8px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

    .icon-wrap:hover {
        box-shadow: 0 0 32px rgba(147, 51, 234, 0.45), 0 8px 28px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    .icon-wrap::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 45%;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.10), transparent);
        border-radius: 22px 22px 0 0;
        pointer-events: none;
    }

    .icon-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
        position: relative;
        z-index: 1;
    }

.icon-emoji {
    font-size: 44px;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(147, 51, 234, 0.5));
    position: relative;
    z-index: 1;
}

.icon-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 10px;
    color: var(--muted);
}

/* ── OVERLAY ── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 0, 20, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
}

    .overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

/* ── MODAL ── */
.modal {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 500px;
    background:
        radial-gradient(ellipse 115% 90% at 50% -18%, rgba(168, 85, 247, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 90% 70% at 50% -5%, rgba(34, 211, 238, 0.075) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 70% 0%, rgba(147, 100, 220, 0.08) 0%, transparent 45%),
        linear-gradient(180deg, rgba(18, 8, 38, 0.97) 0%, rgba(12, 4, 28, 0.98) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid var(--stroke-soft);
    box-shadow:
        0 -8px 48px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(147, 51, 234, 0.12),
        0 -32px 56px rgba(168, 85, 247, 0.07),
        0 -20px 40px rgba(34, 211, 238, 0.04);
    padding: 0 20px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    display: none;
    max-height: calc(80vh - 68px);
    bottom: calc(66px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s;
    z-index: 101;
    isolation: isolate;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.45) 20%, rgba(168, 85, 247, 0.85) 50%, rgba(34, 211, 238, 0.45) 80%, transparent);
    opacity: 0.92;
    pointer-events: none;
    z-index: 2;
}

.modal > * {
    position: relative;
    z-index: 3;
}

    .modal.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

.modal-handle {
    width: 48px;
    height: 5px;
    background: rgba(160, 120, 220, 0.48);
    border-radius: 100px;
    margin: 12px auto 16px;
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.22);
}

.modal-bal {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 0 2px 16px;
    padding: 14px 16px;
    border-radius: 18px;
    color: white;
    text-align: center;
    line-height: 1.2;
    background: linear-gradient(145deg, var(--surface-glass) 0%, var(--surface-elevated) 100%);
    border: 1px solid var(--stroke-soft);
    box-shadow:
        0 0 36px rgba(147, 51, 234, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.modal-bal #balanceModal {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-btn {
    width: 100%;
    padding: 12px 16px;
    margin-top: 0;
    border-radius: 999px;
    border: 1px solid rgba(120, 60, 200, 0.28);
    background: linear-gradient(180deg, rgba(90, 45, 155, 0.22) 0%, rgba(60, 25, 110, 0.18) 100%);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s, background 0.15s, border-color 0.15s;
    text-align: left;
}

    .modal-btn:hover {
        background: linear-gradient(180deg, rgba(100, 50, 170, 0.32) 0%, rgba(70, 35, 120, 0.26) 100%);
        border-color: rgba(168, 85, 247, 0.38);
        box-shadow: 0 0 24px var(--glow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transform: translateY(-1px);
    }

    .modal-btn:active {
        transform: scale(0.99);
    }

.back-section-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid rgba(120, 50, 200, 0.20);
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

    .back-section-btn:hover {
        background: rgba(80, 40, 140, 0.15);
    }

.close-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke-soft);
    background: rgba(40, 18, 78, 0.35);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

    .close-btn:hover {
        background: rgba(70, 35, 120, 0.4);
        color: var(--text);
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.15);
    }

/* ── INPUTS ── */
input {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid rgba(120, 50, 200, 0.35);
    background: rgba(60, 20, 110, 0.18);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
}

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

    input:focus {
        outline: none;
        border-color: var(--purple);
        box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.18);
    }

button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.40);
    transition: box-shadow 0.2s, transform 0.15s;
}

    button:hover {
        box-shadow: 0 0 32px rgba(147, 51, 234, 0.65);
        transform: translateY(-1px);
    }

    button:active {
        transform: scale(0.97);
    }

.section {
    display: none;
}

    .section.active {
        display: block;
    }

/* ── HISTORY ── */
.history-item {
    background: rgba(60, 20, 110, 0.20);
    border: 1px solid rgba(120, 50, 200, 0.28);
    padding: 12px 14px;
    margin-top: 10px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

    .history-item button {
        margin-top: 8px;
        padding: 8px 16px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.10em;
        text-transform: uppercase;
        background: linear-gradient(135deg, #9333ea, #7c3aed);
        border: none;
        color: white;
        font-family: inherit;
        cursor: pointer;
        width: auto;
        box-shadow: 0 0 14px rgba(147, 51, 234, 0.40);
        transition: box-shadow 0.2s, transform 0.15s;
    }

        .history-item button:hover {
            box-shadow: 0 0 24px rgba(147, 51, 234, 0.65);
            transform: translateY(-1px);
        }

/* ── WIN / LOSE / DRAW states ── */
.result-win {
    color: var(--win);
}

.result-lose {
    color: var(--lose);
}

.result-draw {
    color: var(--draw);
}

/* ── ADMIN ── */
.admin-panel {
    margin: 20px 16px calc(88px + env(safe-area-inset-bottom));
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(165deg, rgba(50, 22, 95, 0.35) 0%, rgba(35, 12, 68, 0.4) 100%);
    border: 1px solid var(--stroke-soft);
    box-shadow: 0 0 36px rgba(147, 51, 234, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
}

    .admin-panel h3 {
        margin-bottom: 12px;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .admin-panel > button {
        width: 100%;
        padding: 12px;
        border-radius: 14px;
        border: none;
        background: linear-gradient(135deg, #9333ea, #7c3aed);
        color: white;
        font-family: inherit;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
        box-shadow: 0 0 18px rgba(147, 51, 234, 0.40);
        transition: box-shadow 0.2s, transform 0.15s;
    }

        .admin-panel > button:hover {
            box-shadow: 0 0 30px rgba(147, 51, 234, 0.65);
            transform: translateY(-1px);
        }

/* ── VALUE / NUMBER HIGHLIGHTS ── */
.value,
.multiplier,
.balance-num {
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: -0.2px;
}

/* ── CODE / MONO ── */
code, .mono {
    font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
    font-size: 0.9em;
}

/* ── GRADIENT TITLES ── */
.gradient-title {
    background: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    letter-spacing: -0.2px;
}

/* ── LABEL STYLE ── */
.label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

body.modal-open {
    overflow: hidden;
}

/* ── ANIMATIONS ── */
.app-icon {
    animation: fadeUp 0.4s ease both;
}

    .app-icon:nth-child(1) {
        animation-delay: .05s
    }

    .app-icon:nth-child(2) {
        animation-delay: .10s
    }

    .app-icon:nth-child(3) {
        animation-delay: .15s
    }

    .app-icon:nth-child(4) {
        animation-delay: .20s
    }

    .app-icon:nth-child(5) {
        animation-delay: .25s
    }

    .app-icon:nth-child(6) {
        animation-delay: .30s
    }

    .app-icon:nth-child(7) {
        animation-delay: .35s
    }

    .app-icon:nth-child(8) {
        animation-delay: .40s
    }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── FEATURED BANNER ── */
.featured-banner {
    position: relative;
    overflow: hidden;
    margin: 16px 16px 0;
    padding: 18px 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(147,51,234,0.22) 0%, rgba(34,211,238,0.10) 100%);
    border: 1px solid rgba(168, 85, 247, 0.40);
    box-shadow: 0 0 32px rgba(147, 51, 234, 0.20), 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: calc(100% - 32px);
}

.featured-banner::before {
    content: '';
    position: absolute;
    inset: -40% 40% 20% -30%;
    background: radial-gradient(closest-side, rgba(168, 85, 247, 0.35), transparent 75%);
    pointer-events: none;
    opacity: 0.9;
}

.featured-banner .featured-body,
.featured-banner .featured-label {
    position: relative;
    z-index: 1;
}

    .featured-banner:hover {
        box-shadow: 0 0 48px rgba(147, 51, 234, 0.38), 0 10px 36px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
    }

    .featured-banner:active {
        transform: scale(0.98);
    }

.featured-label {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fb923c;
    margin-bottom: 12px;
    text-shadow: 0 0 16px rgba(251, 146, 60, 0.45);
}

.featured-body {
    display: flex;
    align-items: center;
    gap: 14px;
}

.featured-icon-wrap {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(60,20,110,0.35);
    border: 1px solid rgba(168,85,247,0.30);
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .featured-icon-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.featured-info {
    flex: 1;
    min-width: 0;
}

.featured-title {
    font-size: 22px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.3px;
    line-height: 1.1;
    margin-bottom: 5px;
}

.featured-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
    font-weight: 600;
}

.featured-arrow {
    font-size: 28px;
    color: rgba(168,85,247,0.60);
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1;
}

/* ── RECENT WINS SECTION ── */
.recent-wins-section {
    margin: 18px 0 0;
    padding: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ── LEADERBOARD SECTION ── */
.leaderboard-section {
    margin: 18px 0 0;
    padding: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.leaderboard-list {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(38, 16, 72, 0.55) 0%, rgba(24, 10, 50, 0.65) 100%);
    border: 1px solid var(--stroke-soft);
    border-radius: 16px;
    padding: 12px 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.4s ease both;
}

    .leaderboard-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(147, 51, 234, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .leaderboard-item:nth-child(1) {
        animation-delay: 0.05s;
    }

    .leaderboard-item:nth-child(2) {
        animation-delay: 0.10s;
    }

    .leaderboard-item:nth-child(3) {
        animation-delay: 0.15s;
    }

    .leaderboard-item:nth-child(4) {
        animation-delay: 0.20s;
    }

    .leaderboard-item:nth-child(5) {
        animation-delay: 0.25s;
    }

.leader-rank {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.leader-info {
    flex: 1;
    min-width: 0;
}

.leader-username {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.leader-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.leader-amount {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: -0.3px;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.40);
    flex-shrink: 0;
}

.no-leaderboard {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 12px;
}

.title-icon {
    font-size: 18px;
    line-height: 1;
}

.title-text {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.recent-wins-scroll {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .recent-wins-scroll::-webkit-scrollbar {
        display: none;
    }

.win-card {
    min-width: 280px;
    background: linear-gradient(135deg, rgba(38, 16, 72, 0.55) 0%, rgba(24, 10, 50, 0.65) 100%);
    border: 1px solid var(--stroke-soft);
    border-radius: 18px;
    padding: 14px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: slideIn 0.4s ease both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.win-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
}

.win-user {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.win-game {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 10px;
    background: rgba(60, 20, 110, 0.40);
    border-radius: 8px;
    border: 1px solid rgba(120, 50, 200, 0.25);
    flex-shrink: 0;
    white-space: nowrap;
}

.win-amounts {
    display: flex;
    gap: 12px;
}

.win-bet, .win-profit {
    flex: 1;
}

.win-label {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.win-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.3px;
}

.win-highlight {
    color: var(--win);
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.40);
}

.usdt-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.no-wins {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* ── GAMES SECTION HEADER ── */
.games-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 12px;
    max-width: 480px;
    margin: 0 auto;
}

.all-games-btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(120, 50, 200, 0.30);
    background: rgba(60, 20, 110, 0.25);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.15);
    margin: 0;
    width: auto;
    letter-spacing: -0.1px;
}

    .all-games-btn:hover {
        background: rgba(80, 40, 140, 0.35);
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.30);
        transform: translateY(-1px);
    }

    .all-games-btn:active {
        transform: scale(0.96);
    }

/* ── BOTTOM TAB BAR ── */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 480px;
    display: flex;
    align-items: stretch;
    background: rgba(10, 2, 22, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--stroke-soft);
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 0 14px;
    margin-top: 0;
    width: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

    .tab-btn:hover {
        box-shadow: none;
        transform: none;
    }

    .tab-btn:active {
        transform: none;
        background: rgba(120, 50, 200, 0.14);
    }

    .tab-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 12%;
        right: 12%;
        height: 3px;
        border-radius: 0 0 6px 6px;
        background: linear-gradient(90deg, transparent, var(--purple) 20%, #c084fc 50%, var(--purple) 80%, transparent);
        opacity: 0;
        transition: opacity 0.25s ease;
        box-shadow: 0 0 14px var(--glow-purple);
    }

    .tab-btn.active::before {
        opacity: 1;
    }

    .tab-btn.active {
        background: radial-gradient(ellipse 100% 120% at 50% 0%, rgba(147, 51, 234, 0.22), transparent 65%);
    }

.tab-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s;
}

.tab-btn.active .tab-icon {
    transform: scale(1.15);
}

.tab-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
    font-family: inherit;
}

.tab-btn.active .tab-label {
    color: #d8b4fe;
    text-shadow: 0 0 20px rgba(147, 51, 234, 0.45);
}

/* ── FAQ SECTION ── */
.faq-content {
    padding: 0;
}

.faq-title {
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-item {
    background: rgba(60, 20, 110, 0.20);
    border: 1px solid rgba(120, 50, 200, 0.28);
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.faq-question {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.1px;
}

.faq-answer {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 500;
}

.faq-answer strong {
    color: var(--cyan);
    font-weight: 800;
}
