@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --page: #100816;
    --panel: rgba(25, 13, 37, .88);
    --panel-raised: rgba(35, 18, 50, .94);
    --line: rgba(221, 151, 255, .2);
    --purple: #a83bff;
    --pink: #f52aab;
    --cyan: #45e6ee;
    --gold: #ffd16b;
    --text: #fff9ff;
    --muted: #c1adc9;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--page);
    scrollbar-color: #70418b #130b1b;
}

body {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    background: var(--page);
}

body:has(.game-shell)::before,
body:has(.auth-page)::before {
    position: fixed;
    z-index: -2;
    inset: -12px;
    content: "";
    background: var(--casino-background-image) center center / 100% 100% no-repeat;
    filter: blur(3px) brightness(.82) saturate(1.12);
    transform: scale(1.025);
}

body:has(.game-shell)::after,
body:has(.auth-page)::after {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: "";
    background:
        radial-gradient(ellipse at 50% 34%, rgba(86, 20, 107, .035), transparent 49%),
        linear-gradient(90deg, rgba(10, 5, 17, .14), rgba(13, 6, 20, .04) 48%, rgba(10, 5, 17, .14)),
        linear-gradient(180deg, rgba(12, 6, 20, .25), rgba(15, 7, 22, .14) 42%, rgba(10, 5, 15, .48));
    pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

body > .topbar {
    width: min(1180px, calc(100% - 40px));
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(220, 159, 255, .15);
}

.topbar .brand {
    color: #fff;
    font: 800 17px var(--font-display);
    letter-spacing: -.7px;
}

.topbar .brand span { color: var(--pink); }

.topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d3bfdc;
    font-size: 13px;
}

.topbar nav a:hover { color: #fff; }
.topbar nav b { color: #f1dfff; }
.topbar nav form { margin: 0; }
.topbar nav button {
    min-height: 35px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(32, 17, 44, .85);
    color: #fff;
    cursor: pointer;
}

main.container {
    width: min(1180px, calc(100% - 40px));
    flex: 1;
    margin: 0 auto;
    padding: 0 0 24px;
}

.demo-banner {
    margin: 12px 0 0;
    padding: 9px 13px;
    border: 1px solid rgba(206, 132, 248, .2);
    border-radius: 9px;
    background: rgba(28, 14, 40, .78);
    color: #d1bdd9;
    text-align: center;
    font: 600 8px var(--font-display);
    letter-spacing: 1px;
}

.flash {
    margin: 12px 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(31, 16, 43, .9);
    color: #f4e7ff;
}

.flash.error, .flash.danger { border-color: rgba(255, 104, 139, .5); }
.flash.success { border-color: rgba(94, 232, 161, .45); }

body:has(.game-shell) > .topbar,
body:has(.game-shell) > footer {
    display: none;
}

body:has(.game-shell) .demo-banner {
    width: min(1180px, 88vw);
    margin: 0 auto;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff3ff;
    text-align: left;
    font: 500 7px var(--font-display);
    letter-spacing: .15px;
}

body:has(.game-shell) main.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

body:has(.game-shell) .flash {
    width: min(1240px, calc(100% - 48px));
    margin: 12px auto 0;
}

body > footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 17px 0;
    border-top: 1px solid rgba(215, 159, 248, .12);
    color: #a28cae;
    text-align: center;
    font: 600 8px var(--font-display);
    letter-spacing: .7px;
}

.game-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 0 0 12px;
}

.game-top {
    width: min(1180px, 88vw);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 10px;
    margin: 3px auto 0;
    padding: 5px 0 6px;
    border-bottom: 1px solid rgba(220, 159, 255, .17);
}

.game-brand {
    grid-column: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 211, 111, .7);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(112, 42, 137, .95), rgba(32, 13, 47, .96));
    box-shadow: inset 0 0 13px rgba(255, 255, 255, .1), 0 0 18px rgba(220, 67, 210, .18);
    color: #ffe5a0;
    font-size: 19px;
    text-shadow: 0 0 13px rgba(255, 201, 88, .8);
}

.brand-copy strong {
    display: block;
    font: 900 clamp(17px, 2.4vw, 25px) var(--font-display);
    letter-spacing: -1px;
    white-space: nowrap;
}

.brand-copy em { color: var(--gold); font-style: normal; }

.brand-copy small {
    display: block;
    margin-top: 4px;
    color: #c0a9ca;
    font-size: 7px;
    letter-spacing: 1.8px;
}

.player-info {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 9px;
}

.player-pill, .wallet-pill {
    min-height: 31px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid rgba(223, 167, 255, .22);
    border-radius: 8px;
    background: rgba(26, 13, 38, .82);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    backdrop-filter: blur(12px);
}

.player-avatar { color: #d5a5ff; font-size: 14px; }
.player-pill small, .wallet-pill small { display: block; color: #b6a0c1; font-size: 6px; letter-spacing: .8px; }
.player-pill strong, .wallet-pill strong { display: block; margin-top: 1px; font: 700 9px var(--font-display); }
.wallet-pill { border-color: rgba(255, 209, 107, .35); }
.wallet-pill strong { color: var(--gold); }
.wallet-pill strong small { display: inline; color: #c3afcb; font: 600 6px var(--font-display); }
.coin-mark { color: var(--gold); font-size: 13px; text-shadow: 0 0 11px rgba(255, 209, 107, .6); }
.logout-form { margin: 0; }

.logout-button {
    width: 27px;
    height: 27px;
    border: 1px solid rgba(223, 167, 255, .25);
    border-radius: 7px;
    background: rgba(30, 15, 43, .9);
    color: #e2c2fb;
    cursor: pointer;
}

.text-link { color: #e0baf5; font-size: 13px; }
.text-link:hover { color: #fff; }

.small-primary {
    padding: 9px 13px;
    border: 1px solid rgba(255, 207, 240, .28);
    border-radius: 9px;
    background: linear-gradient(105deg, var(--pink), var(--purple));
    font-size: 12px;
    font-weight: 700;
}

.sound-toggle {
    grid-column: 3;
    justify-self: end;
    min-height: 31px;
    padding: 0 9px;
    border: 1px solid rgba(210, 149, 255, .33);
    border-radius: 10px;
    background: rgba(34, 17, 48, .9);
    color: #f2dfff;
    cursor: pointer;
    white-space: nowrap;
    font: 700 8px var(--font-display);
    letter-spacing: .5px;
    transition: border-color .2s, box-shadow .2s, color .2s;
}

.sound-toggle:hover {
    border-color: rgba(255, 106, 200, .78);
    box-shadow: 0 0 15px rgba(245, 42, 171, .18);
}

.sound-toggle.sound-muted { color: #aa99b4; }

.demo-strip {
    width: min(1180px, 88vw);
    min-height: 22px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto;
    padding: 0 12px;
    border: 1px solid rgba(209, 142, 245, .17);
    border-radius: 9px;
    background: rgba(25, 13, 36, .72);
    color: #d2c1dc;
    font: 600 7px var(--font-display);
    letter-spacing: .65px;
    backdrop-filter: blur(10px);
}

.demo-strip span:not(.status-dot) { color: #8e789a; }

.status-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #64f0a8;
    box-shadow: 0 0 9px #64f0a8;
}

.game-layout { padding-top: 10px; }

.game-heading {
    margin-bottom: 10px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 3px;
    color: #e5b7f5;
    font: 700 8px var(--font-display);
    letter-spacing: 1.5px;
}

.game-heading h1, .guest-card h1 {
    margin: 0;
    font: 900 clamp(26px, 4vw, 38px) var(--font-display);
    letter-spacing: -1.5px;
    text-shadow: 0 0 26px rgba(234, 93, 231, .28);
}

.game-heading h1 span { color: var(--gold); }
.guest-card h1 span { color: #ff6bc7; }
.game-heading h1 { font: italic 800 clamp(27px, 3.7vw, 38px)/1 var(--font-body); letter-spacing: -.4px; }
.heading-note { margin: 3px 0 0; color: #f0dfef; font-size: 12px; line-height: 1.2; }

.game-board {
    position: relative;
    isolation: isolate;
    width: min(900px, 72vw);
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(180px, .95fr);
    align-items: center;
    gap: 22px;
    margin: 0 auto;
    padding: 12px 19px;
    border: 1px solid rgba(242, 216, 250, .55);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 14% 0%, rgba(237, 56, 203, .08), transparent 48%),
        linear-gradient(145deg, rgba(46, 18, 61, .2), rgba(21, 8, 34, .2));
    box-shadow: 0 20px 60px rgba(5, 2, 11, .37), inset 0 1px rgba(255, 255, 255, .09);
    backdrop-filter: blur(12px);
}

.game-board::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse at 18% 24%, rgba(255, 55, 188, .22), transparent 34%),
        radial-gradient(ellipse at 82% 72%, rgba(45, 217, 255, .16), transparent 38%),
        radial-gradient(ellipse at 58% 10%, rgba(255, 203, 89, .14), transparent 32%);
    background-size: 180% 180%;
    content: "";
    opacity: .7;
    pointer-events: none;
    animation: casino-ambient 16s ease-in-out infinite alternate;
}

.game-board > * { position: relative; z-index: 1; }

.wheel-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-game-actions { display: none; }

.wheel-wrap {
    position: relative;
    width: min(100%, 440px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    container-type: inline-size;
}

.wheel-aura {
    display: none;
}

.wheel-rim {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 4%;
    border: 3px solid #ffdc8d;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff1bd 0%, #d39a43 13%, #64327b 30%, #37134c 60%, #e8ad56 84%, #fff0bd 100%);
    box-shadow:
        0 0 0 3px rgba(75, 28, 103, .85),
        0 0 19px rgba(255, 193, 81, .54),
        inset 0 0 13px rgba(255, 255, 255, .52);
}

.wheel-rim::before {
    position: absolute;
    z-index: 1;
    inset: 6px;
    border: 1px solid rgba(255, 244, 211, .68);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.wheel-rim::after {
    display: none;
}

.marquee-bulb {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: clamp(8px, 1.9cqw, 12px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 240, 246, .98);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0 17%, #ff8598 40%, #ff102e 78%);
    box-shadow: 0 0 5px 2px rgba(255, 103, 128, .95), 0 0 13px 5px rgba(255, 20, 52, .78);
    transform: translate(-50%, -50%) rotate(calc(var(--bulb) * 11.25deg)) translateY(-48.1cqw);
    animation: marquee-glow 2.4s ease-in-out infinite alternate;
    animation-delay: calc(var(--bulb) * -0.075s);
}

.marquee-bulb:nth-of-type(4n + 2) {
    background: radial-gradient(circle at 35% 30%, #fff 0 17%, #8effad 40%, #00d83d 78%);
    box-shadow: 0 0 5px 2px rgba(104, 255, 145, .95), 0 0 13px 5px rgba(0, 222, 61, .8);
}

.marquee-bulb:nth-of-type(4n + 3) {
    background: radial-gradient(circle at 35% 30%, #fff 0 17%, #8fd2ff 40%, #0875ff 78%);
    box-shadow: 0 0 5px 2px rgba(100, 185, 255, .98), 0 0 13px 5px rgba(0, 105, 255, .82);
}

.marquee-bulb:nth-of-type(4n) {
    background: radial-gradient(circle at 35% 30%, #fff 0 17%, #d7a2ff 40%, #9b16ff 78%);
    box-shadow: 0 0 5px 2px rgba(200, 125, 255, .98), 0 0 13px 5px rgba(145, 0, 255, .84);
}

.wheel-wrap.disco-lights .marquee-bulb {
    animation-name: disco-flash;
    animation-duration: .24s;
    animation-timing-function: steps(2, end);
    animation-delay: calc(var(--bulb) * -0.035s);
}

.wheel {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 5px solid #fff1cb;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(30, 8, 45, .6), inset 0 0 26px rgba(0, 0, 0, .28), 0 0 0 2px rgba(49, 19, 67, .9);
    transform: rotate(0deg);
    transition: transform 5.2s cubic-bezier(.12, .76, .12, 1);
}

.wheel-segments { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }

.wheel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 23%;
    margin: -2.2% 0 0 -11.5%;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    font: 900 clamp(8px, 2.6cqw, 13px) var(--font-display);
    text-shadow: 0 2px 4px rgba(0, 0, 0, .92), 0 0 8px rgba(0, 0, 0, .4);
    transform-origin: center;
    transform: rotate(var(--angle)) translateY(-31cqw) rotate(90deg);
}

.wheel-center {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 25%;
    height: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffe6a9;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, #704083, #251033 76%);
    box-shadow: 0 0 0 3px #a84cce, 0 0 18px rgba(248, 177, 255, .34), 0 4px 15px rgba(0, 0, 0, .62);
    font-family: var(--font-display);
    line-height: 1.2;
    transform: translate(-50%, -50%);
}

.wheel-center span { color: #fff; font-size: clamp(8px, 2.2cqw, 12px); font-weight: 800; }
.wheel-center strong { color: #ffe6a9; font-size: clamp(6px, 1.6cqw, 9px); letter-spacing: 1.3px; }
.wheel-crown { margin-bottom: 1px; color: #ffd454; font-size: clamp(10px, 2.6cqw, 15px); line-height: 1; text-shadow: 0 0 8px rgba(255, 202, 53, .9); }

.wheel-pointer {
    position: absolute;
    z-index: 8;
    top: -2.5%;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 40px solid #ffdd7d;
    border-right: 18px solid transparent;
    border-left: 18px solid transparent;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .8)) drop-shadow(0 0 6px rgba(255, 207, 95, .7));
    transform: translateX(-50%);
}

.wheel-pointer span {
    position: absolute;
    top: -38px;
    left: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff7da;
    box-shadow: 0 0 9px 2px #fff3c9;
}

.wheel-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    margin-top: 11px;
    color: #d0bddb;
    font: 600 7px var(--font-display);
    letter-spacing: .3px;
}

.wheel-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-purple { background: #b94cff; }
.dot-cyan { background: var(--cyan); }
.dot-gold { background: var(--gold); }
.dot-red { background: #ff657d; }

.play-panel {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid rgba(222, 158, 255, .23);
    border-radius: 13px;
    background:
        radial-gradient(ellipse at 50% 0, rgba(176, 63, 180, .14), transparent 55%),
        rgba(13, 7, 22, .68);
    box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 12px 32px rgba(4, 2, 10, .25);
    backdrop-filter: blur(10px);
}

.panel-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; margin-bottom: 8px; }
.panel-label { color: #fff2ff; font: 700 9px var(--font-display); letter-spacing: .45px; }
.ready-tag { color: #8df0bc; font: 700 8px var(--font-display); letter-spacing: .7px; }
.ready-tag i { width: 6px; height: 6px; display: inline-block; margin-right: 4px; border-radius: 50%; background: #65efa7; box-shadow: 0 0 8px #65efa7; }

.stake-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    margin-top: 0;
}

.stake-control label { display: block; margin-bottom: 5px; color: #ead4f5; font: 700 9px var(--font-display); letter-spacing: 1.2px; }

.stake-input-wrap {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid rgba(208, 145, 255, .43);
    border-radius: 11px;
    background: rgba(18, 9, 28, .9);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .25);
}

.stake-input-wrap:focus-within { border-color: #e379e5; box-shadow: 0 0 0 3px rgba(198, 60, 211, .15); }
.stake-input-wrap input { width: auto; min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font: 800 19px var(--font-display); }
.stake-input-wrap input::-webkit-inner-spin-button, .stake-input-wrap input::-webkit-outer-spin-button { opacity: 1; }
.currency-mark { color: var(--gold); font: 700 15px var(--font-display); text-shadow: 0 0 9px rgba(255, 209, 107, .25); }
.stake-unit { color: #c2aecb; font: 600 8px var(--font-display); white-space: nowrap; }
.stake-limits { display: flex; justify-content: space-between; margin-top: 6px; color: #d2bdd9; font: 600 8px var(--font-display); letter-spacing: .5px; }

.main-spin-button {
    position: relative;
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    margin-top: 0;
    border: 1px solid rgba(255, 228, 157, .98);
    border-radius: 12px;
    background: linear-gradient(105deg, #b97812 0%, #edc04d 48%, #b97812 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 9px 28px rgba(232, 173, 47, .34), inset 0 1px rgba(255, 255, 255, .38);
    font: 900 12px var(--font-display);
    letter-spacing: .8px;
    transition: transform .18s, filter .18s, box-shadow .18s;
}

.main-spin-button::after {
    position: absolute;
    top: -40%;
    left: -38%;
    width: 25%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
    content: "";
    pointer-events: none;
    transform: rotate(22deg);
    transition: left .65s ease;
}

.main-spin-button:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 10px 32px rgba(232, 173, 47, .46), inset 0 1px rgba(255, 255, 255, .42);
    transform: translateY(-2px);
}

.main-spin-button:hover::after { left: 120%; }
.main-spin-button:active:not(:disabled) { transform: scale(.985); }
.main-spin-button:disabled { opacity: .58; cursor: wait; }
.button-spark, .button-arrow { width: 20px; height: 20px; flex: none; color: #fff; }
.spin-message { min-height: 22px; margin: 6px 0 0; color: #f1e2f2; text-align: center; font: 600 7px var(--font-display); letter-spacing: .1px; line-height: 1.5; }
.panel-footnote { display: flex; justify-content: center; gap: 6px; margin-top: 4px; color: #c9b8d0; font-size: 8px; }
.panel-footnote span { color: #e0b1f5; }

.recent-results {
    width: min(900px, 72vw);
    margin: 15px auto 0;
    padding: 9px 13px 10px;
    border: 1px solid rgba(227, 151, 255, .68);
    border-radius: 13px;
    background: rgba(30, 14, 43, .83);
    box-shadow: 0 0 18px rgba(203, 47, 225, .17), 0 12px 30px rgba(4, 2, 9, .23), inset 0 1px rgba(255, 255, 255, .05);
    backdrop-filter: blur(10px);
}

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.section-title > div { display: flex; align-items: center; gap: 9px; }
.title-icon { color: var(--gold); font-size: 18px; }
.section-title h2 { margin: 0; font: 700 10px var(--font-display); letter-spacing: 1px; }
.section-title > a { color: #e3c2f2; font: 700 8px var(--font-display); letter-spacing: .5px; }
.section-title > a span { color: var(--gold); font-size: 12px; }
.recent-row { display: grid; grid-template-columns: 40px minmax(70px, 1fr) minmax(90px, 1fr) auto; align-items: center; gap: 8px; min-height: 25px; border-top: 1px solid rgba(255, 255, 255, .075); font-size: 10px; }
.round-number { color: #b09db9; font-size: 11px; }
.recent-outcome { color: #fff2ff; font: 700 9px var(--font-display); }
.recent-detail { color: #e1d1e8; font-size: 9px; }
.recent-payout { color: #e5d7ed; text-align: right; font: 700 9px var(--font-display); }
.positive-result { color: #71edaa !important; }
.negative-result { color: #ff8296 !important; }
.empty-results { padding: 15px 0; color: #c1aec9; text-align: center; font-size: 12px; }

.game-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: min(1180px, 88vw);
    margin: auto auto 0;
    padding: 11px 0 3px;
    border-top: 1px solid rgba(213, 153, 246, .14);
    color: #ae98b8;
    font: 600 7px var(--font-display);
    letter-spacing: .8px;
}

.game-footer span:first-child { color: #dfb2f3; }

.guest-game { min-height: 65vh; display: grid; place-items: center; text-align: center; }
.guest-card { width: min(480px, 100%); padding: 40px 25px; border: 1px solid var(--line); border-radius: 20px; background: rgba(27, 14, 39, .9); box-shadow: 0 24px 70px rgba(0, 0, 0, .38); backdrop-filter: blur(15px); }
.guest-symbol { display: block; margin-bottom: 15px; color: var(--gold); font-size: 42px; }
.guest-card > p:not(.eyebrow) { color: var(--muted); }
.guest-cta { max-width: 310px; margin: 24px auto 15px; }
.guest-card > .text-link { display: block; }

#game-result-modal, #jackpot-modal {
    position: fixed;
    z-index: 9998;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(7, 3, 13, .88);
    backdrop-filter: blur(9px);
}

.result-modal-card, .jackpot-modal-card {
    width: min(490px, 100%);
    padding: 28px 22px;
    border: 1px solid rgba(224, 163, 255, .6);
    border-radius: 18px;
    background: linear-gradient(145deg, #321849, #160b23);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 0 28px rgba(191, 55, 215, .13);
    text-align: center;
}

.result-modal-icon, .jackpot-modal-icon { font-size: 45px; }
.result-modal-kicker { color: #e0c2f1; font: 700 8px var(--font-display); letter-spacing: 1.8px; }
.result-modal-title, .jackpot-modal-card h2 { margin: 10px 0; color: var(--gold); font: 900 21px var(--font-display); }
.result-modal-copy, .jackpot-modal-card p { color: #e0d1e8; line-height: 1.5; }
.result-modal-payout { margin: 17px 0; padding: 12px; border-radius: 9px; background: rgba(255, 198, 79, .08); color: #ffe5a4; font: 700 10px var(--font-display); }
.result-modal-continue, .jackpot-close { min-height: 44px; padding: 0 25px; border: 0; border-radius: 9px; background: linear-gradient(100deg, var(--pink), var(--purple)); color: #fff; cursor: pointer; font: 800 10px var(--font-display); }
.result-loss .result-modal-title { color: #ff9bad; }
.jackpot-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.jackpot-boxes button { min-height: 95px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(209, 148, 255, .36); border-radius: 11px; background: #281439; color: white; cursor: pointer; }
.jackpot-boxes button span { font-size: 28px; }
.jackpot-boxes button small { color: #e4c8f4; font: 700 8px var(--font-display); }
.jackpot-boxes button:disabled { opacity: .5; cursor: wait; }
.jackpot-result { color: #eee0f4; line-height: 1.5; }
.jackpot-result strong { color: var(--gold); font-family: var(--font-display); font-size: 13px; }
.jackpot-result p { font-size: 14px; }

.auth-page {
    width: 100%;
    min-height: min(720px, calc(100vh - 170px));
    display: grid;
    place-items: center;
    padding: 34px 16px;
    color: #fff;
}

body:has(.auth-page) main.container {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    background: transparent;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid rgba(220, 155, 255, .3);
    border-radius: 20px;
    background: radial-gradient(ellipse at 50% 0, rgba(142, 55, 190, .2), transparent 55%), rgba(22, 10, 32, .94);
    box-shadow: 0 22px 65px rgba(0, 0, 0, .45);
    backdrop-filter: blur(15px);
}

.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 31px; color: #fff; font: 900 19px var(--font-display); letter-spacing: -.7px; }
.auth-brand em { color: #ff6ac8; font-style: normal; }
.auth-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255, 209, 107, .62); border-radius: 11px; background: linear-gradient(145deg, #572078, #261038); color: #ffe38d; font-size: 22px; }
.auth-heading { margin-bottom: 25px; text-align: center; }
.auth-eyebrow { margin: 0 0 9px; color: #dfb6f1; font: 700 9px var(--font-display); letter-spacing: 2px; }
.auth-heading h1 { margin: 0; color: #fff; font: 800 clamp(22px, 5vw, 29px) var(--font-display); letter-spacing: -1px; }
.auth-description { margin: 10px 0 0; color: #d0bdd8; font-size: 14px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form label { margin-top: 7px; color: #ead4f5; font: 700 9px var(--font-display); letter-spacing: 1.2px; }
.auth-form input { width: 100%; min-height: 49px; padding: 0 13px; border: 1px solid rgba(205, 143, 251, .4); border-radius: 9px; outline: none; background: rgba(17, 8, 26, .95); color: #fff; font-size: 14px; transition: border-color .18s, box-shadow .18s; }
.auth-form input::placeholder { color: #b29dbd; }
.auth-form input:focus { border-color: #d276ed; box-shadow: 0 0 0 3px rgba(168, 59, 255, .16); }
.auth-submit { width: 100%; min-height: 51px; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 15px; border: 1px solid rgba(255, 210, 243, .55); border-radius: 10px; background: linear-gradient(100deg, #f32aa8, #a72eff); color: #fff; cursor: pointer; box-shadow: 0 7px 22px rgba(194, 42, 211, .24); font: 900 11px var(--font-display); letter-spacing: 1px; transition: transform .18s, filter .18s; }
.auth-submit span { color: #ffe18a; font-size: 17px; }
.auth-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-switch { margin-top: 22px; color: #cdb9d5; text-align: center; font-size: 13px; }
.auth-switch a { color: #f0c4ff; font-weight: 700; }
.auth-switch a:hover { color: #fff; }
.auth-demo-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 23px; padding-top: 15px; border-top: 1px solid rgba(196, 128, 232, .17); color: #b6a3bd; font-size: 10px; }
.auth-demo-note span { color: #e0b7f4; }
body:has(.auth-page) > footer { width: min(1180px, calc(100% - 40px)); }

.panel { border: 1px solid var(--line); border-radius: 14px; background: rgba(26, 14, 37, .88); }
.table-wrap { overflow-x: auto; padding: 12px; }
.table-wrap table { width: 100%; border-collapse: collapse; color: #f0e2f5; font-size: 13px; }
.table-wrap th, .table-wrap td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; white-space: nowrap; }
.table-wrap th { color: #e8cbf5; font: 700 9px var(--font-display); letter-spacing: .6px; }

.wallet-page { width: min(1120px, 100%); margin: 22px auto 34px; }
.wallet-page-heading { margin-bottom: 17px; text-align: center; }
.wallet-page-heading h1 { margin: 3px 0 7px; color: #fff; font: 900 clamp(24px, 5vw, 36px) var(--font-display); }
.wallet-page-heading h1 span { color: var(--gold); }
.wallet-page-heading > p:last-child { margin: 0; color: #e6d5ee; }
.wallet-page-heading strong { color: var(--gold); }
.wallet-notice { margin: 12px 0; padding: 13px 15px; border: 1px solid rgba(255, 209, 107, .38); border-radius: 11px; background: rgba(63, 43, 21, .58); color: #f8e8bd; font-size: 13px; line-height: 1.5; }
.wallet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wallet-card { min-width: 0; margin-top: 16px; padding: 18px; border: 1px solid rgba(221, 151, 255, .3); border-radius: 14px; background: rgba(25, 13, 37, .9); box-shadow: 0 14px 36px rgba(0, 0, 0, .24); backdrop-filter: blur(12px); }
.wallet-actions .wallet-card { margin-top: 0; }
.wallet-card h2 { margin: 0 0 8px; color: #fff1ca; font: 800 13px var(--font-display); letter-spacing: .4px; }
.wallet-help { display: block; margin: 0 0 12px; color: #c9b8d0; font-size: 12px; line-height: 1.45; }
.upi-destination { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; padding: 11px; border: 1px solid rgba(255, 209, 107, .3); border-radius: 9px; background: rgba(255, 209, 107, .06); }
.upi-destination span { color: #d3bfdc; font: 700 8px var(--font-display); letter-spacing: 1px; }
.upi-destination strong { color: #ffe4a0; overflow-wrap: anywhere; }
.wallet-qr { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 12px 0; color: #d7c6de; font-size: 11px; }
.wallet-qr img { width: min(210px, 100%); aspect-ratio: 1; object-fit: contain; padding: 8px; border-radius: 11px; background: #fff; }
.wallet-form { display: flex; flex-direction: column; gap: 8px; }
.wallet-form > label:not(.inline-check) { margin-top: 5px; color: #ead4f5; font: 700 8px var(--font-display); letter-spacing: .8px; }
.wallet-form input:not([type="checkbox"]), .wallet-form select { width: 100%; min-width: 0; min-height: 43px; padding: 8px 11px; border: 1px solid rgba(205, 143, 251, .36); border-radius: 8px; background: rgba(17, 8, 26, .95); color: #fff; font-size: 13px; }
.wallet-form input[type="file"] { padding: 7px; font-size: 11px; }
.wallet-form input[type="file"]::file-selector-button { margin-right: 8px; padding: 6px 9px; border: 0; border-radius: 6px; background: #57366a; color: #fff; }
.wallet-submit { min-height: 45px; margin: 10px 0 0; padding: 0 15px; font-size: 9px; }
.wallet-table-wrap { overflow-x: auto; }
.wallet-table { width: 100%; border-collapse: collapse; color: #f0e2f5; font-size: 12px; }
.wallet-table th, .wallet-table td { padding: 10px 9px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; vertical-align: top; }
.wallet-table th { color: #e8cbf5; font: 700 8px var(--font-display); letter-spacing: .6px; white-space: nowrap; }
.wallet-table td small { color: #b7a4c0; }
.wallet-table td a { color: #ffe4a0; text-decoration: underline; }
.wallet-status { font: 700 8px var(--font-display); letter-spacing: .5px; }
.status-pending { color: #ffd16b; }
.status-approved, .status-paid { color: #71edaa; }
.status-rejected { color: #ff8296; }
@keyframes marquee-glow {
    from { filter: brightness(.82); }
    to { filter: brightness(1.25); }
}

@keyframes disco-flash {
    from { filter: brightness(.75) saturate(1); opacity: .68; }
    to { filter: brightness(2.1) saturate(1.4); opacity: 1; }
}

@keyframes casino-ambient {
    from { background-position: 0% 15%; }
    to { background-position: 100% 85%; }
}

@media (max-width: 980px) {
    .game-board {
        grid-template-columns: minmax(0, 1.55fr) minmax(180px, .95fr);
        gap: 18px;
        padding: 12px 16px;
    }

    .wheel-wrap { width: min(100%, 36vw, 440px); }
}

@media (max-width: 760px) {
    main.container { width: calc(100% - 26px); }
    .topbar { width: calc(100% - 26px); }
    body > .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
    .topbar nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .topbar nav a, .topbar nav b { font-size: 11px; }
    .demo-banner { font-size: 7px; letter-spacing: .6px; }
    body > footer { width: calc(100% - 26px); font-size: 7px; }

    .game-shell { padding: 8px 13px 12px; }
    .game-top, .demo-strip { width: 100%; }
    .game-top { align-items: flex-start; gap: 12px; padding-bottom: 12px; }
    body:has(.game-shell) .demo-banner { width: calc(100% - 26px); }
    .brand-mark { width: 41px; height: 41px; border-radius: 12px; font-size: 22px; }
    .brand-copy strong { font-size: clamp(15px, 4vw, 21px); }
    .brand-copy small { font-size: 7px; letter-spacing: 1.45px; }
    .player-info { gap: 6px; }
    .player-pill, .wallet-pill { min-height: 40px; padding: 5px 8px; gap: 6px; }
    .player-avatar, .wallet-pill .coin-mark { font-size: 15px; }
    .player-pill small, .wallet-pill small { font-size: 6px; letter-spacing: .7px; }
    .player-pill strong, .wallet-pill strong { font-size: 9px; }
    .sound-toggle { min-height: 34px; padding: 0 8px; font-size: 7px; }
    .logout-button { width: 33px; height: 33px; }
    .demo-strip { min-height: 28px; gap: 6px; font-size: 6.5px; letter-spacing: .55px; }

    .game-layout { padding-top: 19px; }
    .game-layout { padding-bottom: 88px; }
    .game-heading { margin-bottom: 15px; }
    .game-heading h1 { font-size: 28px; }
    .heading-note { font-size: 13px; }
    .game-board { width: 100%; grid-template-columns: 1fr; gap: 16px; padding: 17px 16px; border-radius: 18px; }
    .wheel-wrap { width: min(100%, 490px); }
    .wheel-rim { padding: 3.5%; }
    .wheel-label { font-size: clamp(7px, 2.6cqw, 12px); }
    .wheel-center { border-width: 3px; }
    .wheel-legend { gap: 10px 13px; margin-top: 15px; font-size: 7px; }
    .play-panel { padding: 16px; }
    .stake-input-wrap { min-height: 52px; }
    .main-spin-button { min-height: 55px; }
    .spin-message { min-height: 25px; }
    .recent-results { width: 100%; margin-top: 15px; padding: 13px 14px; }
    .recent-row { grid-template-columns: 45px minmax(70px, 1fr) minmax(55px, .7fr) minmax(62px, .8fr); gap: 7px; min-height: 37px; }
    .recent-outcome, .recent-payout { font-size: 8px; }
    .recent-detail { font-size: 10px; }
    .game-footer { flex-direction: column; align-items: center; text-align: center; font-size: 6px; }
    .wallet-page { margin-top: 14px; }
    .wallet-actions { grid-template-columns: 1fr; gap: 12px; }
    .wallet-card { padding: 14px; }
    .wallet-table { min-width: 620px; }
    .play-panel .main-spin-button { display: none; }
    .mobile-game-actions {
        position: fixed;
        z-index: 20;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: minmax(0, .95fr) minmax(0, 1.3fr) minmax(0, .95fr);
        gap: 8px;
        padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 219, 148, .45);
        background: linear-gradient(180deg, rgba(28, 12, 39, .96), rgba(13, 7, 20, .98));
        box-shadow: 0 -8px 26px rgba(6, 2, 12, .48), 0 0 20px rgba(193, 47, 213, .15);
        backdrop-filter: blur(14px);
    }

    .mobile-game-action {
        min-width: 0;
        min-height: 53px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 5px 3px;
        border: 1px solid rgba(221, 151, 255, .34);
        border-radius: 10px;
        background: linear-gradient(145deg, rgba(63, 26, 78, .92), rgba(30, 13, 43, .96));
        color: #fff3d4;
        font: 800 7px var(--font-display);
        letter-spacing: .45px;
        cursor: pointer;
    }

    .mobile-game-action svg { width: 17px; height: 17px; flex: none; }
    .mobile-credits-action strong { color: #f6d78e; font: 600 8px var(--font-body); letter-spacing: .2px; }
    .mobile-spin-action {
        border-color: #ffdc8d;
        background: linear-gradient(105deg, #9b5b13, #f1bd4e 48%, #9b5b13);
        box-shadow: 0 0 15px rgba(255, 196, 74, .3), inset 0 1px rgba(255, 248, 215, .38);
        color: #fff;
        font-size: 9px;
    }
    .mobile-spin-action svg { width: 19px; height: 19px; }
    .mobile-game-action:disabled { opacity: .48; cursor: not-allowed; }

    body:has(.auth-page) main.container { padding: 0 10px; }
    .auth-page { min-height: 0; flex: 1; padding: 25px 5px; }
    .auth-card { padding: 25px 19px; border-radius: 16px; }
    .auth-brand { margin-bottom: 25px; font-size: 17px; }
    .auth-heading h1 { font-size: 22px; }
}

@media (max-width: 620px) {
    body > .topbar { min-height: 57px; }
    .topbar .brand { font-size: 14px; }
    .topbar nav { gap: 8px; }
    .topbar nav a { font-size: 10px; }

    .game-top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand sound" "player player";
        row-gap: 8px;
    }

    .game-brand { grid-area: brand; }
    .player-info { grid-area: player; width: 100%; justify-content: space-between; }
    .sound-toggle { grid-area: sound; }
    .player-pill, .wallet-pill { flex: 1 1 0; min-width: 0; }
    .player-pill strong { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sound-toggle { flex: none; }
    .logout-form { flex: none; }
    .game-heading h1 { font-size: 25px; }
    .game-board { gap: 13px; padding: 14px 11px; }
    .wheel-legend { gap: 9px 11px; font-size: 6px; }
    .panel-label { font-size: 8px; }
    .recent-results { padding: 12px 10px; }
    .recent-row { grid-template-columns: 37px minmax(58px, 1fr) minmax(48px, .7fr) minmax(58px, .8fr); gap: 5px; }
    .recent-detail { font-size: 9px; }
    .recent-outcome, .recent-payout { font-size: 7px; }
    .section-title h2 { font-size: 9px; }
    .section-title > a { font-size: 7px; }
    .wallet-table { min-width: 570px; }
}

@media (max-width: 380px) {
    .brand-copy small { letter-spacing: .8px; }
    .player-info { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) auto; gap: 5px; }
    .player-pill, .wallet-pill { min-width: 0; padding-right: 6px; padding-left: 6px; }
    .player-pill > span:last-child { min-width: 0; }
    .player-pill strong { max-width: 65px; }
    .sound-toggle { padding: 0 6px; font-size: 6px; }
    .logout-form { grid-column: 3; justify-self: end; }
    .recent-row { grid-template-columns: 32px minmax(52px, 1fr) minmax(42px, .65fr) minmax(53px, .8fr); gap: 4px; }
    .recent-detail { font-size: 8px; }
    .recent-outcome, .recent-payout { font-size: 6.5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .main-spin-button::after { display: none; }
    .wheel-wrap.disco-lights .marquee-bulb { animation: none; }
}
