/* ===== Webrace — Site Styles ===== */

:root {
    --bg-primary: #0b0b0b;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-sidebar: rgba(163, 38, 255, 0.35);
    --purple: #a326ff;
    --purple-hover: #b545ff;
    --purple-glow: rgba(163, 38, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --green-win: #22c55e;
    --gold-start: #fcd34d;
    --gold-mid: #f59e0b;
    --gold-end: #d97706;
    --sidebar-width: 230px;
    --sidebar-header-height: 40px;
    --topbar-height: 56px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul { list-style: none; }

svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== App Layout ===== */
.app {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app-page {
    height: 100%;
}

.wrapper {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ===== Top Bar ===== */
.topbar {
    position: relative;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 0 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    height: var(--topbar-height);
    flex-shrink: 0;
    overflow: visible;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(163, 38, 255, 0.45);
    background: linear-gradient(180deg, rgba(163, 38, 255, 0.22) 0%, rgba(124, 58, 237, 0.12) 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.2);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mobile-menu-btn__bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 14px;
}

.mobile-menu-btn__bars span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-btn__label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mobile-menu-btn.is-open .mobile-menu-btn__bars span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.is-open .mobile-menu-btn__bars span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.is-open .mobile-menu-btn__bars span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-btn.is-open {
    background: rgba(163, 38, 255, 0.28);
    border-color: rgba(196, 120, 255, 0.55);
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-diamond {
    width: 18px;
    height: 18px;
    color: var(--purple);
    flex-shrink: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* Casino / Sports product switch (topbar) */
.tb-product-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(8, 6, 14, 0.85);
    border: 1px solid rgba(163, 38, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 16px rgba(0, 0, 0, 0.35);
    gap: 3px;
    flex-shrink: 0;
}

.tb-product-switch__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    color: #71717a;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tb-product-switch__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
    transition: opacity 0.18s ease;
}

.tb-product-switch__icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tb-product-switch__item:hover:not(.is-active) {
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.05);
}

.tb-product-switch__item:hover .tb-product-switch__icon {
    opacity: 1;
}

.tb-product-switch__item.is-active {
    color: #fff;
}

.tb-product-switch__item.is-active .tb-product-switch__icon {
    opacity: 1;
}

.tb-product-switch__item.is-active--casino {
    background: linear-gradient(135deg, rgba(163, 38, 255, 0.5) 0%, rgba(124, 58, 237, 0.35) 100%);
    box-shadow: 0 2px 14px rgba(163, 38, 255, 0.3);
}

.tb-product-switch__item.is-active--sports {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4) 0%, rgba(22, 163, 74, 0.28) 100%);
    box-shadow: 0 2px 14px rgba(34, 197, 94, 0.22);
}

@media (max-width: 768px) {
    .tb-product-switch {
        margin-left: 0;
        padding: 3px;
    }

    .tb-product-switch__item {
        padding: 7px 10px;
        gap: 0;
    }

    .tb-product-switch__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tb-product-switch__item.is-active {
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
}

.logo-dot {
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right--user {
    gap: 8px;
    margin-right: 40px;
}

/* ===== Topbar — logged-in (BC.Game-style) ===== */

/* Override the global `svg { width:100%; height:100% }` rule inside the topbar
   so icons render at their intended sizes (otherwise the wallet pill and
   icon buttons will blow up). */
.topbar svg {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    flex-shrink: 0;
}

/* Square/round icon-only buttons (search, gift, chat, bell) */
.tb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    background: #161221;
    color: #c8cbd1;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.tb-icon-btn:hover {
    background: #1e1830;
    border-color: rgba(163, 38, 255, 0.35);
    color: #fff;
}

.tb-icon-btn:active {
    transform: scale(0.96);
}

.tb-icon-btn--round {
    border-radius: 999px;
}

.tb-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Wallet pill (coin + balance + dropdown caret) */
.tb-wallet {
    position: relative;
    z-index: 5;
}

.tb-wallet__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 6px;
    background: linear-gradient(180deg, #1d1530 0%, #181125 100%);
    border: 1px solid rgba(163, 38, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.tb-wallet__pill:hover {
    background: linear-gradient(180deg, #261a3f 0%, #1e1530 100%);
    border-color: rgba(163, 38, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(163, 38, 255, 0.08);
}

.tb-wallet__coin,
.tb-wallet__coin svg,
.tb-wallet__coin img {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

.tb-wallet__amount {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
    padding-right: 2px;
}

.tb-wallet__caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: #c4a3f5;
}

.tb-wallet__caret svg {
    width: 12px;
    height: 12px;
    /* chevron.svg points right → rotate so it points down */
    transform: rotate(90deg);
}

.tb-wallet__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    padding: 4px;
    margin: 0;
    list-style: none;
    background: linear-gradient(180deg, #181126 0%, #14101e 100%);
    border: 1px solid rgba(163, 38, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.7),
                0 0 20px -8px rgba(163, 38, 255, 0.22);
    z-index: 300;
    animation: tb-menu-in 0.14s ease-out;
}

.tb-wallet__menu[hidden] {
    display: none;
}

.tb-wallet__option {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #e5e7eb;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.tb-wallet__option:hover {
    background: rgba(163, 38, 255, 0.12);
}

.tb-wallet__option.is-selected {
    background: rgba(163, 38, 255, 0.18);
}

.tb-wallet__option-coin,
.tb-wallet__option-coin svg,
.tb-wallet__option-coin img {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.tb-wallet__option-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.tb-wallet__option-label {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.tb-wallet__option-code {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.04em;
}

.tb-wallet__option-amount {
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #b7ff00;
    white-space: nowrap;
}

/* Purple "Deposit" CTA — matches Webrace primary accent */
.tb-deposit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: linear-gradient(180deg, #b545ff 0%, #a326ff 50%, #8a18e0 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.02em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(163, 38, 255, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.tb-deposit-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(163, 38, 255, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tb-deposit-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* Avatar + dropdown menu (where Logout lives) */
.tb-user {
    position: relative;
    margin-left: 4px;
}

.tb-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(163, 38, 255, 0.35);
    background: #161221;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.tb-user__avatar:hover {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(163, 38, 255, 0.18);
}

.tb-user__avatar:active {
    transform: scale(0.96);
}

.tb-user__avatar img {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: block;
    object-fit: cover;
}

.tb-user__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 270px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 8px;
    background: linear-gradient(180deg, #181126 0%, #14101e 100%);
    border: 1px solid rgba(163, 38, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.7),
                0 0 24px -8px rgba(163, 38, 255, 0.25);
    z-index: 200;
    animation: tb-menu-in 0.14s ease-out;
    scrollbar-width: thin;
    scrollbar-color: rgba(163, 38, 255, 0.35) transparent;
}

.tb-user__menu::-webkit-scrollbar {
    width: 6px;
}

.tb-user__menu::-webkit-scrollbar-thumb {
    background: rgba(163, 38, 255, 0.35);
    border-radius: 6px;
}

.tb-user__menu[hidden] {
    display: none;
}

@keyframes tb-menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tb-user__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tb-user__item {
    display: grid;
    grid-template-columns: 14px 28px 1fr;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #d4d4d8;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s, color 0.12s;
}

.tb-user__item:hover {
    background: rgba(163, 38, 255, 0.12);
    color: #fff;
}

.tb-user__item-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: transparent;
    justify-self: center;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s;
}

.tb-user__item.is-active {
    color: #fff;
}

.tb-user__item.is-active .tb-user__item-dot {
    background: var(--green-win, #22c55e);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.tb-user__item.is-active .tb-user__item-icon {
    color: #fff;
}

.tb-user__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: color 0.12s;
}

.tb-user__item-icon svg {
    width: 20px;
    height: 20px;
}

.tb-user__item:hover .tb-user__item-icon {
    color: #c4a3f5;
}

.tb-user__item-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-user__item--danger {
    color: #f87171;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
    border-radius: 0 0 8px 8px;
}

.tb-user__item--danger .tb-user__item-icon {
    color: #f87171;
}

.tb-user__item--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.tb-user__item--danger:hover .tb-user__item-icon {
    color: #fca5a5;
}

/* Hide secondary icons on small screens — keep search, wallet, deposit, avatar */
@media (max-width: 720px) {
    .tb-icon-btn[aria-label="Chat"],
    .tb-icon-btn[aria-label="Cashback"],
    .tb-icon-btn[aria-label="Notifications"] {
        display: none;
    }

    .tb-wallet__amount {
        font-size: 12px;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }

    .tb-deposit-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .tb-wallet__menu,
    .tb-user__menu {
        width: min(200px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }
}

/* Legacy classes — kept so any third-party page that still uses them
   doesn't break visually. The new topbar markup no longer renders them. */
.user-balance {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.14);
    border: 1px solid rgba(147, 51, 234, 0.28);
    color: #e9d5ff;
    font-size: 12px;
    font-weight: 700;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-login {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 4px;
    transition: color 0.15s;
}

button.btn-login {
    border: none;
    background: transparent;
}

.btn-login:hover {
    color: var(--text-secondary);
}

.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--purple);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

button.btn-register {
    border: none;
}

.btn-register:hover {
    background: var(--purple-hover);
    box-shadow: 0 0 20px var(--purple-glow);
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-sidebar);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s ease;
    z-index: 120;
}

.sidebar-header {
    height: var(--sidebar-header-height);
    min-height: var(--sidebar-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-header__title {
    display: none;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    padding: 6px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.sidebar-toggle__label {
    display: none;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.sidebar-toggle__icon--close {
    display: none;
}

.sidebar-toggle__icon--menu svg {
    width: 20px;
    height: 20px;
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-promo {
    display: block;
    margin: 12px 10px 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}

.sidebar-promo:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(163, 38, 255, 0.25);
}

.promo-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Navigation — ol.navigation */
.navigation {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0 24px;
    margin: 0;
    min-height: 0;
}

.navigation-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation-group__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.navigation-group__label:hover {
    color: var(--text-secondary);
}

.navigation-group__chevron {
    width: 14px;
    height: 14px;
    display: flex;
    transition: transform 0.2s;
}

.navigation-group__chevron svg {
    width: 14px;
    height: 14px;
}

.navigation-group.collapsed .navigation-group__chevron {
    transform: rotate(-90deg);
}

.navigation-group.collapsed .navigation-group__list {
    display: none;
}

.navigation-group__list {
    list-style: none;
    margin: 0;
    padding: 0 8px 4px;
}

.navigation-item {
    list-style: none;
}

.navigation-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease;
    position: relative;
}

.navigation-link:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.04);
}

.navigation-link.active {
    color: #fff;
    background: rgba(163, 38, 255, 0.08);
}

.navigation-link.active:hover {
    background: rgba(163, 38, 255, 0.12);
}

.navigation-link.active::before {
    display: none;
}

.navigation-link__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(163, 38, 255, 0.1);
    color: var(--purple);
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.navigation-link:hover .navigation-link__icon {
    color: var(--purple-hover);
    background: rgba(163, 38, 255, 0.16);
}

.navigation-link.active .navigation-link__icon {
    color: #fff;
    background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
    box-shadow: 0 0 14px var(--purple-glow);
}

.navigation-link__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.navigation-link__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 80px;
}

.page-content-inner {
    width: 100%;
    max-width: 1520px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 32px 0;
    box-sizing: border-box;
}

/* ===== Hero Banner ===== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(13,13,13,0.85) 0%, rgba(13,13,13,0.3) 45%, rgba(13,13,13,0.6) 100%),
        radial-gradient(ellipse at 70% 50%, rgba(163,38,255,0.35) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(34,197,94,0.15) 0%, transparent 50%),
        linear-gradient(135deg, #1a0a2e 0%, #0d0d0d 40%, #1a1030 100%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-chips {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.chip {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,0.3);
}

.chip-1 {
    top: 30%;
    left: 45%;
    background: radial-gradient(circle, #22c55e 30%, #15803d 100%);
    transform: rotate(15deg);
    animation: float 4s ease-in-out infinite;
}

.chip-2 {
    top: 55%;
    left: 38%;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, #a326ff 30%, #6b21a8 100%);
    animation: float 5s ease-in-out infinite 0.5s;
}

.chip-3 {
    top: 40%;
    left: 52%;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, #f59e0b 30%, #b45309 100%);
    animation: float 3.5s ease-in-out infinite 1s;
}

.card-float {
    position: absolute;
    width: 32px;
    height: 44px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.card-float::after {
    content: '♠';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1a1a1a;
}

.card-1 {
    top: 25%;
    left: 50%;
    transform: rotate(-20deg);
    animation: float 4.5s ease-in-out infinite 0.3s;
}

.card-2 {
    top: 50%;
    left: 42%;
    transform: rotate(25deg);
    animation: float 5s ease-in-out infinite 0.8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-8px) rotate(var(--r, 0deg)); }
}

.hero-content {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.hero-dollar {
    font-size: 52px;
    font-weight: 900;
    background: linear-gradient(180deg, #fef08a 0%, #fbbf24 40%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.5)) drop-shadow(0 0 30px rgba(251, 191, 36, 0.3));
    letter-spacing: -0.02em;
}

.hero-race {
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(180deg, #fef3c7 0%, #fcd34d 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4));
    margin-top: 4px;
}

.hero-character {
    position: absolute;
    right: 40px;
    bottom: -10px;
    width: 160px;
    height: 220px;
    z-index: 2;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

.racer-svg {
    width: 100%;
    height: 100%;
}

/* ===== Sections ===== */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-icon {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green-win);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-all {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.btn-view-all:hover {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
}

.btn-nav {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.12s ease, opacity 0.15s;
}

.btn-nav:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-nav:not(:disabled):active {
    transform: scale(0.96);
}

.btn-nav:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

/* ===== Big Wins ===== */
.big-wins-track-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.big-wins-track {
    display: flex;
    gap: 10px;
    animation: scroll-wins 40s linear infinite;
    width: max-content;
}

.big-wins-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-wins {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.win-card {
    flex-shrink: 0;
    width: 100px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: transform 0.15s, border-color 0.15s;
}

.win-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.1);
}

.win-thumb {
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.win-game-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    z-index: 1;
}

.win-thumb-le-bandit {
    background: linear-gradient(160deg, #7c3aed 0%, #4c1d95 50%, #1e1b4b 100%);
}

.win-thumb-le-bandit::before {
    content: '🦝';
    position: absolute;
    top: 20%;
    font-size: 36px;
}

.win-thumb-book-ronin {
    background: linear-gradient(160deg, #dc2626 0%, #7f1d1d 50%, #1a1a1a 100%);
}

.win-thumb-book-ronin::before {
    content: '⚔';
    position: absolute;
    top: 25%;
    font-size: 32px;
    opacity: 0.9;
}

.win-thumb-duel-dawn {
    background: linear-gradient(160deg, #f59e0b 0%, #b45309 50%, #451a03 100%);
}

.win-thumb-duel-dawn::before {
    content: '🤠';
    position: absolute;
    top: 22%;
    font-size: 34px;
}

.win-info {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.win-user {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.win-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--green-win);
}

/* ===== Originals ===== */
.originals-track-wrapper {
    overflow: hidden;
}

.originals-track {
    display: flex;
    gap: 12px;
    transition: transform 0.35s ease;
}

.original-card {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s;
}

.original-card:hover {
    transform: translateY(-3px);
}

.original-card:hover .original-art {
    border-color: rgba(163, 38, 255, 0.4);
    box-shadow: 0 8px 24px rgba(163, 38, 255, 0.15);
}

.original-art {
    aspect-ratio: 1;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.original-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.original-card:hover .original-name {
    color: var(--text-primary);
}

/* Original game art */
.art-mines {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
}

.gem {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    filter: drop-shadow(0 0 8px rgba(163, 38, 255, 0.6));
}

.gem-2 { transform: scale(0.85); opacity: 0.8; }
.gem-3 { transform: scale(1.1); }
.gem-4 { transform: scale(0.75); opacity: 0.7; }
.gem-5 { grid-column: 2; transform: scale(0.9); }

.art-slide {
    width: 80%;
}

.slide-bar {
    height: 12px;
    background: linear-gradient(90deg, #ef4444 0%, #ef4444 45%, #22c55e 55%, #22c55e 100%);
    border-radius: var(--radius-pill);
    position: relative;
}

.slide-knob {
    position: absolute;
    top: 50%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.art-dice .dice-3d {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e9d5ff, #a855f7);
    border-radius: 10px;
    position: relative;
    transform: rotate(-12deg);
    box-shadow: 4px 4px 0 #6b21a8, 0 0 20px rgba(163,38,255,0.4);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.dice-3d span {
    width: 8px;
    height: 8px;
    background: #4c1d95;
    border-radius: 50%;
}

.art-keno {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 12px;
}

.keno-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
}

.keno-dot.active {
    background: var(--purple);
    border-color: var(--purple);
    box-shadow: 0 0 8px var(--purple-glow);
}

.art-towers {
    position: relative;
    width: 70px;
    height: 80px;
}

.tower-claw {
    width: 40px;
    height: 20px;
    border: 3px solid var(--text-secondary);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    margin: 0 auto;
    position: relative;
}

.tower-claw::before,
.tower-claw::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 8px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 2px;
}

.tower-claw::before { left: 4px; transform: rotate(-15deg); }
.tower-claw::after { right: 4px; transform: rotate(15deg); }

.tower-egg {
    width: 36px;
    height: 44px;
    background: linear-gradient(180deg, #c084fc, #7c3aed);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 20px auto 0;
    box-shadow: 0 0 16px rgba(163,38,255,0.5);
}

.art-plinko {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    max-width: 80px;
}

.plinko-pin {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
}

/* ===== Site Footer ===== */
.site-footer {
    width: 100%;
    max-width: 1520px;
    margin: 48px auto 0;
    padding: 32px 32px 24px;
    border-top: 1px solid var(--border-subtle);
    box-sizing: border-box;
}

.site-footer__top {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 32px;
    margin-bottom: 36px;
}

.site-footer__heading {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 14px;
}

.site-footer__group {
    border: 0;
}

.site-footer__group summary.site-footer__heading {
    list-style: none;
    cursor: default;
    pointer-events: none;
}

.site-footer__group summary.site-footer__heading::-webkit-details-marker {
    display: none;
}

.site-footer__group summary.site-footer__heading::marker {
    content: '';
}

.site-footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__links a {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer__links a:hover {
    color: #fff;
}

.site-footer__col--community {
    min-width: 0;
}

.site-footer__social {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--purple, #9333ea);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.site-footer__social-link:hover {
    color: var(--purple-hover, #c084fc);
    background: rgba(147, 51, 234, 0.12);
}

.site-footer__social-link svg {
    display: block;
    width: 22px;
    height: 22px;
}

.site-footer__currencies-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.site-footer__currencies-sub {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 14px;
}

.site-footer__crypto-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-footer__crypto-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    background: #161616;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.site-footer__crypto-icon {
    display: block;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
}

.legal-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 32px;
    box-sizing: border-box;
}

.legal-page h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
}

.legal-page p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Chat FAB ===== */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: var(--purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: #fff;
    box-shadow: 0 4px 20px var(--purple-glow);
    z-index: 200;
    transition: transform 0.15s, box-shadow 0.15s;
}

.chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px var(--purple-glow);
}

/* ===== Auth Pages ===== */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - var(--topbar-height));
}

.auth-page .auth-card {
    width: 100%;
    max-width: 400px;
    margin-top: auto;
    margin-bottom: auto;
    flex-shrink: 0;
}

.auth-page .site-footer {
    width: 100%;
    align-self: stretch;
    flex-shrink: 0;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.auth-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form label span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-form input {
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.auth-form input:focus {
    border-color: var(--purple);
}

.btn-full {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
}

.auth-link {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--purple);
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ===== Sidebar collapsed ===== */
.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .sidebar-promo,
.sidebar.collapsed .navigation-group__label span:first-child,
.sidebar.collapsed .navigation-link__text,
.sidebar.collapsed .navigation-group__chevron {
    display: none;
}

.sidebar.collapsed .sidebar-promo {
    margin: 8px 6px;
}

.sidebar.collapsed .navigation-link {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .navigation-group__label {
    justify-content: center;
    padding: 10px 8px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-width);
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-dollar { font-size: 36px; }
    .hero-race { font-size: 28px; }
    .hero-character { width: 120px; right: 16px; }
    .hero-content { left: 20px; }
    .hero-banner { height: 160px; }

    .page-content-inner {
        padding: 16px 16px 0;
    }

    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .legal-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .races-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-footer__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 20px;
    }

    .site-footer__col--community {
        grid-column: 1 / -1;
    }
}

/* Scrollbar — WebKit/Blink (Chrome, Edge, Safari).
   Do NOT set scrollbar-width on these elements: Chrome 121+ ignores
   ::-webkit-scrollbar when scrollbar-width is present. */
.main-content::-webkit-scrollbar,
.navigation::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
}

.main-content::-webkit-scrollbar-button,
.navigation::-webkit-scrollbar-button,
.main-content::-webkit-scrollbar-button:single-button,
.navigation::-webkit-scrollbar-button:single-button,
.main-content::-webkit-scrollbar-button:vertical:decrement,
.main-content::-webkit-scrollbar-button:vertical:increment,
.navigation::-webkit-scrollbar-button:vertical:decrement,
.navigation::-webkit-scrollbar-button:vertical:increment,
.main-content::-webkit-scrollbar-button:horizontal:decrement,
.main-content::-webkit-scrollbar-button:horizontal:increment,
.navigation::-webkit-scrollbar-button:horizontal:decrement,
.navigation::-webkit-scrollbar-button:horizontal:increment {
    display: none;
    width: 0;
    height: 0;
}

.main-content::-webkit-scrollbar-track,
.navigation::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb,
.navigation::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.main-content::-webkit-scrollbar-thumb:hover,
.navigation::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

.main-content::-webkit-scrollbar-corner,
.navigation::-webkit-scrollbar-corner {
    background: transparent;
}

/* Scrollbar — Firefox only */
@-moz-document url-prefix() {
    .main-content,
    .navigation {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    }
}
