/* ============================================================
   WINMIND · PREMIUM GAMING THEME (design system v2)
   ------------------------------------------------------------
   Layered on top of the legacy app.css: it redefines tokens,
   the shell (header / sidebar / content), buttons, cards,
   the visitor landing experience and the logged-in dashboard.
   It never changes ids / data-attributes / behavior — purely
   presentational. Logical properties keep RTL/LTR symmetric.
   ============================================================ */

/* ---- Vendored Persian-first typeface (Vazirmatn, OFL) ---- */

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");
}
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/static/fonts/Vazirmatn-Medium.woff2") format("woff2");
}
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/static/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
}
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");
}
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/static/fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
}

/* ---- Design tokens (override legacy :root) ---- */

:root {
    /* surfaces */
    --bg: #070b18;
    --bg-deep: #04070f;
    --bg-soft: #0b1226;
    --surface-1: rgba(16, 24, 47, 0.72);
    --surface-2: rgba(20, 29, 56, 0.86);
    --panel: var(--surface-1);
    --panel-strong: rgba(13, 20, 41, 0.92);
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.26);
    --glass: rgba(8, 13, 28, 0.66);

    /* ink */
    --text: #e8eefb;
    --muted: #97a7c8;
    --dim: #64748b;

    /* brand */
    --gold: #f6c453;
    --gold-strong: #d99a1f;
    --accent: #5b8cff;
    --accent-2: #22d3ee;
    --accent-soft: rgba(91, 140, 255, 0.16);
    --accent-line: rgba(91, 140, 255, 0.45);
    --green: #34d399;
    --green-ink: #052e1c;
    --red: #f87171;
    --amber: #fbbf24;
    --blue: #60a5fa;
    --blue-soft: rgba(96, 165, 250, 0.16);

    --grad-primary: linear-gradient(135deg, #4c7dff 0%, #6a5cff 55%, #22d3ee 130%);
    --grad-gold: linear-gradient(135deg, #ffd97a, #f6c453 45%, #d99a1f);
    --grad-sheen: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.14), transparent 80%);

    /* geometry & depth */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
    --shadow: 0 18px 48px rgba(2, 6, 23, 0.55);
    --shadow-soft: 0 10px 28px rgba(2, 6, 23, 0.4);
    --ring: 0 0 0 1px rgba(148, 163, 184, 0.1);
    --head-h: 66px;
    --side-w: 234px;
    --content-max: 1320px;

    /* type */
    --font-ui: "Vazirmatn", "Segoe UI", ui-sans-serif, system-ui, -apple-system, "Noto Sans", sans-serif;
    --font-num: ui-monospace, "JetBrains Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

/* ---- Global canvas & base ---- */

html {
    scrollbar-gutter: stable;
}

html,
body {
    max-width: 100vw;
    overflow-x: clip;
}

body {
    background:
        radial-gradient(46rem 30rem at 8% -6%, rgba(91, 140, 255, 0.16), transparent 62%),
        radial-gradient(40rem 26rem at 96% 4%, rgba(34, 211, 238, 0.1), transparent 58%),
        radial-gradient(52rem 34rem at 55% 118%, rgba(106, 92, 255, 0.14), transparent 62%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-ui);
    letter-spacing: 0;
    line-height: 1.65;
}

/* ultra-subtle gaming grid texture — never competes with content */
body::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    content: "";
    inset: 0;
    mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 78%);
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

::selection {
    background: rgba(91, 140, 255, 0.4);
}

* {
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
    scrollbar-width: thin;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.35;
    text-wrap: balance;
}

h1 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); }
h2 { font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem); }
h3 { font-size: 1.05rem; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

input, select, textarea {
    font-family: inherit;
}

/* number / code displays keep tabular latin digits */
.balance-amount, .balance-value, .draw-number, .crash-multiplier,
.mono, .stat-card strong, .room-stats span {
    font-variant-numeric: tabular-nums;
}

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

button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    min-height: 42px;
    padding: 10px 18px;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease,
        box-shadow 140ms ease, filter 140ms ease;
}

button:hover {
    background: rgba(34, 46, 84, 0.95);
    border-color: var(--accent-line);
    box-shadow: 0 10px 26px rgba(37, 78, 180, 0.28);
    transform: translateY(-1px);
}

button:active { transform: translateY(0) scale(0.99); }

button:disabled,
button:disabled:hover {
    background: rgba(30, 41, 59, 0.55);
    border-color: var(--border);
    box-shadow: none;
    opacity: 0.55;
    transform: none;
}

.btn {
    align-items: center;
    border-radius: var(--r-md);
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary,
.primary,
#confirmBuy {
    background: var(--grad-primary);
    border: 1px solid rgba(122, 162, 255, 0.55);
    box-shadow: 0 10px 26px rgba(64, 96, 220, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.btn-primary:hover,
.primary:hover,
#confirmBuy:hover {
    background: var(--grad-primary);
    border-color: rgba(150, 185, 255, 0.8);
    box-shadow: 0 14px 34px rgba(64, 96, 220, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    filter: brightness(1.07);
}

.btn-secondary {
    background: rgba(23, 33, 62, 0.85);
    border: 1px solid var(--border-strong);
    color: #dbe5f7;
    font-weight: 700;
}

.btn-secondary:hover {
    background: rgba(35, 48, 86, 0.9);
    border-color: var(--accent-line);
}

.btn-success-soft {
    background: rgba(52, 211, 153, 0.13);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}

.return-button {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.22);
    border-color: rgba(248, 113, 113, 0.7);
}

.btn-small {
    font-size: 0.82rem;
    min-height: 34px;
    padding: 6px 13px;
}

.btn-block { width: 100%; }

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: rgba(91, 140, 255, 0.1);
    border-color: var(--accent-line);
    color: var(--text);
}

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

.input,
.auth-form input,
.modal-card input,
.crash-bet-panel input,
.settings-search,
.setting-select {
    background: rgba(6, 10, 22, 0.72);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    color: var(--text);
    min-height: 44px;
    padding: 11px 14px;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    width: 100%;
}

.input:focus,
.auth-form input:focus,
.modal-card input:focus,
.crash-bet-panel input:focus,
.setting-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    outline: none;
}

.input::placeholder { color: #5b6b8c; }

/* ---- App bar / header ---- */

.header {
    align-items: center;
    backdrop-filter: blur(16px) saturate(1.2);
    background: rgba(5, 9, 20, 0.78);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(2, 6, 23, 0.35);
    display: flex;
    gap: 16px;
    height: var(--head-h);
    justify-content: space-between;
    padding: 0 clamp(14px, 3vw, 28px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-left {
    align-items: center;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.logo {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    user-select: none;
}

.logo:hover { filter: brightness(1.15); }

.logo-chip {
    align-items: center;
    background: var(--grad-primary);
    border: 1px solid rgba(160, 190, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(64, 96, 220, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    display: inline-flex;
    font-size: 1.05rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.logo-img {
    display: block;
    flex-shrink: 0;
    height: 52px;
    width: auto;
    max-width: 52px;
    object-fit: contain;
    border-radius: 10px;
}
@media (max-width: 720px) {
    .logo-img { height: 40px; max-width: 40px; }
}

.logo-word { color: var(--text); }
.logo-word em {
    color: var(--gold);
    font-style: normal;
}

.tagline {
    border-inline-start: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    padding-inline-start: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-center {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.header-right {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

/* balance chip in the header */
.balance-display {
    align-items: center;
    background: rgba(8, 13, 28, 0.8);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    display: flex;
    gap: 8px;
    padding: 5px 8px 5px 14px;
    padding-inline: 14px 8px;
}

.balance-label {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.balance-value {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 800;
}

.balance-coin {
    align-items: center;
    background: var(--grad-gold);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(246, 196, 83, 0.4);
    color: #1a1204;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

/* language control — two-state segmented pill, action side keeps #langToggle */
.lang-seg {
    align-items: center;
    background: rgba(6, 10, 22, 0.7);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    overflow: hidden;
    padding: 3px;
}

.lang-seg .lang-opt {
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    color: var(--muted);
    cursor: default;
    font-size: 0.76rem;
    font-weight: 700;
    min-height: 28px;
    padding: 2px 11px;
    transform: none;
}

.lang-seg .lang-opt.on {
    background: rgba(91, 140, 255, 0.22);
    border-color: transparent;
    color: #cfe0ff;
}

.lang-seg button.lang-opt {
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.lang-seg button.lang-opt:hover {
    background: rgba(91, 140, 255, 0.32);
    color: #eaf1ff;
    transform: none;
}

.lang-button {
    background: rgba(6, 10, 22, 0.7);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: #cfe0ff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    min-height: 34px;
    padding: 4px 13px;
}

/* profile chip */
.profile-dropdown { position: relative; }

.profile-button {
    align-items: center;
    background: rgba(8, 13, 28, 0.8);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 8px;
    max-width: 210px;
    padding: 5px 13px 5px 6px;
    padding-inline: 6px 13px;
}

.profile-button:hover { border-color: var(--accent-line); }

.profile-button span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar {
    align-items: center;
    background: var(--grad-primary);
    border: 1px solid rgba(160, 190, 255, 0.4);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    width: 26px;
    margin-inline-end: 0;
}

.avatar-lg {
    font-size: 1.5rem;
    height: 58px;
    width: 58px;
}

/* mobile nav toggle (hidden on desktop) */
.nav-toggle {
    align-items: center;
    background: rgba(8, 13, 28, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    width: 44px;
}

.nav-toggle span {
    background: #cfe0ff;
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: transform 160ms ease, opacity 160ms ease;
    width: 18px;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Layout & sidebar ---- */

.layout {
    align-items: stretch;
    display: flex;
    height: calc(100vh - var(--head-h));
    height: calc(100dvh - var(--head-h));
}

.sidebar {
    background: rgba(5, 9, 20, 0.62);
    border: 0;
    border-inline-end: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 14px 10px 18px;
    overflow-y: auto;
    width: var(--side-w);
}

html[dir="rtl"] .sidebar { border-inline-end: 1px solid var(--border); border-left: 0; }
html[dir="ltr"] .sidebar { border-inline-end: 1px solid var(--border); border-right: 0; }

.nav-group + .nav-group {
    border-top: 1px solid var(--border);
    margin-top: 12px;
    padding-top: 12px;
}

.nav-group-title {
    color: var(--dim);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 6px 12px 8px;
    text-transform: uppercase;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item.nav-child {
    padding-inline-start: 1.65rem;
    font-size: 0.92em;
    opacity: 0.92;
}

.nav-item {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    color: #b9c6e2;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: 12px;
    min-height: 44px;
    outline-offset: -2px;
    padding: 8px 12px;
    position: relative;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.nav-item:hover {
    background: rgba(91, 140, 255, 0.1);
    border-color: rgba(91, 140, 255, 0.18);
    color: var(--text);
    transform: none;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(91, 140, 255, 0.22), rgba(34, 211, 238, 0.08));
    border: 1px solid rgba(91, 140, 255, 0.35);
    border-left: 1px solid rgba(91, 140, 255, 0.35);
    box-shadow: 0 6px 18px rgba(45, 82, 190, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

html[dir="ltr"] .nav-item.active { border-right: 1px solid rgba(91, 140, 255, 0.35); }
html[dir="rtl"] .nav-item.active {
    border-left: 1px solid rgba(91, 140, 255, 0.35);
    border-right: 1px solid rgba(91, 140, 255, 0.35);
}

/* neutralize legacy physical rules so RTL keeps the natural sidebar edge */
html[dir="rtl"] .layout { flex-direction: row; }
html[dir="rtl"] .sidebar { border-right: 0; }
html[dir="rtl"] .nav-item { border-right-width: 1px; }

/* glowing selection rail on the inline-start edge */
.nav-item.active::before {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(91, 140, 255, 0.8);
    content: "";
    inset-block: 8px;
    inset-inline-start: -1px;
    position: absolute;
    width: 3px;
}

.nav-icon {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.06rem;
    justify-content: center;
    width: 26px;
    filter: saturate(1.1);
}

.nav-label {
    flex: 1;
    font-size: 0.9rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: clamp(14px, 2.4vw, 26px) clamp(14px, 3vw, 34px) 48px;
    scroll-behavior: smooth;
}

/* one professional content measure; kills the giant empty margins */
.content > * {
    margin-inline: auto;
    max-width: var(--content-max);
}

.view-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.view-header h1 { margin: 0; }
.view-header > div > p { margin: 4px 0 0; color: var(--muted); }
.view-header .eyebrow {
    color: var(--accent-2);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.eyebrow { letter-spacing: 0.18em; }

/* guest game pages: no sidebar; the page itself scrolls */
.layout-guest {
    display: block;
    height: auto;
}

.layout-guest .content {
    overflow: visible;
    padding-top: 18px;
}

/* drawer overlay */
.nav-overlay {
    background: rgba(2, 5, 14, 0.62);
    backdrop-filter: blur(2px);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 35;
}

body.nav-open .nav-overlay { display: block; }

/* ---- Game cards ---- */

.games-section { margin-top: 6px; }

.section-title {
    align-items: center;
    color: #cdd9f2;
    display: flex;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 10px;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.section-title::after {
    background: linear-gradient(90deg, var(--border-strong), transparent);
    content: "";
    flex: 1;
    height: 1px;
}

.games-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.game-card {
    background:
        radial-gradient(28rem 16rem at 85% -30%, var(--accent-halo, rgba(91, 140, 255, 0.16)), transparent 60%),
        linear-gradient(160deg, rgba(24, 34, 64, 0.88), rgba(10, 16, 34, 0.94));
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-soft), var(--ring);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
    overflow: hidden;
    padding: 20px 20px 18px;
    position: relative;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card::before {
    background: linear-gradient(90deg, transparent, var(--accent-line, rgba(91, 140, 255, 0.5)), transparent);
    content: "";
    height: 2px;
    inset-inline: 18%;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 180ms ease;
}

.game-card:hover {
    border-color: rgba(91, 140, 255, 0.42);
    box-shadow: 0 24px 54px rgba(3, 8, 24, 0.6), var(--ring);
    transform: translateY(-4px);
}

.game-card:hover::before { opacity: 1; }

.game-card .game-icon {
    align-items: center;
    background: linear-gradient(150deg, rgba(46, 64, 122, 0.9), rgba(13, 20, 42, 0.9));
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(2, 6, 23, 0.45);
    display: flex;
    font-size: 1.7rem;
    height: 54px;
    justify-content: center;
    width: 54px;
}

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

.game-card .game-info h3 {
    font-size: 1.22rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.game-card .game-info p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.game-tags { gap: 8px; margin-top: 12px; }

.game-badge,
.game-volatility {
    background: rgba(91, 140, 255, 0.14);
    border: 1px solid rgba(91, 140, 255, 0.3);
    border-radius: 999px;
    color: #b9d1ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 11px;
}

.game-volatility {
    background: rgba(148, 163, 184, 0.09);
    border-color: var(--border-strong);
    color: var(--muted);
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-actions .btn { flex: 1 1 130px; }

.game-card.accent-emerald {
    --accent-halo: rgba(52, 211, 153, 0.15);
    --accent-line: rgba(52, 211, 153, 0.55);
}
.game-card.accent-emerald:hover { border-color: rgba(52, 211, 153, 0.45); }
.game-card.accent-emerald .game-badge {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

.game-card.accent-violet {
    --accent-halo: rgba(167, 139, 250, 0.16);
    --accent-line: rgba(167, 139, 250, 0.55);
}
.game-card.accent-violet:hover { border-color: rgba(167, 139, 250, 0.45); }
.game-card.accent-violet .game-badge {
    background: rgba(167, 139, 250, 0.13);
    border-color: rgba(167, 139, 250, 0.35);
    color: #ddd6fe;
}

.game-card.accent-green {
    --accent-halo: rgba(74, 222, 128, 0.14);
    --accent-line: rgba(74, 222, 128, 0.5);
}
.game-card.accent-green:hover { border-color: rgba(74, 222, 128, 0.4); }
.game-card.accent-green .game-badge {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}

/* ============================================================
   VISITOR LANDING (logged out) — marketing-grade first page
   ============================================================ */

.landing {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--head-h));
    min-height: calc(100dvh - var(--head-h));
    overflow: hidden;
}

.landing-inner {
    margin-inline: auto;
    max-width: var(--content-max);
    padding-inline: clamp(16px, 4vw, 44px);
    width: 100%;
}

/* guest header nav (horizontal pills) */
.guest-nav {
    align-items: center;
    display: flex;
    gap: 4px;
    margin-inline-start: 10px;
}

.guest-nav a,
.guest-nav button.gnav {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #a9bad9;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 700;
    gap: 7px;
    min-height: 36px;
    padding: 4px 14px;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease;
}

.guest-nav a:hover,
.guest-nav button.gnav:hover {
    background: rgba(91, 140, 255, 0.14);
    color: var(--text);
    transform: none;
}

.guest-nav a.on,
.guest-nav button.gnav.on {
    background: rgba(91, 140, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.4);
    color: #ffffff;
}

/* hero */
.landing-hero {
    align-items: center;
    display: grid;
    gap: clamp(20px, 5vw, 56px);
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    padding-block: clamp(34px, 6vw, 84px) clamp(26px, 4vw, 54px);
    position: relative;
}

.landing-hero::before {
    background: radial-gradient(30rem 20rem at 74% 30%, rgba(91, 140, 255, 0.16), transparent 65%),
                radial-gradient(24rem 16rem at 18% 82%, rgba(34, 211, 238, 0.1), transparent 60%);
    content: "";
    inset: -12% -8%;
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.hero-copy { min-width: 0; }

.hero-eyebrow {
    align-items: center;
    animation: panelIn 600ms ease both;
    color: #9fc0ff;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 8px;
    letter-spacing: 0.02em;
    margin: 0 0 16px;
    padding: 6px 14px;
    user-select: none;
}

.hero-eyebrow .dot {
    animation: onlinePulse 1.8s ease-in-out infinite;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
    display: inline-block;
    height: 8px;
    width: 8px;
}

.hero-title {
    font-size: clamp(2rem, 1.2rem + 4.4vw, 3.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.16;
    margin: 0 0 10px;
    text-wrap: balance;
}

.hero-title .brand {
    background: linear-gradient(120deg, #dbeafe 10%, #93c5fd 45%, #22d3ee 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-tagline {
    color: var(--gold);
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
    font-weight: 700;
    margin: 0 0 14px;
}

.hero-desc {
    color: var(--muted);
    font-size: clamp(0.92rem, 0.86rem + 0.3vw, 1.06rem);
    line-height: 1.9;
    margin: 0 0 26px;
    max-width: 54ch;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-ctas .btn {
    font-size: 1rem;
    min-height: 48px;
    padding: 12px 26px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 26px 34px;
    margin-top: 30px;
}

.hero-stat { min-width: 90px; }

.hero-stat b {
    color: var(--text);
    display: block;
    font-size: 1.16rem;
    font-weight: 800;
}

.hero-stat span {
    color: var(--dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* hero visual — floating game motifs, pure CSS */
.hero-visual {
    animation: heroFloat 9s ease-in-out infinite;
    aspect-ratio: 1.04;
    direction: ltr;
    max-width: 460px;
    position: relative;
    width: 100%;
    justify-self: center;
}

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

.hv-orb {
    border-radius: 50%;
    filter: blur(1.5px);
    inset: 8%;
    position: absolute;
}

.hv-orb.o1 {
    background: radial-gradient(circle at 32% 28%, rgba(91, 140, 255, 0.5), rgba(91, 140, 255, 0.05) 58%, transparent 70%);
    border: 1px solid rgba(91, 140, 255, 0.25);
}

.hv-orb.o2 {
    background: radial-gradient(circle at 70% 74%, rgba(34, 211, 238, 0.3), transparent 62%);
    inset: 20%;
}

.hv-ring {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 50%;
    inset: 0;
    position: absolute;
}

.hv-card {
    align-items: center;
    animation: panelIn 700ms ease both;
    background: linear-gradient(155deg, rgba(30, 42, 82, 0.96), rgba(9, 14, 30, 0.96));
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    font-weight: 800;
    gap: 6px;
    justify-content: center;
    padding: 12px;
    position: absolute;
    text-align: center;
}

.hv-card .hv-icon { font-size: 1.5rem; }
.hv-card .hv-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; }
.hv-card .hv-value { color: var(--text); font-size: 1.02rem; }
.hv-card .hv-value.gold { color: var(--gold); }
.hv-card .hv-value.green { color: var(--green); }

.hv-bingo {
    animation-delay: 80ms;
    inset-block-start: 6%;
    inset-inline-end: 4%;
    width: 128px;
}

.hv-crash {
    animation-delay: 200ms;
    inset-block-end: 16%;
    inset-inline-start: 0%;
    width: 138px;
}

.hv-poker {
    animation-delay: 320ms;
    inset-block-end: 2%;
    inset-inline-end: 12%;
    width: 122px;
}

.hv-ball {
    align-items: center;
    animation-delay: 140ms;
    aspect-ratio: 1;
    background: var(--grad-gold);
    border-radius: 50%;
    box-shadow: 0 14px 30px rgba(217, 154, 31, 0.4), inset 0 3px 8px rgba(255, 255, 255, 0.55), inset 0 -6px 10px rgba(122, 79, 8, 0.45);
    color: #241802;
    display: flex;
    font-size: 1.5rem;
    font-weight: 900;
    inset-block-start: 34%;
    inset-inline-start: 26%;
    justify-content: center;
    width: 74px;
}

/* sections */
.landing-section {
    padding-block: clamp(26px, 4vw, 52px);
}

.landing-kicker {
    color: #9fc0ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.landing-h2 {
    font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
    margin: 0 0 8px;
}

.landing-sub {
    color: var(--muted);
    margin: 0 0 22px;
    max-width: 62ch;
}

/* features / why */
.features-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.feature-card {
    background: rgba(13, 20, 41, 0.66);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.feature-card:hover {
    border-color: var(--accent-line);
    transform: translateY(-3px);
}

.feature-card .f-icon {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid rgba(91, 140, 255, 0.3);
    border-radius: 12px;
    display: inline-flex;
    font-size: 1.15rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.feature-card h3 { font-size: 1rem; margin: 4px 0 0; }
.feature-card p { color: var(--muted); font-size: 0.86rem; line-height: 1.75; margin: 0; }

/* trust strip */
.trustbar {
    border-block: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    justify-content: center;
    padding-block: 14px;
}

.trustbar span {
    align-items: center;
    color: var(--dim);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 7px;
    letter-spacing: 0.03em;
}

/* closing CTA band */
.cta-band {
    background:
        radial-gradient(26rem 14rem at 80% 20%, rgba(34, 211, 238, 0.14), transparent 60%),
        radial-gradient(30rem 16rem at 15% 90%, rgba(106, 92, 255, 0.18), transparent 60%),
        linear-gradient(150deg, rgba(23, 33, 66, 0.92), rgba(8, 12, 26, 0.95));
    border: 1px solid rgba(91, 140, 255, 0.3);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-block: 14px 34px;
    padding: clamp(20px, 3.6vw, 34px);
    position: relative;
    overflow: hidden;
}

.cta-band h2 { margin: 0 0 6px; }
.cta-band p { color: var(--muted); margin: 0; }
.cta-band .btn { min-height: 46px; padding: 10px 24px; }

.landing-footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 18px 0 26px;
}

.landing-footer .landing-inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    justify-content: space-between;
}

.landing-footer .f-brand {
    align-items: center;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
}

.landing-footer small { color: var(--dim); font-size: 0.78rem; }

.landing-footer a {
    color: var(--muted);
    font-size: 0.84rem;
    text-decoration: none;
}

.landing-footer a:hover { color: var(--text); }

/* ============================================================
   LOGGED-IN DASHBOARD HOME
   ============================================================ */

.dash-hero {
    background:
        radial-gradient(30rem 16rem at 88% -40%, rgba(91, 140, 255, 0.2), transparent 60%),
        radial-gradient(22rem 14rem at 4% 130%, rgba(246, 196, 83, 0.09), transparent 55%),
        linear-gradient(150deg, rgba(24, 35, 68, 0.9), rgba(10, 16, 34, 0.94));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
    margin-bottom: 26px;
    overflow: hidden;
    padding: clamp(20px, 3vw, 30px);
    position: relative;
}

.dash-welcome { min-width: 0; }

.dash-welcome .dash-eyebrow {
    color: #9fc0ff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.dash-welcome h1 {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
    margin: 0 0 8px;
}

.dash-welcome p {
    color: var(--muted);
    margin: 0;
    max-width: 52ch;
}

.dash-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.dash-quick .btn { min-height: 40px; }

/* the balance panel — prominent but not shouting */
.dash-balance {
    background: rgba(6, 10, 22, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.dash-balance::after {
    background: conic-gradient(from 220deg at 85% 15%, rgba(246, 196, 83, 0.16), transparent 40%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.dash-balance > * { position: relative; z-index: 1; }

.dash-balance .b-label {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    gap: 7px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dash-balance .b-amount {
    color: var(--gold);
    font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 6px 0 2px;
}

.dash-balance .b-note { color: var(--dim); font-size: 0.76rem; }

.dash-balance .b-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.dash-section { margin-bottom: 26px; }

/* ============================================================
   AUTH PAGES — same brand system
   ============================================================ */

.auth-view {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 26px 18px;
    position: relative;
}

.auth-view::before {
    background:
        radial-gradient(30rem 20rem at 20% 10%, rgba(91, 140, 255, 0.16), transparent 60%),
        radial-gradient(26rem 18rem at 84% 88%, rgba(34, 211, 238, 0.12), transparent 60%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.auth-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    width: 100%;
    max-width: 470px;
}

.auth-card {
    background: linear-gradient(165deg, rgba(22, 31, 58, 0.92), rgba(8, 12, 26, 0.95));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    max-width: none;
    padding: clamp(24px, 4.6vw, 38px);
    width: 100%;
}

.auth-logo {
    align-items: center;
    background: var(--grad-primary);
    border: 1px solid rgba(160, 190, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(64, 96, 220, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    display: inline-flex;
    font-size: 1.7rem;
    height: 62px;
    justify-content: center;
    margin-inline: auto;
    width: 62px;
}

.auth-card h1 { font-size: 1.7rem; margin: 14px 0 4px; }

.auth-tagline {
    color: var(--gold);
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0;
}

.auth-tabs {
    background: rgba(4, 8, 18, 0.65);
    border: 1px solid var(--border);
    border-radius: 999px;
    gap: 4px;
    margin: 20px 0 18px;
    padding: 4px;
}

.auth-tab {
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    color: var(--muted);
    font-weight: 700;
    min-height: 38px;
    padding: 6px 10px;
}

.auth-tab:hover {
    background: rgba(91, 140, 255, 0.12);
    border: 0;
    box-shadow: none;
    color: var(--text);
    transform: none;
}

.auth-tab.active {
    background: var(--grad-primary);
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.auth-form { gap: 14px; }

.auth-form label {
    color: #b6c4e2;
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-footnote {
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    gap: 6px;
    line-height: 1.7;
    margin-top: 22px;
    padding-top: 14px;
}

.auth-footnote span { color: var(--dim); }

.auth-langbar { margin: 0 0 2px; justify-content: flex-end; max-width: none; }

.auth-brandline {
    align-items: center;
    color: var(--dim);
    display: flex;
    font-size: 0.8rem;
    gap: 8px;
    justify-content: center;
}

/* ============================================================
   WALLET
   ============================================================ */

.wallet-balance-card {
    background:
        radial-gradient(22rem 12rem at 86% -30%, rgba(246, 196, 83, 0.18), transparent 60%),
        linear-gradient(150deg, rgba(24, 35, 68, 0.9), rgba(9, 14, 30, 0.94));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: clamp(18px, 3vw, 26px) clamp(20px, 3vw, 30px);
    position: relative;
    overflow: hidden;
}

.balance-info { display: flex; flex-direction: column; gap: 4px; }

.balance-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.balance-amount {
    color: var(--gold);
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.balance-approx { margin-top: 4px; }

.wallet-address {
    background: rgba(4, 8, 18, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 6px 0;
    padding: 10px 12px;
}

.wallet-view .panel,
.wallet-view .transactions-section {
    background: rgba(13, 20, 41, 0.66);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-soft), var(--ring);
    margin-bottom: 18px;
    overflow: auto;
    padding: 20px clamp(16px, 2.6vw, 24px);
}

.wallet-view .transactions-section h2,
.wallet-view .panel h2 {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 0 0 14px;
}

.wallet-view .panel h2 { font-size: 1.05rem; }

.transactions-table-content th {
    background: rgba(6, 10, 22, 0.5);
    text-align: start;
}

.transactions-table-content td { text-align: start; }

html[dir="rtl"] .transactions-table-content th,
html[dir="rtl"] .transactions-table-content td { text-align: right; }
html[dir="ltr"] .transactions-table-content th,
html[dir="ltr"] .transactions-table-content td { text-align: left; }

/* ============================================================
   GUEST NOTICE (kept: tests key on .guest-notice)
   ============================================================ */

.guest-notice {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(91, 140, 255, 0.16), rgba(34, 211, 238, 0.06)),
        rgba(13, 20, 41, 0.6);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-lg);
    color: #cfe0ff;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.88rem;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
}

.guest-notice > span { flex: 1 1 auto; }

/* ============================================================
   SURFACES, TABLES, BADGES (panel-era polish)
   ============================================================ */

.panel,
.poker-section,
.poker-buyin-panel, .poker-seat-panel, .poker-invite-panel,
.poker-actions, .poker-history,
.crash-card {
    background: rgba(13, 20, 41, 0.66);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-soft), var(--ring);
}

.stat-card, .module-card, .help-guide-card, .role-card {
    background: rgba(13, 20, 41, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: border-color 160ms ease, transform 160ms ease;
}

.stat-card:hover, .module-card:hover, .help-guide-card:hover {
    border-color: var(--accent-line);
    transform: translateY(-2px);
}

.stat-card strong {
    color: var(--text);
    font-size: 1.5rem;
}

.stat-card .stat-icon {
    background: var(--accent-soft);
    border: 1px solid rgba(91, 140, 255, 0.25);
    border-radius: 10px;
    font-size: 1rem;
    height: 34px;
    line-height: 34px;
    text-align: center;
    width: 34px;
}

.data-table th {
    background: rgba(6, 10, 22, 0.45);
    color: #94a8cf;
}

.data-table th:first-child { border-start-start-radius: var(--r-md); border-start-end-radius: var(--r-md); }

.data-table td { border-top: 1px solid var(--border); }

.data-table tbody tr { transition: background 120ms ease; }
.data-table tbody tr:hover { background: rgba(91, 140, 255, 0.05); }

.chip {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    min-height: 32px;
    padding: 4px 13px;
}

.chip:hover { border-color: var(--accent-line); color: var(--text); }

.chip.active {
    background: rgba(91, 140, 255, 0.22);
    border-color: rgba(91, 140, 255, 0.55);
    box-shadow: none;
    color: #ffffff;
    font-weight: 700;
}

.role-badge {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 4px 11px;
}

.status-badge {
    backdrop-filter: none;
    font-weight: 800;
    padding: 5px 12px;
}

.ws-status { letter-spacing: 0.06em; }

/* modals */
.modal { background: rgba(3, 6, 15, 0.72); z-index: 40; }

.modal-card {
    animation: modalIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
    background: linear-gradient(165deg, rgba(24, 33, 61, 0.97), rgba(9, 14, 29, 0.98));
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6), var(--ring);
}

@keyframes modalIn {
    0% { opacity: 0; transform: translateY(14px) scale(0.98); }
    100% { opacity: 1; transform: none; }
}

/* toasts */
#toast-root {
    inset-inline-end: 20px;
    right: auto;
    left: auto;
}

.toast {
    background: rgba(13, 20, 41, 0.96);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.6);
}

/* help center */
.help-view .help-content .help-section {
    background: rgba(13, 20, 41, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    margin-bottom: 16px;
    padding: 22px clamp(18px, 3vw, 28px);
}

.help-view .help-section h2 { margin: 0 0 10px; }
.help-view .help-section p, .help-view .help-section li { color: #b9c6e2; }
.help-view .help-section ul { padding-inline-start: 22px; }

.help-guide-card {
    cursor: default;
    display: flex;
    gap: 12px;
    padding: 16px;
}

/* ============================================================
   GAME SURFACES — light refinements, structure untouched
   ============================================================ */

.bingo-view .rooms-list { gap: 14px; padding-bottom: 22px; }

.room-card {
    background:
        radial-gradient(24rem 12rem at 90% -40%, rgba(91, 140, 255, 0.12), transparent 60%),
        linear-gradient(150deg, rgba(24, 34, 64, 0.85), rgba(10, 16, 34, 0.92));
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.room-card:hover {
    border-color: rgba(91, 140, 255, 0.35);
    box-shadow: 0 18px 44px rgba(3, 8, 24, 0.55);
    transform: translateY(-2px);
}

.room-card::before {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: 3px;
}

html[dir="rtl"] .room-card::before {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    inset: 0 auto 0 0;
}

.toolbar {
    background: rgba(10, 16, 34, 0.78);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
}

.session-countdown {
    background:
        radial-gradient(circle at 20% 30%, rgba(246, 196, 83, 0.16), transparent 18rem),
        rgba(8, 13, 28, 0.6);
    border: 1px solid rgba(246, 196, 83, 0.32);
    border-radius: var(--r-xl);
}

.crash-view { gap: 18px; }

.crash-hero-panel,
.crash-card {
    border-radius: var(--r-xl);
    border-color: var(--border);
}

.crash-multiplier {
    font-family: var(--font-num);
    letter-spacing: -0.02em;
}

.crash-stage {
    background: radial-gradient(30rem 18rem at 50% 120%, rgba(34, 197, 94, 0.08), transparent 60%),
                rgba(4, 8, 18, 0.55);
    border-radius: var(--r-xl);
}

.poker-felt {
    border: 1px solid rgba(246, 196, 83, 0.2);
    border-radius: 28px;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(2, 6, 23, 0.55);
}

.poker-seat {
    background: rgba(8, 13, 28, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--r-md);
}

.poker-lobby-card {
    background: rgba(13, 20, 41, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: border-color 160ms ease, transform 160ms ease;
}

.poker-lobby-card:hover {
    border-color: rgba(91, 140, 255, 0.4);
    transform: translateY(-2px);
}

/* number font in game chrome */
.draw-number { font-family: var(--font-num); }
.room-id, .card-number { font-family: var(--font-num); }

/* mobile action bar sizing must stay (poker tests key on this) */
.poker-action-buttons .btn { flex: 1 1 130px; min-height: 48px; font-size: 0.94rem; }

/* guard view */
.guard-view .error-box {
    background: rgba(127, 29, 29, 0.4);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--r-lg);
    padding: 16px 22px;
}

/* loading / boot */
.boot-state {
    animation: bootPulse 1.4s ease-in-out infinite;
    color: #9fb4dd;
    font-weight: 700;
    letter-spacing: 0.08em;
}

@keyframes bootPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* mid width: icon rail */
@media (max-width: 1179px) and (min-width: 761px) {
    .sidebar { width: 76px; padding-inline: 8px; }
    .nav-label, .nav-group-title { display: none; }
    .nav-item { justify-content: center; padding-inline: 6px; }
    .tagline { display: none; }
}

@media (max-width: 1100px) {
    .dash-hero { grid-template-columns: 1fr; }
    .landing-hero { grid-template-columns: 1fr; }
    .hero-visual { max-width: 400px; }
}

@media (max-width: 980px) {
    .hero-ctas .btn { flex: 1 1 auto; }
}

/* mobile: drawer + touch sizing + compact header */
@media (max-width: 760px) {
    .header {
        gap: 8px;
        height: auto;
        min-height: var(--head-h);
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .tagline { display: none; }
    .nav-toggle { display: inline-flex; }
    .header-center { display: none; }

    /* guest nav becomes a swipeable strip under the header row */
    .header-guest { row-gap: 6px; }
    .header-guest .guest-nav {
        border-top: 1px solid var(--border);
        flex-wrap: nowrap;
        margin-inline-start: 0;
        order: 4;
        overflow-x: auto;
        padding-block-start: 6px;
        scrollbar-width: none;
        width: 100%;
    }
    .header-guest .guest-nav::-webkit-scrollbar { display: none; }
    .guest-nav .gnav { flex: 0 0 auto; white-space: nowrap; }

    .header-right { gap: 8px; }

    .balance-display { padding: 4px 6px 4px 10px; }

    .profile-button span:last-child { display: none; }
    .profile-button { padding-inline: 4px; }

    .layout { height: auto; min-height: calc(100dvh - 62px); }

    .sidebar {
        bottom: 0;
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.55);
        inset-block: 0;
        inset-inline-start: 0;
        padding-top: 16px;
        position: fixed;
        top: 0;
        transform: translateX(-104%);
        transition: transform 220ms cubic-bezier(0.2, 0.8, 0.3, 1);
        width: min(300px, 86vw);
        z-index: 40;
    }

    html[dir="rtl"] .sidebar { transform: translateX(104%); }
    html[dir="ltr"] .sidebar { transform: translateX(-104%); }

    body.nav-open .sidebar { transform: translateX(0) !important; }

    .content { padding: 14px 14px 34px; }

    .landing-hero { padding-block: 26px 18px; gap: 18px; }
    .hero-title { font-size: clamp(1.7rem, 1.1rem + 5.4vw, 2.6rem); }
    .hero-visual { aspect-ratio: 1.15; max-width: 340px; }
    .hv-bingo { width: 104px; }
    .hv-crash { width: 112px; }
    .hv-poker { width: 100px; }
    .hv-ball { width: 58px; font-size: 1.2rem; }

    .hero-ctas .btn { flex: 1 1 100%; }
    .hero-stats { gap: 14px 22px; }

    .game-card { min-height: 0; }
    .game-actions .btn { flex: 1 1 100%; }

    .cta-band { flex-direction: column; align-items: stretch; text-align: start; }
    .cta-band .btn { width: 100%; }

    .dash-hero { padding: 18px; }

    button { min-height: 44px; }
    .btn-small { min-height: 36px; }

    .auth-card { padding: 22px 18px; border-radius: var(--r-xl); }
}

/* tiny phones */
@media (max-width: 400px) {
    .header { padding-inline: 10px; }
    .logo-word { font-size: 1.02rem; }
    .hero-visual { max-width: 300px; }
}

/* wide desktop: keep things composed, no stretched emptiness */
@media (min-width: 1700px) {
    :root { --content-max: 1480px; }
    .landing-inner { max-width: 1480px; }
}

/* ---- motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- print-ish: hide decorative glow in low-ink contexts ---- */
@media (forced-colors: active) {
    .game-card, .feature-card, .panel { border: 1px solid CanvasText; }
}

.u360-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.u360-tab {
    background: transparent;
    border: 1px solid var(--border, #2a3550);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    padding: 6px 12px;
    font: inherit;
}
.u360-tab.active {
    background: var(--accent-soft, rgba(56, 189, 248, 0.12));
    border-color: var(--accent, #38bdf8);
    color: var(--text);
}
.u360-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.u360-kpi {
    background: var(--panel-2, rgba(255,255,255,0.03));
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.u360-actions, .u360-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.u360-table { overflow-x: auto; }
.u360-note { border-inline-start: 3px solid var(--accent, #38bdf8); padding-inline-start: 12px; margin: 12px 0; }
.sd-msg.from-note { border-inline-start: 3px dashed var(--muted, #889); opacity: 0.95; }
.sd-compose.sd-note { margin-top: 8px; }
