:root {
    color-scheme: dark;
    --bg: #0f1720;
    --surface: #17212b;
    --surface-2: #1d2a36;
    --surface-3: #223241;
    --ink: #f4f7fb;
    --muted: #a7b4c1;
    --line: rgba(255, 255, 255, .09);
    --gold: #f4c867;
    --green: #20c787;
    --blue: #4fb0ff;
    --red: #ed5a68;
    --violet: #a977ff;
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 18% 10%, rgba(244, 200, 103, .08), transparent 28rem),
        radial-gradient(circle at 80% 0%, rgba(79, 176, 255, .08), transparent 26rem),
        linear-gradient(180deg, #121d28, var(--bg));
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at 50% 8%, #000, transparent 70%);
    animation: gridDrift 18s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: auto 0 0 0;
    z-index: -1;
    height: 40dvh;
    background: linear-gradient(0deg, rgba(7, 12, 17, .92), transparent);
    pointer-events: none;
}

@keyframes gridDrift {
    to { background-position: 54px 54px; }
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 24%),
        #111a23;
    border-right: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 8px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background:
        radial-gradient(circle at 35% 25%, #fff1ba, transparent 34%),
        linear-gradient(145deg, var(--gold), #8f6b2d);
    color: #11100c;
    font-weight: 950;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.side-note span,
.top-search span,
.hero-text,
.fine-print {
    color: var(--muted);
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 0 12px;
    color: var(--muted);
    font-weight: 800;
}

.side-nav a:hover,
.side-nav a.active {
    background: var(--surface-2);
    color: var(--ink);
}

.side-note {
    margin-top: auto;
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px;
    background: rgba(255, 255, 255, .035);
}

.app-shell {
    min-height: 100dvh;
    margin-left: 250px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 12px 28px;
    background:
        linear-gradient(90deg, rgba(244, 200, 103, .08), transparent 34%),
        rgba(15, 23, 32, .88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.top-search {
    min-height: 44px;
    flex: 1;
    display: grid;
    justify-content: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 14px;
    background:
        linear-gradient(90deg, rgba(79, 176, 255, .08), transparent),
        rgba(255, 255, 255, .04);
}

.top-search span {
    font-size: .78rem;
}

.top-search strong {
    font-size: .92rem;
}

main {
    width: min(1280px, calc(100% - 42px));
    margin: 0 auto;
    padding: 28px 0 70px;
}

.session-actions,
.hero-actions,
.bet-row,
.user-chip,
.section-row,
.slot-head,
.leader-row,
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.button {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 18px;
    color: var(--ink);
    font-weight: 900;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

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

.button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(244, 200, 103, .42);
    outline-offset: 3px;
}

.primary {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .34), transparent 24% 70%, rgba(255, 255, 255, .24)),
        linear-gradient(135deg, #ffd777, var(--gold));
    color: #14100a;
}

.secondary,
.ghost {
    background: rgba(255, 255, 255, .055);
    border-color: var(--line);
}

.secondary {
    width: 100%;
}

.user-chip {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px 0 14px;
    background: var(--surface);
}

.user-chip strong {
    color: var(--gold);
}

.chip-logout {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px;
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-weight: 850;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 18px;
    align-items: stretch;
    min-height: 420px;
}

.hero-copy,
.hero-casino-card,
.wallet-panel,
.profile-panel,
.history-panel,
.leaderboard,
.shop,
.slot-machine,
.roulette-table,
.game-side-panel > article,
.soon-stage,
.auth-modal {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    position: relative;
}

.hero-copy::after,
.hero-casino-card::after,
.wallet-panel::after,
.profile-panel::after,
.history-panel::after,
.leaderboard::after,
.shop::after,
.slot-machine::after,
.roulette-table::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(115deg, transparent 0 20%, rgba(244, 200, 103, .48), transparent 42% 100%);
    background-size: 240% 240%;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: shineBorder 8s linear infinite;
}

@keyframes shineBorder {
    to { background-position: 240% 0; }
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vw, 58px);
    background:
        linear-gradient(120deg, rgba(244, 200, 103, .18), transparent 54%),
        radial-gradient(circle at 90% 10%, rgba(79, 176, 255, .18), transparent 30rem),
        radial-gradient(circle at 20% 85%, rgba(32, 199, 135, .12), transparent 22rem),
        var(--surface);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 6.5vw, 5.8rem);
    line-height: .92;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
}

h3 {
    margin-bottom: 8px;
}

.hero-text {
    max-width: 680px;
    line-height: 1.65;
    font-size: 1.03rem;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0 20px;
}

.hero-metrics span {
    border: 1px solid rgba(244, 200, 103, .16);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-weight: 850;
}

.hero-metrics strong {
    display: block;
    color: var(--gold);
    font-size: 1.3rem;
}

.hero-casino-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 340px;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 36%, rgba(244, 200, 103, .36), transparent 9rem),
        radial-gradient(circle at 70% 18%, rgba(237, 90, 104, .24), transparent 10rem),
        linear-gradient(145deg, #243140, #121a22);
}

.hero-casino-card::before {
    content: "";
    position: absolute;
    inset: 42px 42px auto auto;
    width: 160px;
    aspect-ratio: 1;
    border: 18px solid rgba(244, 200, 103, .16);
    border-radius: 50%;
}

.hero-casino-card::after {
    animation-duration: 5s;
}

.hero-casino-card strong {
    position: relative;
    display: block;
    font-size: 2rem;
}

.hero-casino-card p,
.hero-casino-card a,
.card-chip {
    position: relative;
}

.hero-casino-card p {
    color: var(--muted);
}

.hero-casino-card a,
.text-link {
    color: var(--gold);
    font-weight: 900;
}

.card-chip,
.soon-pill,
.live-tag,
.casino-game-card em,
.shop-grid em {
    display: inline-flex;
    width: max-content;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(32, 199, 135, .32);
    border-radius: 999px;
    padding: 0 10px;
    background: rgba(32, 199, 135, .13);
    color: #90ffd5;
    font-style: normal;
    font-size: .78rem;
    font-weight: 950;
}

.notice {
    margin: 18px 0;
    padding: 15px 18px;
    border: 1px solid rgba(244, 200, 103, .24);
    border-radius: 8px;
    background: rgba(244, 200, 103, .08);
    color: #ffe9b7;
}

.live-ribbon {
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid rgba(79, 176, 255, .14);
    border-radius: 8px;
    background: rgba(79, 176, 255, .055);
}

.live-ribbon div {
    display: flex;
    gap: 12px;
    width: max-content;
    padding: 10px 12px;
    animation: liveMarquee 24s linear infinite;
}

.live-ribbon span {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, .045);
    color: #d9e7f5;
    font-size: .86rem;
    font-weight: 850;
}

@keyframes liveMarquee {
    to { transform: translateX(-50%); }
}

.lobby-grid,
.dashboard,
.game-layout,
.roulette-layout {
    display: grid;
    grid-template-columns: minmax(270px, .75fr) minmax(0, 1.25fr);
    gap: 18px;
    margin: 18px 0;
}

.wallet-panel,
.profile-panel,
.history-panel,
.leaderboard,
.shop,
.slot-machine,
.roulette-table,
.soon-stage {
    padding: 20px;
}

.wallet-panel {
    display: grid;
    gap: 10px;
    align-content: start;
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 200, 103, .17), transparent 12rem),
        var(--surface);
}

.wallet-panel span,
.stat-grid span {
    color: var(--muted);
}

.wallet-panel strong {
    color: var(--gold);
    font-size: 2rem;
}

.wallet-panel small {
    color: var(--muted);
}

.section-row {
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-heading.tight h2 {
    margin-bottom: 4px;
}

.content-section {
    margin: 28px 0;
}

.game-library {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.casino-game-card {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background:
        radial-gradient(circle at 90% 100%, var(--card-accent, var(--gold)), transparent 7rem),
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
        var(--surface);
    transition: transform .18s ease, border-color .18s ease;
}

.casino-game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .10), transparent);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.casino-game-card:hover::before {
    transform: translateX(120%);
}

.casino-game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(244, 200, 103, .35);
}

.casino-game-card::after {
    content: "";
    position: absolute;
    inset: auto -22px -36px auto;
    width: 112px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--card-accent, var(--gold));
    opacity: .18;
}

.casino-game-card span,
.casino-game-card p {
    color: var(--muted);
}

.casino-game-card strong {
    font-size: 1.35rem;
    position: relative;
    z-index: 1;
}

.casino-game-card span,
.casino-game-card p,
.casino-game-card em {
    position: relative;
    z-index: 1;
}

.accent-gold { --card-accent: var(--gold); }
.accent-red { --card-accent: var(--red); }
.accent-green { --card-accent: var(--green); }
.accent-blue { --card-accent: var(--blue); }
.accent-violet { --card-accent: var(--violet); }
.accent-orange { --card-accent: #ff9d43; }
.accent-cyan { --card-accent: #48d6ec; }
.accent-pink { --card-accent: #ff73c7; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.stat-grid div,
.shop-grid div,
.history-item,
.leader-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
}

.stat-grid div {
    padding: 12px;
}

.stat-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--gold);
    font-size: 1.2rem;
}

.profile-email {
    margin: 0 0 12px;
    color: var(--muted);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

.badge {
    border: 1px solid rgba(244, 200, 103, .28);
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(244, 200, 103, .09);
    color: var(--gold);
    font-size: .84rem;
    font-weight: 850;
}

.history-list,
.leaderboard-list {
    display: grid;
    gap: 10px;
}

.history-item,
.leader-row {
    justify-content: space-between;
    padding: 12px;
}

.history-item small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.positive {
    color: #8fffd4;
}

.negative {
    color: #ff9aa8;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.shop-grid div {
    display: grid;
    gap: 8px;
    padding: 16px;
    transition: transform .16s ease, border-color .16s ease;
}

.shop-grid div:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 200, 103, .3);
}

.shop-grid strong {
    color: var(--gold);
}

.game-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    background:
        radial-gradient(circle at 86% 8%, rgba(244, 200, 103, .18), transparent 24rem),
        var(--surface);
}

.game-page-head p {
    max-width: 760px;
    color: var(--muted);
}

.game-page-head h1 {
    margin-bottom: 12px;
}

.game-layout,
.roulette-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
}

.roulette-table {
    display: grid;
    grid-template-columns: minmax(390px, 1.05fr) minmax(320px, .95fr);
    gap: 24px;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 100%),
        linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 100%),
        linear-gradient(135deg, rgba(12, 86, 58, .55), rgba(14, 24, 31, .9)),
        radial-gradient(circle at 28% 40%, rgba(244, 200, 103, .16), transparent 24rem),
        var(--surface);
    background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.roulette-stage {
    position: relative;
    display: grid;
    min-height: 0;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(244, 200, 103, .12);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 52%, transparent 0 34%, rgba(244, 200, 103, .08) 35% 36%, transparent 37%),
        radial-gradient(circle at center, rgba(255, 255, 255, .08), transparent 18rem),
        linear-gradient(145deg, #10231d, #07110e);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, .55);
}

.roulette-canvas {
    width: min(560px, 88%);
    max-width: 100%;
    aspect-ratio: 1;
    filter: drop-shadow(0 35px 55px rgba(0, 0, 0, .55));
}

.roulette-ball {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #ffffff, #d9e0e8 48%, #84909b 100%);
    box-shadow: 0 4px 16px rgba(255, 255, 255, .75), 0 12px 30px rgba(0, 0, 0, .45);
    transform: translate(-50%, -50%);
    transition: box-shadow .18s ease;
}

.roulette-ball.is-spinning {
    box-shadow: 0 4px 22px rgba(255, 255, 255, .95), 0 0 30px rgba(244, 200, 103, .38);
}

.wheel-readout {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(120px, 18vw, 190px);
    aspect-ratio: 1;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 18px;
    border: 1px solid rgba(244, 200, 103, .28);
    border-radius: 50%;
    background:
        radial-gradient(circle, #172533 0 45%, #0d151d 100%);
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .55), 0 18px 38px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);
    text-align: center;
}

.wheel-readout span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.wheel-readout strong {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--gold);
    line-height: .9;
}

.wheel-readout small {
    color: var(--muted);
    font-weight: 950;
}

.wheel-readout small[data-color="red"] { color: #ff8490; }
.wheel-readout small[data-color="black"] { color: #d7e0ea; }
.wheel-readout small[data-color="green"] { color: #8fffd4; }

.wheel-pointer {
    position: absolute;
    top: 28px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 56px;
    height: 64px;
    filter: drop-shadow(0 9px 12px rgba(0, 0, 0, .45));
}

.wheel-pointer span {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 34px solid var(--gold);
}

.pocket-marker {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border: 4px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background: #151f2a;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 950;
    box-shadow: var(--shadow);
}

.pocket-marker[data-color="red"] { background: #9f2434; }
.pocket-marker[data-color="black"] { background: #080c10; }
.pocket-marker[data-color="green"] { background: #107448; }

.roulette-controls,
.roulette-form {
    display: grid;
    gap: 16px;
}

.roulette-controls {
    border: 1px solid rgba(244, 200, 103, .13);
    border-radius: 8px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .065), transparent),
        rgba(7, 17, 14, .48);
}

.fairness-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(79, 176, 255, .2);
    border-radius: 8px;
    padding: 12px;
    background: rgba(79, 176, 255, .07);
}

.fairness-ticket span {
    color: var(--muted);
    font-weight: 850;
}

.fairness-ticket strong {
    color: #9bd2ff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .9rem;
}

.fairness-copy {
    display: grid;
    gap: 10px;
}

.fairness-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.chip-rack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.chip-rack button {
    min-height: 62px;
    border: 5px dashed rgba(255, 255, 255, .35);
    border-radius: 50%;
    background:
        radial-gradient(circle, #f8f3dc 0 25%, #b92034 26% 54%, #f8f3dc 55% 62%, #b92034 63%);
    color: #17120b;
    font-size: .92rem;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
    transition: transform .16s ease, filter .16s ease;
}

.chip-rack button:hover {
    transform: translateY(-3px) rotate(-4deg);
    filter: brightness(1.08);
}

.chip-rack button:nth-child(2) {
    background: radial-gradient(circle, #f8f3dc 0 25%, #1560b5 26% 54%, #f8f3dc 55% 62%, #1560b5 63%);
}

.chip-rack button:nth-child(3) {
    background: radial-gradient(circle, #f8f3dc 0 25%, #17885f 26% 54%, #f8f3dc 55% 62%, #17885f 63%);
}

.chip-rack button:nth-child(4) {
    background: radial-gradient(circle, #f8f3dc 0 25%, #151515 26% 54%, #f8f3dc 55% 62%, #151515 63%);
    color: var(--ink);
}

.stake-input {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 850;
}

.bet-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    border: 0;
    padding: 0;
}

.bet-options legend {
    grid-column: 1 / -1;
    color: var(--muted);
    font-weight: 850;
    margin-bottom: 2px;
}

.bet-options label {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .04);
    font-weight: 850;
}

.roulette-bet-board .bet-tile {
    position: relative;
    min-height: 76px;
    align-items: start;
    display: grid;
    gap: 4px;
    overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.roulette-bet-board .bet-tile:hover,
.roulette-bet-board .bet-tile:has(input:checked) {
    border-color: rgba(244, 200, 103, .62);
    transform: translateY(-1px);
}

.roulette-bet-board .bet-tile:has(input:checked)::after {
    content: "";
    position: absolute;
    inset: auto 12px 12px auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 18px rgba(244, 200, 103, .55);
}

.roulette-bet-board .bet-tile input {
    position: absolute;
    inset: 10px 10px auto auto;
}

.roulette-bet-board .bet-tile span {
    font-size: 1.05rem;
}

.roulette-bet-board .bet-tile strong {
    color: var(--gold);
}

.roulette-bet-board .red-bet {
    background: linear-gradient(145deg, rgba(159, 36, 52, .75), rgba(255, 255, 255, .04));
}

.roulette-bet-board .black-bet {
    background: linear-gradient(145deg, rgba(3, 7, 10, .9), rgba(255, 255, 255, .05));
}

.roulette-bet-board .number-bet {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, rgba(244, 200, 103, .22), rgba(255, 255, 255, .04));
}

.bet-options input {
    width: 18px;
    min-height: auto;
}

.game-side-panel {
    display: grid;
    gap: 18px;
    align-content: start;
}

.slot-head {
    justify-content: space-between;
}

.slot-head p {
    color: var(--muted);
    margin-bottom: 0;
}

.slot-machine {
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(244, 200, 103, .22), transparent 18rem),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 100%),
        linear-gradient(180deg, #263647, #111923 58%, #0c1218);
    background-size: auto, 34px 34px, auto;
}

.slot-machine::before {
    content: "VELORYA ROYALE";
    position: absolute;
    right: 22px;
    top: 18px;
    color: rgba(244, 200, 103, .16);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 950;
    letter-spacing: 0;
    pointer-events: none;
}

.slot-cabinet {
    --slot-symbol-height: clamp(92px, 12vw, 142px);
    position: relative;
    margin: 24px 0 16px;
    border: 1px solid rgba(244, 200, 103, .38);
    border-radius: 8px;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 16% 84%, rgba(255, 255, 255, .07)),
        linear-gradient(90deg, transparent 0 33%, rgba(255, 255, 255, .045) 33% 34%, transparent 34% 66%, rgba(255, 255, 255, .045) 66% 67%, transparent 67%),
        radial-gradient(circle at center, rgba(244, 200, 103, .16), transparent 24rem),
        #080d12;
    box-shadow: inset 0 0 45px rgba(0, 0, 0, .65), 0 24px 55px rgba(0, 0, 0, .38);
    overflow: hidden;
}

.slot-cabinet::before,
.slot-cabinet::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    height: 28%;
    pointer-events: none;
}

.slot-cabinet::before {
    top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent);
}

.slot-cabinet::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent);
}

.slot-cabinet.win {
    animation: cabinetWin .8s ease-in-out 2;
}

@keyframes cabinetWin {
    50% { box-shadow: inset 0 0 45px rgba(0, 0, 0, .65), 0 0 42px rgba(244, 200, 103, .55); }
}

.payline {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 50%;
    z-index: 4;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffe09a, transparent);
    box-shadow: 0 0 18px rgba(244, 200, 103, .75);
    pointer-events: none;
}

.reels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.reel-window {
    height: calc(var(--slot-symbol-height) * 3);
    border: 1px solid rgba(244, 200, 103, .18);
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(244, 200, 103, .10), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, .08), transparent),
        #111923;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .62);
}

.reel-strip {
    display: grid;
    will-change: transform;
}

.reel-strip.spinning {
    filter: blur(1px) brightness(1.12);
}

.reel-strip span {
    display: grid;
    height: var(--slot-symbol-height);
    place-items: center;
    color: var(--gold);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    font-size: clamp(1.1rem, 3vw, 2.35rem);
    font-weight: 950;
    text-shadow: 0 0 18px rgba(244, 200, 103, .24);
}

.reel-strip span[data-symbol="7"] {
    color: #ff6375;
    font-size: clamp(2rem, 5vw, 4rem);
}

.reel-strip span[data-symbol="CROWN"] {
    color: #ffe4a8;
}

.slot-paytable {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.slot-paytable span {
    border: 1px solid rgba(244, 200, 103, .16);
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.slot-paytable strong {
    display: block;
    color: var(--gold);
    margin-top: 4px;
}

.bet-row label,
.auth-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.bet-row label {
    flex: 1;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .06);
    color: var(--ink);
}

.result-line {
    min-height: 26px;
    margin: 18px 0 0;
    color: var(--muted);
}

.soon-stage {
    display: grid;
    justify-items: start;
    gap: 12px;
    min-height: 340px;
    align-content: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(169, 119, 255, .2), transparent 20rem),
        var(--surface);
}

.soon-stage p {
    max-width: 650px;
    color: var(--muted);
    line-height: 1.65;
}

.auth-modal {
    width: min(430px, calc(100% - 28px));
    padding: 18px;
    color: var(--ink);
}

.auth-modal::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(8px);
}

.modal-close-row {
    display: flex;
    justify-content: flex-end;
}

.modal-close-row button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: var(--ink);
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 8px 0 18px;
}

.auth-tabs button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    font-weight: 850;
}

.auth-tabs button.active {
    color: #14100a;
    background: var(--gold);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    max-width: min(380px, calc(100% - 40px));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    html {
        scroll-behavior: auto;
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 1100px) {
    .game-library {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: static;
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .side-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .side-note {
        display: none;
    }

    .app-shell {
        margin-left: 0;
    }

    .topbar {
        flex-wrap: wrap;
        padding: 12px;
    }

    main {
        width: min(100% - 24px, 720px);
    }

    .home-hero,
    .lobby-grid,
    .dashboard,
    .game-layout,
    .roulette-layout,
    .roulette-table,
    .game-page-head {
        grid-template-columns: 1fr;
    }

    .game-page-head {
        display: grid;
    }

    .game-library,
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .roulette-stage {
        min-height: 470px;
    }
}

@media (max-width: 560px) {
    .side-nav,
    .game-library,
    .shop-grid,
    .bet-options,
    .chip-rack,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .session-actions,
    .hero-actions,
    .bet-row {
        align-items: stretch;
        flex-direction: column;
    }

    .session-actions,
    .button {
        width: 100%;
    }

    .top-search {
        order: 3;
        width: 100%;
        flex: auto;
    }
}

/* Velorya redesign: private casino app theme */
:root {
    --bg: #06080d;
    --surface: rgba(14, 20, 30, .82);
    --surface-2: rgba(24, 34, 48, .9);
    --surface-3: #213044;
    --ink: #f6f8fb;
    --muted: #90a0b3;
    --line: rgba(255, 255, 255, .10);
    --gold: #f6c76b;
    --green: #35d49a;
    --blue: #77b7ff;
    --red: #ff5368;
    --violet: #9b8cff;
    --shadow: 0 28px 90px rgba(0, 0, 0, .38);
}

body {
    background:
        radial-gradient(circle at 20% -10%, rgba(53, 212, 154, .16), transparent 30rem),
        radial-gradient(circle at 85% 2%, rgba(255, 83, 104, .12), transparent 26rem),
        linear-gradient(180deg, #0b1018 0%, #06080d 46%, #05070b 100%);
}

body::before {
    opacity: .42;
    background-size: 72px 72px;
    animation-duration: 28s;
}

.sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    z-index: 50;
    width: 100%;
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 12px max(22px, calc((100vw - 1280px) / 2));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(53, 212, 154, .09), transparent 34%, rgba(246, 199, 107, .06)),
        rgba(6, 8, 13, .86);
    backdrop-filter: blur(18px);
}

.brand {
    min-height: 48px;
    padding: 0;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(246, 199, 107, .34);
    background:
        radial-gradient(circle at 35% 25%, #fff2bf, transparent 36%),
        linear-gradient(145deg, #f6c76b, #7f5b21);
    box-shadow: 0 0 28px rgba(246, 199, 107, .18);
}

.side-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.side-nav a {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 14px;
}

.side-nav a:hover,
.side-nav a.active {
    border-color: rgba(246, 199, 107, .22);
    background: rgba(255, 255, 255, .06);
    color: var(--ink);
}

.side-note {
    margin-top: 0;
    min-width: 178px;
    border-color: rgba(53, 212, 154, .20);
    background: rgba(53, 212, 154, .07);
}

.app-shell {
    margin-left: 0;
}

.topbar {
    position: sticky;
    top: 76px;
    width: min(1280px, calc(100% - 42px));
    margin: 0 auto;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: rgba(12, 17, 25, .78);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

main {
    width: min(1280px, calc(100% - 42px));
    padding-top: 22px;
}

.top-search {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035);
}

.button {
    border-radius: 8px;
}

.primary {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .42), transparent 28% 68%, rgba(255, 255, 255, .22)),
        linear-gradient(135deg, #f7d083, #f1b64e);
    box-shadow: 0 14px 32px rgba(246, 199, 107, .18);
}

.ghost,
.secondary {
    background: rgba(255, 255, 255, .055);
}

.home-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    min-height: 520px;
}

.hero-copy,
.hero-casino-card,
.wallet-panel,
.profile-panel,
.history-panel,
.leaderboard,
.shop,
.slot-machine,
.roulette-table,
.game-side-panel > article,
.soon-stage,
.auth-modal {
    border-color: rgba(255, 255, 255, .10);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)),
        rgba(14, 20, 30, .78);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .30);
    backdrop-filter: blur(18px);
}

.hero-copy {
    background:
        radial-gradient(circle at 78% 18%, rgba(246, 199, 107, .18), transparent 18rem),
        radial-gradient(circle at 18% 84%, rgba(53, 212, 154, .15), transparent 18rem),
        linear-gradient(145deg, rgba(19, 28, 41, .94), rgba(9, 13, 20, .94));
}

.eyebrow {
    color: #75efc0;
}

h1 {
    font-size: clamp(3rem, 7vw, 6.8rem);
}

.hero-text {
    color: #b7c3d0;
}

.hero-metrics span {
    border-color: rgba(53, 212, 154, .16);
    background: rgba(53, 212, 154, .055);
}

.hero-metrics strong {
    color: #75efc0;
}

.hero-casino-card {
    min-height: 520px;
    background:
        radial-gradient(circle at 48% 28%, rgba(255, 83, 104, .25), transparent 10rem),
        radial-gradient(circle at 55% 48%, rgba(246, 199, 107, .22), transparent 12rem),
        linear-gradient(145deg, rgba(35, 48, 66, .94), rgba(8, 12, 18, .94));
}

.hero-casino-card::before {
    inset: 44px auto auto 50%;
    width: 210px;
    transform: translateX(-50%);
    border-color: rgba(246, 199, 107, .18);
}

.live-ribbon {
    border-color: rgba(53, 212, 154, .16);
    background: rgba(53, 212, 154, .045);
}

.notice {
    border-color: rgba(246, 199, 107, .18);
    background: rgba(246, 199, 107, .06);
}

.lobby-grid {
    grid-template-columns: .8fr 1.2fr;
}

.game-library {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.casino-game-card {
    min-height: 230px;
    border-color: rgba(255, 255, 255, .10);
    background:
        radial-gradient(circle at 78% 80%, color-mix(in srgb, var(--card-accent, var(--gold)) 28%, transparent), transparent 8rem),
        linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)),
        rgba(14, 20, 30, .82);
}

.casino-game-card em,
.live-tag,
.card-chip,
.soon-pill {
    background: rgba(53, 212, 154, .12);
    border-color: rgba(53, 212, 154, .28);
    color: #85f4c8;
}

.wallet-panel strong,
.stat-grid strong,
.shop-grid strong,
.slot-paytable strong {
    color: var(--gold);
}

.dashboard,
.leaderboard-shop,
.game-layout,
.roulette-layout {
    gap: 18px;
}

.slot-machine {
    background:
        radial-gradient(circle at 50% 0%, rgba(246, 199, 107, .20), transparent 18rem),
        linear-gradient(145deg, rgba(28, 40, 56, .94), rgba(8, 12, 18, .94));
}

.slot-cabinet {
    border-color: rgba(246, 199, 107, .32);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 20% 80%, rgba(255, 255, 255, .06)),
        linear-gradient(90deg, transparent 0 33%, rgba(246, 199, 107, .08) 33% 34%, transparent 34% 66%, rgba(246, 199, 107, .08) 66% 67%, transparent 67%),
        #070a0f;
}

.roulette-table {
    background:
        radial-gradient(circle at 28% 45%, rgba(53, 212, 154, .20), transparent 20rem),
        linear-gradient(145deg, rgba(11, 54, 41, .78), rgba(8, 12, 18, .94));
}

.roulette-stage {
    background:
        radial-gradient(circle at 50% 52%, transparent 0 34%, rgba(246, 199, 107, .09) 35% 36%, transparent 37%),
        radial-gradient(circle at center, rgba(255, 255, 255, .09), transparent 18rem),
        linear-gradient(145deg, #0d261e, #050907);
}

.roulette-controls {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), transparent),
        rgba(6, 15, 13, .56);
}

@media (max-width: 860px) {
    .sidebar {
        position: static;
        flex-wrap: wrap;
        padding: 12px;
    }

    .side-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }

    .side-note {
        display: none;
    }

    .topbar {
        top: 0;
        width: calc(100% - 24px);
    }

    .home-hero,
    .lobby-grid,
    .game-library {
        grid-template-columns: 1fr;
    }

    .hero-casino-card {
        min-height: 360px;
    }
}
