/* =========================================================
   NEXUS PLAY UI V2
   Presentation layer only.
   DO NOT contain backend logic here.
   ========================================================= */

:root {
    --nx-bg: #f8f6fb;
    --nx-surface: #ffffff;
    --nx-surface-2: #f3f0f7;

    --nx-text: #211d2b;
    --nx-muted: #777181;

    --nx-primary: #e83f9f;
    --nx-secondary: #8750e8;

    --nx-border: #e5e0e9;
    --nx-success: #22a06b;
    --nx-danger: #dc4c5b;

    --nx-radius: 18px;
    --nx-radius-sm: 12px;

    --nx-shadow:
        0 8px 30px rgba(40, 25, 60, .08);

    --nx-gradient:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        );
}

/* ---------- Base ---------- */

html {
    background: var(--nx-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--nx-bg);
    color: var(--nx-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--nx-text);
}

p {
    color: var(--nx-muted);
}

/* ---------- Generic surface ---------- */

.nx-card {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    box-shadow: var(--nx-shadow);
}

.nx-section {
    margin: 24px 0;
}

.nx-eyebrow {
    margin: 0 0 6px;
    color: var(--nx-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nx-title {
    margin: 0;
    color: var(--nx-text);
    font-weight: 800;
}

.nx-muted {
    color: var(--nx-muted);
}

/* ---------- Buttons ---------- */

.nx-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition:
        transform .18s ease,
        opacity .18s ease,
        box-shadow .18s ease;
}

.nx-button:hover {
    transform: translateY(-1px);
}

.nx-button-primary {
    background: var(--nx-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(135, 80, 232, .22);
}

.nx-button-secondary {
    background: var(--nx-surface-2);
    color: var(--nx-text);
    border: 1px solid var(--nx-border);
}

/* ---------- Forms ---------- */

.nx-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    background: var(--nx-surface);
    color: var(--nx-text);
    outline: none;
}

.nx-input:focus {
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px rgba(232, 63, 159, .10);
}

.nx-input::placeholder {
    color: #aaa4b0;
}

/* ---------- Navigation ---------- */

.nx-nav {
    background: var(--nx-surface);
    border-bottom: 1px solid var(--nx-border);
}

.nx-nav a {
    color: var(--nx-text);
    text-decoration: none;
}

/* ---------- Account / balance ---------- */

.nx-balance {
    background: var(--nx-gradient);
    color: #fff;
    border-radius: var(--nx-radius);
    padding: 20px;
    box-shadow: var(--nx-shadow);
}

.nx-balance-label {
    opacity: .78;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nx-balance-value {
    margin-top: 6px;
    font-size: 28px;
    font-weight: 800;
}

/* ---------- Status ---------- */

.nx-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 160, 107, .10);
    color: var(--nx-success);
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {

    body {
        padding-bottom: 76px;
    }

    .nx-section {
        margin: 18px 0;
    }

    .nx-card {
        border-radius: 16px;
    }

    .nx-title {
        font-size: 24px;
    }

    .nx-button {
        min-height: 48px;
    }
}

/* =========================================================
   NEXUS PLAY V2 — GLOBAL SHELL
   ========================================================= */

.nx-v2 {
    min-height: 100vh;
    background: var(--nx-bg);
    color: var(--nx-text);
}

.nx-v2-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--nx-border);
    backdrop-filter: blur(16px);
}

.nx-v2-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nx-v2-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--nx-text);
    text-decoration: none;
    flex-shrink: 0;
}

.nx-v2-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--nx-gradient);
    color: #fff;
    font-weight: 900;
}

.nx-v2-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nx-v2-brand-text strong {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .5px;
}

.nx-v2-brand-text small {
    margin-top: 4px;
    color: var(--nx-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.nx-v2-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nx-v2-menu a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--nx-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: .18s ease;
}

.nx-v2-menu a:hover {
    background: var(--nx-surface-2);
    color: var(--nx-primary);
}

.nx-v2-wallet {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    background: var(--nx-surface);
    color: var(--nx-text);
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

.nx-v2-wallet-icon {
    color: var(--nx-primary);
}

.nx-v2-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nx-v2-auth-login,
.nx-v2-auth-register {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
}

.nx-v2-auth-login {
    border: 1px solid var(--nx-border);
    background: var(--nx-surface);
    color: var(--nx-text);
}

.nx-v2-auth-register {
    background: var(--nx-gradient);
    color: #fff;
}

.nx-v2-mobile-menu {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    background: var(--nx-surface);
    color: var(--nx-text);
}

/* ---------- Page container ---------- */

.nx-v2-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* ---------- Bottom navigation ---------- */

.nx-v2-bottomnav {
    display: none;
}

/* ---------- Mobile ---------- */

@media (max-width: 820px) {

    .nx-v2-header-inner {
        min-height: 64px;
        width: min(100% - 24px, 600px);
        gap: 12px;
    }

    .nx-v2-menu,
    .nx-v2-wallet,
    .nx-v2-auth {
        display: none;
    }

    .nx-v2-mobile-menu {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .nx-v2-bottomnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;

        display: grid;
        grid-template-columns: repeat(5, 1fr);

        min-height: 66px;
        padding-bottom: env(safe-area-inset-bottom);

        background: rgba(255,255,255,.97);
        border-top: 1px solid var(--nx-border);
        box-shadow: 0 -8px 25px rgba(40,25,60,.08);
        backdrop-filter: blur(16px);
    }

    .nx-v2-bottomnav a {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;

        color: var(--nx-muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 800;
    }

    .nx-v2-bottomnav a.active {
        color: var(--nx-primary);
    }

    .nx-v2-bottomnav .nav-icon {
        width: 22px;
        height: 22px;
    }

    .nx-v2-bottomnav svg {
        width: 100%;
        height: 100%;
    }

    body {
        padding-bottom: 72px;
    }
}


/* =========================================================
   NEXUS PLAY V2
   GLOBAL LEGACY CLASS ADAPTER
   Visual only — backend untouched.
   ========================================================= */

/* ---------- GLOBAL PAGE ---------- */

html,
body {
    background: var(--nx-bg) !important;
    color: var(--nx-text) !important;
}

body {
    overflow-x: hidden;
}

main,
.container {
    color: var(--nx-text);
}

/* ---------- TOP HEADER ---------- */

.topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;

    background: rgba(255,255,255,.96) !important;
    color: var(--nx-text) !important;

    border-bottom: 1px solid var(--nx-border) !important;

    box-shadow:
        0 4px 20px rgba(40,25,60,.05) !important;

    backdrop-filter: blur(16px);
}

.topbar .container.nav,
.topbar .nav {
    width: min(1180px, calc(100% - 32px)) !important;
    min-height: 72px !important;
    margin: 0 auto !important;

    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
}

/* ---------- BRAND ---------- */

.topbar .brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;

    color: var(--nx-text) !important;
    text-decoration: none !important;
}

.topbar .brand-mark {
    width: 40px !important;
    height: 40px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 12px !important;

    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;

    color: #fff !important;

    overflow: hidden;
}

.topbar .brand-mark svg {
    width: 23px !important;
    height: 23px !important;
    fill: currentColor !important;
}

.topbar .brand-mark img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.topbar .brand-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.1 !important;
}

.topbar .brand-text strong {
    color: var(--nx-text) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

.topbar .brand-text small {
    margin-top: 4px !important;
    color: var(--nx-muted) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
}

/* ---------- DESKTOP NAV ---------- */

.topbar .navlinks {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex: 1 !important;
}

.topbar .navlinks a {
    display: inline-flex !important;
    align-items: center !important;

    min-height: 40px !important;
    padding: 0 12px !important;

    border-radius: 10px !important;

    background: transparent !important;
    color: var(--nx-muted) !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    text-decoration: none !important;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease !important;
}

.topbar .navlinks a:hover {
    background: var(--nx-surface-2) !important;
    color: var(--nx-primary) !important;
    transform: translateY(-1px);
}

/* ---------- WALLET ---------- */

.topbar .wallet {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    min-height: 44px !important;
    padding: 0 14px !important;

    border: 1px solid var(--nx-border) !important;
    border-radius: 12px !important;

    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;

    text-decoration: none !important;

    white-space: nowrap !important;

    box-shadow: none !important;
}

.topbar .wallet:hover {
    border-color: var(--nx-primary) !important;
}

.topbar .wallet-icon {
    color: var(--nx-primary) !important;
}

/* ---------- AUTH ---------- */

.header-auth-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.header-auth-actions .header-login,
.header-auth-actions .header-register {
    min-height: 42px !important;
    padding: 0 16px !important;

    border-radius: 11px !important;

    font-weight: 800 !important;
    text-decoration: none !important;
}

.header-auth-actions .header-login {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}

.header-auth-actions .header-register {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;

    color: #fff !important;
    border: 0 !important;
}

/* ---------- MOBILE MENU BUTTON ---------- */

.topbar .mobile-menu {
    width: 44px !important;
    height: 44px !important;

    display: none;

    place-items: center !important;

    margin-left: auto !important;

    border: 1px solid var(--nx-border) !important;
    border-radius: 12px !important;

    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
}

.topbar .mobile-menu svg {
    width: 22px !important;
    height: 22px !important;
}

/* ---------- MOBILE DRAWER ---------- */

.mobile-menu-overlay {
    background: rgba(30,20,40,.25) !important;
    backdrop-filter: blur(3px);
}

.mobile-drawer {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;

    border-left: 1px solid var(--nx-border) !important;

    box-shadow:
        -12px 0 40px rgba(30,20,40,.12) !important;
}

.mobile-drawer-head {
    background: var(--nx-surface) !important;
    border-bottom: 1px solid var(--nx-border) !important;
}

.mobile-drawer-brand strong {
    color: var(--nx-text) !important;
}

.mobile-drawer-brand small {
    color: var(--nx-muted) !important;
}

.mobile-drawer-logo {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;

    color: #fff !important;
}

.mobile-drawer-close {
    background: var(--nx-surface-2) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}

.mobile-drawer-nav a {
    color: var(--nx-text) !important;
    background: transparent !important;
    border-radius: 12px !important;
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav a:focus {
    background: var(--nx-surface-2) !important;
    color: var(--nx-primary) !important;
}

.mobile-drawer-nav svg {
    color: currentColor !important;
}

/* ---------- MOBILE BOTTOM NAV ---------- */

@media (max-width: 820px) {

    .topbar .container.nav,
    .topbar .nav {
        width: calc(100% - 24px) !important;
        min-height: 64px !important;
    }

    .topbar .navlinks,
    .topbar .wallet,
    .header-auth-actions {
        display: none !important;
    }

    .topbar .mobile-menu {
        display: grid !important;
    }

    .mobile-drawer {
        z-index: 3000 !important;
    }

    .mobile-menu-overlay {
        z-index: 2999 !important;
    }

}

/* =========================================================
   END GLOBAL LEGACY CLASS ADAPTER
   ========================================================= */

/* =========================================================
   NEXUS PLAY V2 — MOBILE POLISH
   Presentation only. Backend untouched.
   ========================================================= */

@media (max-width: 820px) {

    /* ---------- PAGE ---------- */

    html,
    body {
        background: #f8f6fb !important;
        color: #211d2b !important;
    }

    body {
        padding-bottom: 78px !important;
    }

    main {
        width: 100% !important;
        max-width: none !important;
        padding: 0 16px 30px !important;
        margin: 0 !important;
    }

    /* ---------- HEADER ---------- */

    .topbar {
        position: sticky !important;
        top: 0 !important;
        background: rgba(255,255,255,.98) !important;
        border-bottom: 1px solid #e8e2eb !important;
        box-shadow: 0 3px 18px rgba(40,25,60,.06) !important;
    }

    .topbar .container.nav {
        min-height: 68px !important;
        width: calc(100% - 20px) !important;
        gap: 10px !important;
    }

    .topbar .brand {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .topbar .brand-mark {
        width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px !important;
    }

    .topbar .brand-text strong {
        font-size: 15px !important;
        color: #211d2b !important;
    }

    .topbar .brand-text small {
        color: #777181 !important;
        font-size: 8px !important;
    }

    .topbar .mobile-menu {
        width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
        background: #fff !important;
        border: 1px solid #e4dfe8 !important;
        color: #211d2b !important;
        box-shadow: none !important;
    }

    /* ---------- ALL HEADINGS ---------- */

    h1,
    h2,
    h3,
    h4 {
        color: #211d2b !important;
    }

    p,
    small {
        color: #777181 !important;
    }

    /* ---------- GAME LOBBY ---------- */

    .games-section,
    .games-section-head {
        color: #211d2b !important;
    }

    .games-section-head h2,
    .games-section-head h3,
    .games-section-head strong {
        color: #211d2b !important;
    }

    .game-count {
        background: #fff !important;
        color: #211d2b !important;
        border: 1px solid #e5e0e9 !important;
        box-shadow: 0 8px 25px rgba(40,25,60,.07) !important;
    }

    .game-count strong {
        color: #211d2b !important;
    }

    .game-count span {
        color: #777181 !important;
    }

    /* ---------- PROVIDER BUTTONS ---------- */

    .provider-list,
    .providers,
    .provider-tabs {
        scrollbar-width: none !important;
    }

    .provider-list::-webkit-scrollbar,
    .providers::-webkit-scrollbar,
    .provider-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .provider-list a,
    .provider-list button,
    .provider-tab,
    .provider-item {
        background: #fff !important;
        color: #211d2b !important;
        border: 1px solid #e5e0e9 !important;
        box-shadow: 0 4px 14px rgba(40,25,60,.04) !important;
    }

    .provider-list .active,
    .provider-list a.active,
    .provider-list button.active,
    .provider-tab.active,
    .provider-item.active {
        background:
            linear-gradient(
                135deg,
                rgba(232,63,159,.12),
                rgba(135,80,232,.10)
            ) !important;

        color: var(--nx-primary) !important;
        border-color: rgba(232,63,159,.25) !important;
    }

    /* ---------- SEARCH ---------- */

    input,
    select,
    textarea {
        background: #fff !important;
        color: #211d2b !important;
        border-color: #e5e0e9 !important;
    }

    input::placeholder,
    textarea::placeholder {
        color: #9a94a2 !important;
    }

    /* ---------- GAME CARDS ---------- */

    .game-card,
    .game-item,
    .home-game-card {
        background: #fff !important;
        color: #211d2b !important;
        border: 1px solid #e5e0e9 !important;
        box-shadow: 0 8px 24px rgba(40,25,60,.07) !important;
    }

    .game-card strong,
    .game-card h3,
    .game-card h4,
    .game-item strong,
    .game-item h3,
    .home-game-card strong,
    .home-game-card h3 {
        color: #211d2b !important;
    }

    .game-card p,
    .game-card small,
    .game-item p,
    .game-item small {
        color: #777181 !important;
    }

    .play-btn {
        background:
            linear-gradient(
                135deg,
                var(--nx-primary),
                var(--nx-secondary)
            ) !important;

        color: #fff !important;
        border: 0 !important;
        box-shadow: 0 8px 18px rgba(135,80,232,.20) !important;
    }

    /* ---------- BADGES ---------- */

    .popular,
    .badge-popular,
    .game-badge,
    .popular-badge {
        background: rgba(255,255,255,.94) !important;
        color: var(--nx-primary) !important;
        border: 1px solid rgba(232,63,159,.15) !important;
    }

    .live,
    .badge-live,
    .live-badge {
        background:
            linear-gradient(
                135deg,
                var(--nx-primary),
                var(--nx-secondary)
            ) !important;

        color: #fff !important;
    }

    /* ---------- HOME HERO ---------- */

    .hero,
    .hero-section,
    .home-hero {
        background: #fff !important;
        color: #211d2b !important;
        border: 1px solid #e5e0e9 !important;
        box-shadow: 0 10px 30px rgba(40,25,60,.06) !important;
    }

    .hero h1,
    .hero h2,
    .home-hero h1,
    .home-hero h2 {
        color: #211d2b !important;
    }

    .hero p,
    .home-hero p {
        color: #777181 !important;
    }

    /* ---------- HERO BUTTONS ---------- */

    .hero a,
    .hero button,
    .home-hero a,
    .home-hero button {
        border-radius: 12px !important;
    }

    /* ---------- FLOATING ACCOUNT ---------- */

    .floating-chat,
    .floating-account,
    .floating-profile {
        background:
            linear-gradient(
                135deg,
                var(--nx-primary),
                var(--nx-secondary)
            ) !important;

        color: #fff !important;

        border: 0 !important;

        box-shadow:
            0 10px 25px rgba(135,80,232,.25) !important;
    }

    /* ---------- BOTTOM NAV ---------- */

    .bottomnav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        z-index: 2500 !important;

        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;

        min-height: 68px !important;

        padding:
            6px 4px
            env(safe-area-inset-bottom)
            !important;

        background: rgba(255,255,255,.98) !important;

        border-top:
            1px solid #e5e0e9 !important;

        box-shadow:
            0 -8px 25px rgba(40,25,60,.08) !important;

        backdrop-filter: blur(18px) !important;
    }

    .bottomnav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 4px !important;

        min-width: 0 !important;

        background: transparent !important;
        color: #777181 !important;

        border: 0 !important;

        text-decoration: none !important;
    }

    .bottomnav a.active,
    .bottomnav a[aria-current="page"] {
        color: var(--nx-primary) !important;
    }

    .bottomnav .nav-icon {
        width: 23px !important;
        height: 23px !important;

        display: grid !important;
        place-items: center !important;
    }

    .bottomnav svg {
        width: 22px !important;
        height: 22px !important;
        stroke: currentColor !important;
        color: currentColor !important;
    }

    .bottomnav span:last-child {
        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }

    /* ---------- MOBILE DRAWER ---------- */

    .mobile-drawer {
        background: #fff !important;
        color: #211d2b !important;
    }

    .mobile-drawer-nav a {
        color: #211d2b !important;
    }

    .mobile-drawer-nav a:hover,
    .mobile-drawer-nav a:focus {
        background: #f6f2f8 !important;
        color: var(--nx-primary) !important;
    }

}

/* =========================================================
   END MOBILE POLISH
   ========================================================= */

/* =========================================================
   NEXUS PLAY — FINAL GLOBAL UI V2
   Presentation layer ONLY.
   Backend / API / session / database untouched.
   ========================================================= */

:root {
    --nx-bg: #f8f6fb;
    --nx-surface: #ffffff;
    --nx-surface-2: #f3f0f7;
    --nx-text: #211d2b;
    --nx-muted: #777181;
    --nx-border: #e5e0e9;
    --nx-primary: #e83f9f;
    --nx-secondary: #8750e8;
}

/* ---------- GLOBAL ---------- */

html,
body {
    background: var(--nx-bg) !important;
    color: var(--nx-text) !important;
}

body {
    overflow-x: hidden !important;
}

main {
    color: var(--nx-text) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--nx-text) !important;
}

p,
small,
.muted,
.text-muted {
    color: var(--nx-muted) !important;
}

/* ---------- HEADER ---------- */

.topbar {
    background: rgba(255,255,255,.98) !important;
    color: var(--nx-text) !important;
    border-bottom: 1px solid var(--nx-border) !important;
    box-shadow: 0 4px 20px rgba(40,25,60,.06) !important;
}

.topbar .brand,
.topbar .brand-text,
.topbar .brand-text strong {
    color: var(--nx-text) !important;
}

.topbar .brand-text small {
    color: var(--nx-muted) !important;
}

.topbar .brand-mark {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;
}

/* ---------- DESKTOP NAV ---------- */

.topbar .navlinks a {
    background: transparent !important;
    color: var(--nx-muted) !important;
}

.topbar .navlinks a:hover {
    background: var(--nx-surface-2) !important;
    color: var(--nx-primary) !important;
}

/* ---------- WALLET ---------- */

.topbar .wallet {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}

.topbar .wallet-icon {
    color: var(--nx-primary) !important;
}

/* ---------- LOGIN / REGISTER ---------- */

.header-auth-actions .header-login {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}

.header-auth-actions .header-register {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;
    color: #fff !important;
}

/* ---------- MOBILE MENU ---------- */

.topbar .mobile-menu {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}

/* ---------- DRAWER ---------- */

.mobile-drawer {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
}

.mobile-drawer-head {
    background: var(--nx-surface) !important;
    border-bottom: 1px solid var(--nx-border) !important;
}

.mobile-drawer-brand strong {
    color: var(--nx-text) !important;
}

.mobile-drawer-brand small {
    color: var(--nx-muted) !important;
}

.mobile-drawer-nav a {
    background: transparent !important;
    color: var(--nx-text) !important;
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav a:focus {
    background: var(--nx-surface-2) !important;
    color: var(--nx-primary) !important;
}

/* ---------- FORMS ---------- */

input,
select,
textarea,
.search-input,
.game-search {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--nx-muted) !important;
}

/* ---------- CARDS ---------- */

.card,
.panel,
.game-card,
.game-item,
.category-card,
.home-game-card,
.featured,
.section-card {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
    box-shadow: 0 8px 26px rgba(40,25,60,.06) !important;
}

.card h1,
.card h2,
.card h3,
.card h4,
.game-card h3,
.game-card h4,
.game-card strong,
.game-item h3,
.game-item strong,
.category-card h3,
.category-card strong {
    color: var(--nx-text) !important;
}

.card p,
.card small,
.game-card p,
.game-card small,
.game-item p,
.game-item small,
.category-card span {
    color: var(--nx-muted) !important;
}

/* ---------- BUTTONS ---------- */

button,
.btn,
.btn-primary,
.primary-btn,
.play-btn {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;
    color: #fff !important;
    border-color: transparent !important;
}

button:hover,
.btn:hover,
.btn-primary:hover,
.primary-btn:hover,
.play-btn:hover {
    filter: brightness(1.04);
}

/* ---------- SECONDARY BUTTON ---------- */

.btn-secondary,
.secondary,
.secondary-btn {
    background: var(--nx-surface) !important;
    color: var(--nx-primary) !important;
    border: 1px solid var(--nx-border) !important;
}

/* ---------- PROVIDERS ---------- */

.provider,
.provider-card,
.provider-tab,
.provider-item {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

.provider.active,
.provider-card.active,
.provider-tab.active,
.provider-item.active {
    background:
        linear-gradient(
            135deg,
            rgba(232,63,159,.10),
            rgba(135,80,232,.10)
        ) !important;
    color: var(--nx-primary) !important;
    border-color: rgba(232,63,159,.30) !important;
}

/* ---------- BOTTOM NAV ---------- */

.bottomnav {
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid var(--nx-border) !important;
    box-shadow: 0 -8px 25px rgba(40,25,60,.08) !important;
}

.bottomnav a {
    background: transparent !important;
    color: var(--nx-muted) !important;
}

.bottomnav a.active,
.bottomnav a[aria-current="page"] {
    color: var(--nx-primary) !important;
}

.bottomnav .nav-icon,
.bottomnav svg {
    color: currentColor !important;
}

/* ---------- PROMOTIONS ---------- */

.global-promo,
.global-promo-card {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

.global-promo h2,
.global-promo h3 {
    color: var(--nx-text) !important;
}

.global-promo-category,
.section-eyebrow {
    color: var(--nx-primary) !important;
}

.global-promo-button {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;
    color: #fff !important;
}

/* ---------- LOGIN MODAL ---------- */

.login-modal-dialog,
.login-modal-content {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

.login-modal-header h2,
.login-modal-header p,
.login-modal-form label {
    color: var(--nx-text) !important;
}

.login-modal-form input {
    background: var(--nx-surface) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

.login-modal-register a,
.login-modal-password-toggle {
    color: var(--nx-primary) !important;
}

.login-modal-submit {
    background:
        linear-gradient(
            135deg,
            var(--nx-primary),
            var(--nx-secondary)
        ) !important;
    color: #fff !important;
}

/* ---------- MOBILE ---------- */

@media (max-width: 820px) {

    body {
        padding-bottom: 76px !important;
    }

    main {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .topbar .container.nav,
    .topbar .nav {
        width: calc(100% - 20px) !important;
        min-height: 64px !important;
        gap: 10px !important;
    }

    .topbar .navlinks,
    .topbar .wallet,
    .header-auth-actions {
        display: none !important;
    }

    .topbar .mobile-menu {
        display: grid !important;
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .topbar .brand {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .topbar .brand-mark {
        width: 40px !important;
        height: 40px !important;
    }

    .topbar .brand-text strong {
        font-size: 14px !important;
    }

    .topbar .brand-text small {
        font-size: 8px !important;
    }

    .bottomnav {
        display: grid !important;
        grid-template-columns: repeat(5,1fr) !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 2500 !important;
        min-height: 68px !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    .bottomnav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
    }

    .bottomnav .nav-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .bottomnav svg {
        width: 22px !important;
        height: 22px !important;
    }

    .mobile-drawer {
        z-index: 3000 !important;
    }

    .mobile-menu-overlay {
        z-index: 2999 !important;
    }

}

/* =========================================================
   END FINAL GLOBAL UI V2
   ========================================================= */

/* =========================================================
   FINAL CONTRAST FIX
   ========================================================= */

/* CTA / promotional dark sections */
.cta,
.cta-section,
.games-cta,
.games-section-cta,
.game-cta,
.home-cta,
.featured-cta,
[class*="cta"] {
    color: #ffffff !important;
}

.cta h1,
.cta h2,
.cta h3,
.cta h4,
.cta p,
.cta-section h1,
.cta-section h2,
.cta-section h3,
.cta-section h4,
.cta-section p,
.games-cta h1,
.games-cta h2,
.games-cta h3,
.games-cta h4,
.games-cta p,
.game-cta h1,
.game-cta h2,
.game-cta h3,
.game-cta h4,
.game-cta p,
[class*="cta"] h1,
[class*="cta"] h2,
[class*="cta"] h3,
[class*="cta"] h4 {
    color: #ffffff !important;
}

.cta p,
.cta-section p,
.games-cta p,
.game-cta p,
[class*="cta"] p {
    color: rgba(255,255,255,.72) !important;
}

/* CTA eyebrow */
.cta .section-eyebrow,
.cta-section .section-eyebrow,
.games-cta .section-eyebrow,
.game-cta .section-eyebrow,
[class*="cta"] .section-eyebrow {
    color: var(--nx-primary) !important;
}

/* Dark informational panels */
.info-card,
.info-box,
.notice,
.alert,
.panel-dark {
    color: #ffffff !important;
}

.info-card h1,
.info-card h2,
.info-card h3,
.info-card p,
.info-box h1,
.info-box h2,
.info-box h3,
.info-box p,
.notice h1,
.notice h2,
.notice h3,
.notice p,
.panel-dark h1,
.panel-dark h2,
.panel-dark h3,
.panel-dark p {
    color: #ffffff !important;
}

.info-card p,
.info-box p,
.notice p,
.panel-dark p {
    color: rgba(255,255,255,.70) !important;
}

/* ---------- DARK SURFACES ---------- */

.bg-dark,
.dark,
.dark-card,
.surface-dark {
    color: #ffffff !important;
}

.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark-card h1,
.dark-card h2,
.dark-card h3,
.dark-card h4,
.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4 {
    color: #ffffff !important;
}

.bg-dark p,
.dark p,
.dark-card p,
.surface-dark p {
    color: rgba(255,255,255,.72) !important;
}

/* ---------- FORCE FORM TEXT ---------- */

input,
select,
textarea {
    color: #211d2b !important;
    -webkit-text-fill-color: #211d2b !important;
}

input::placeholder,
textarea::placeholder {
    color: #777181 !important;
    -webkit-text-fill-color: #777181 !important;
}

/* ---------- GAME CARD ---------- */

.game-card,
.game-item {
    color: #211d2b !important;
}

.game-card h3,
.game-card h4,
.game-card .title,
.game-item h3,
.game-item h4,
.game-item .title {
    color: #211d2b !important;
}

.game-card p,
.game-card small,
.game-item p,
.game-item small {
    color: #777181 !important;
}

/* ---------- MOBILE ---------- */

@media (max-width: 820px) {

    [class*="cta"] {
        color: #ffffff !important;
    }

    [class*="cta"] h1,
    [class*="cta"] h2,
    [class*="cta"] h3,
    [class*="cta"] h4 {
        color: #ffffff !important;
    }

    [class*="cta"] p {
        color: rgba(255,255,255,.72) !important;
    }

}

