:root {
    --bg: #081922;
    --bg-2: #102633;
    --panel: #132a35;
    --panel-2: #1c3a47;
    --line: rgba(255,255,255,.09);
    --text: #f3f9fc;
    --muted: #9ebbc8;
    --blue: #2383e8;
    --blue-2: #9bd8ee;
    --gold: #f7c948;
    --emerald: #2dd4bf;
    --danger: #fb7185;
    --ok: #34d399;
    --shadow: 0 18px 60px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #102633 0%, #081922 48%, #07131b 100%); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: 0; }
td small, .muted { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.75rem; line-height: 1.08; margin-bottom: .5rem; }
h2 { font-size: 1.1rem; margin-bottom: .8rem; }
h3 { font-size: 1rem; }

.auth-shell { display: grid; place-items: center; padding: 1rem; }
.auth-wrap { width: min(100%, 430px); }
.auth-card, .panel, .table-card, .sport-card, .chat-panel, .result-panel { background: color-mix(in srgb, var(--panel), black 8%); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.auth-card { padding: 1.2rem; }
.brand-lockup, .brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-lockup { margin-bottom: 1rem; }
.brand-lockup span, .admin-top span { display: block; color: var(--muted); font-size: .82rem; }
.logo-square { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; color: white; font-weight: 900; background: linear-gradient(135deg, #2383e8, #2dd4bf 130%); border: 1px solid rgba(255,255,255,.2); flex: 0 0 auto; }

.topbar { position: sticky; top: 0; z-index: 20; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; background: rgba(9,7,15,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { font-weight: 850; }
.desktop-layout { display: block; }
.desktop-nav { display: none; }
.content { width: min(1180px, 100%); margin: 0 auto; padding: 1rem 1rem 6rem; }
.bottom-nav { position: fixed; z-index: 25; left: .7rem; right: .7rem; bottom: .7rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; padding: .35rem; background: rgba(18,16,26,.93); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.bottom-nav a { color: var(--muted); text-align: center; font-size: .76rem; padding: .65rem .25rem; border-radius: 7px; }
.bottom-nav a:hover,
.desktop-nav a:hover,
.desktop-nav button:hover,
.admin-sidebar a:hover { color: white; background: rgba(35,131,232,.18); }

.hero-app, .game-stage { position: relative; overflow: hidden; display: grid; gap: 1rem; padding: 1.2rem; min-height: 190px; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(28,58,71,.96), rgba(8,25,34,.9)), radial-gradient(circle at 80% 15%, rgba(45,212,191,.2), transparent 16rem); box-shadow: var(--shadow); }
.hero-app p, .game-stage p { color: var(--muted); max-width: 55rem; }
.hero-balance { align-self: end; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); }
.hero-balance span, .balance-pill span { display: block; color: var(--muted); font-size: .8rem; }
.hero-balance strong { display: block; font-size: 2rem; color: white; }
.balance-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .55rem .8rem; border-radius: 8px; background: rgba(45,212,191,.11); border: 1px solid rgba(45,212,191,.3); color: white; font-weight: 800; white-space: nowrap; }
.balance-pill.large { font-size: 1.15rem; }

.eyebrow { color: var(--emerald); font-size: .76rem; text-transform: uppercase; letter-spacing: 0; font-weight: 800; margin-bottom: .35rem; }
.quick-grid, .game-grid, .metric-strip, .two-col, .vip-track, .sports-list { display: grid; gap: .8rem; margin: 1rem 0; }
.quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-card, .game-card, .vip-card { border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); padding: 1rem; min-height: 118px; }
.action-card span, .game-chip, .vip-card span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: 0; }
.action-card strong, .game-card h2, .game-card h3 { display: block; margin-top: .3rem; }
.game-card { min-height: 180px; transition: transform .18s ease, border-color .18s ease; }
.game-card:hover { transform: translateY(-2px); border-color: rgba(155,216,238,.52); }
.game-card p { color: var(--muted); min-height: 3rem; }
.game-chip { display: inline-flex; padding: .28rem .48rem; border-radius: 7px; background: rgba(35,131,232,.15); color: var(--blue-2); }
.metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-strip div { padding: .9rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.metric-strip span { display: block; color: var(--muted); font-size: .75rem; margin-bottom: .25rem; }
.metric-strip strong { font-size: 1.05rem; }
.section-head, .admin-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.35rem 0 .8rem; }
.section-head h1, .section-head h2, .admin-title h1 { margin: 0; }
.two-col { grid-template-columns: 1fr; }
.panel { padding: 1rem; }
.table-card { overflow-x: auto; margin: 1rem 0; }
.table-card table { min-width: 680px; }
.mini-list { display: grid; gap: .6rem; }
.mini-list div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .25rem .8rem; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); }
.mini-list small { grid-column: 1 / -1; }

.stack-form { display: grid; gap: .85rem; }
.form-grid, .admin-form-grid { display: grid; gap: .75rem; }
label { display: grid; gap: .38rem; color: var(--muted); font-size: .86rem; }
input, select, textarea { width: 100%; color: white; background: #0b202b; border: 1px solid #315361; border-radius: 8px; padding: .75rem .8rem; outline: none; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(35,131,232,.72); box-shadow: 0 0 0 3px rgba(35,131,232,.14); }
.primary-button, .secondary-button, .ghost-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .65rem .9rem; border-radius: 8px; border: 1px solid transparent; color: white; font-weight: 800; }
.primary-button { background: linear-gradient(135deg, #2383e8, #1ca8c7); border-color: rgba(255,255,255,.13); }
.secondary-button { background: rgba(45,212,191,.12); border-color: rgba(45,212,191,.38); }
.ghost-button { background: rgba(255,255,255,.05); border-color: var(--line); }
.danger-button { background: rgba(251,113,133,.14); border-color: rgba(251,113,133,.42); }
.inline-link { display: inline-block; margin-top: 1rem; color: var(--blue-2); }
.inline-form, .action-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-width: 140px; }

.notice { margin: .8rem 0; padding: .75rem .9rem; border-radius: 8px; border: 1px solid var(--line); }
.notice-success { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.32); }
.notice-error, .status-danger { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.35); }
.status-banner { margin-bottom: 1rem; padding: .8rem; border-radius: 8px; background: rgba(247,201,72,.12); border: 1px solid rgba(247,201,72,.35); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: .2rem .45rem; border-radius: 7px; border: 1px solid var(--line); color: white; background: rgba(255,255,255,.06); font-size: .78rem; margin: .12rem; }
.badge.ok { border-color: rgba(52,211,153,.38); background: rgba(52,211,153,.12); }
.badge.warn { border-color: rgba(247,201,72,.38); background: rgba(247,201,72,.12); }
.vault-box { padding: .8rem; border-radius: 8px; border: 1px dashed rgba(247,201,72,.45); background: rgba(247,201,72,.08); }
.vault-box span { display: block; color: var(--muted); font-size: .8rem; }

.result-panel { padding: 1rem; margin: 1rem 0; border-color: rgba(247,201,72,.35); }
.result-panel.win { border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.08); }
.result-panel.lose { border-color: rgba(251,113,133,.38); background: rgba(251,113,133,.08); }
.result-panel pre { white-space: pre-wrap; color: var(--muted); background: rgba(0,0,0,.25); padding: .75rem; border-radius: 8px; overflow-x: auto; }
.game-limits { display: flex; align-items: end; gap: .5rem; flex-wrap: wrap; }
.game-limits span { padding: .45rem .6rem; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted); }
.coin-visual { width: 112px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin: .4rem auto; font-weight: 900; font-size: 1.6rem; color: #1b102c; background: radial-gradient(circle at 32% 28%, #fff4b8, var(--gold)); box-shadow: 0 15px 42px rgba(247,201,72,.24); transition: transform .7s ease; }
.coin-visual.spinning { transform: rotateY(720deg) scale(1.04); }
.roulette-strip { display: grid; grid-template-columns: repeat(10, minmax(28px, 1fr)); gap: .35rem; padding: .6rem; border-radius: 8px; background: rgba(0,0,0,.25); overflow: hidden; }
.roulette-strip span { height: 52px; border-radius: 7px; border: 1px solid rgba(255,255,255,.12); }
.roulette-strip .blue { background: #2383e8; }
.roulette-strip .onyx { background: #111827; }
.roulette-strip .gold { background: var(--gold); }
.roulette-strip .royal { background: linear-gradient(135deg, var(--blue), var(--emerald)); }
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.mines-grid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; background: rgba(35,131,232,.16); border: 1px solid var(--line); color: var(--muted); }
.blackjack-table { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: .8rem; border-radius: 8px; background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.24); }
.blackjack-table div { min-height: 110px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }

.blackjack-room {
    display: grid;
    gap: .8rem;
    margin: -.35rem -1rem -5.4rem;
    padding: .7rem .85rem 6rem;
    background: #102633;
}

.blackjack-tabletop {
    position: relative;
    min-height: 392px;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    gap: .45rem;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(35,131,232,.13), transparent 11rem),
        #0b202b;
    border: 1px solid rgba(255,255,255,.04);
    perspective: 900px;
}

.blackjack-deck {
    position: absolute;
    top: -.6rem;
    right: 1.45rem;
    width: 54px;
    height: 70px;
    border-radius: 7px;
    background: linear-gradient(160deg, #2383e8, #0d66d6);
    border: 3px solid #dff4ff;
    box-shadow: 0 4px 0 #082432, 0 14px 28px rgba(0,0,0,.28);
}

.blackjack-deck::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.42);
}

.blackjack-room.is-animating .blackjack-deck {
    animation: bj-deck-pulse .72s ease-in-out infinite alternate;
}

.blackjack-side {
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: .45rem;
    padding: .85rem .55rem;
}

.player-side {
    align-content: start;
}

.blackjack-hands {
    display: grid;
    gap: .55rem;
    width: 100%;
    justify-items: center;
}

.blackjack-hand-row {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1.15rem;
}

.bj-hand {
    display: grid;
    justify-items: center;
    gap: .25rem;
    width: 100%;
    min-width: 0;
}

.bj-hand small {
    color: #8fb1c0;
    font-size: .72rem;
    font-weight: 850;
}

.bj-hand.is-active .bj-card {
    box-shadow: 0 0 0 2px #20e66b, 0 12px 24px rgba(0,0,0,.25);
}

.blackjack-total {
    min-width: 48px;
    min-height: 24px;
    display: grid;
    place-items: center;
    padding: .12rem .65rem;
    border-radius: 999px;
    color: white;
    background: #315361;
    font-weight: 950;
    line-height: 1;
}

.bj-card {
    position: relative;
    width: 54px;
    height: 74px;
    display: grid;
    grid-template-rows: auto 1fr;
    padding: .35rem .42rem;
    margin-left: -1.15rem;
    border-radius: 7px;
    color: #111827;
    background: #fbfdff;
    border: 1px solid rgba(8,25,34,.22);
    box-shadow: 0 10px 22px rgba(0,0,0,.24);
    transform: rotate(var(--rotate, 0deg));
    transform-style: preserve-3d;
}

.bj-card:nth-child(2) { --rotate: 1.5deg; }
.bj-card:nth-child(3) { --rotate: -1.8deg; }
.bj-card:nth-child(4) { --rotate: 2.2deg; }
.bj-card:nth-child(5) { --rotate: -2.4deg; }

.bj-card strong {
    font-size: 1rem;
    line-height: .9;
}

.bj-card em {
    align-self: center;
    justify-self: center;
    font-size: 1.6rem;
    font-style: normal;
    line-height: 1;
}

.bj-card.is-red {
    color: #ef2547;
}

.bj-card.is-black {
    color: #102633;
}

.bj-card.is-hidden,
.bj-card.is-empty-card {
    place-items: center;
    color: #dff4ff;
    background:
        linear-gradient(135deg, rgba(255,255,255,.16), transparent 35%),
        linear-gradient(160deg, #2383e8, #0d66d6);
    border-color: rgba(255,255,255,.56);
}

.bj-card.is-hidden i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 44px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.5);
    font-style: normal;
    font-size: .72rem;
    font-weight: 950;
}

.bj-card.is-entering,
.bj-card.is-revealing {
    pointer-events: none;
    will-change: transform, opacity;
}

.bj-card.is-entering {
    animation: bj-card-deal .56s cubic-bezier(.16,.92,.3,1.08) var(--deal-delay, 0ms) both;
}

.bj-card.is-revealing {
    animation: bj-card-reveal .5s ease var(--deal-delay, 0ms) both;
}

.bj-card.is-entering::after,
.bj-card.is-revealing::after {
    content: "RB";
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border-radius: inherit;
    color: #dff4ff;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .03em;
    border: 1px solid rgba(255,255,255,.55);
    background:
        linear-gradient(135deg, rgba(255,255,255,.16), transparent 35%),
        linear-gradient(160deg, #2383e8, #0d66d6);
    box-shadow: inset 0 0 0 7px rgba(255,255,255,.08);
    animation: bj-card-cover .46s ease calc(var(--deal-delay, 0ms) + 120ms) both;
}

.bj-card.is-hidden.is-entering::after {
    animation: none;
}

.bj-card.is-revealing::after {
    animation-delay: var(--deal-delay, 0ms);
}

@keyframes bj-card-deal {
    0% {
        opacity: .18;
        transform: translate(var(--from-x, 80px), var(--from-y, -120px)) scale(.72) rotate(8deg);
    }
    62% {
        opacity: 1;
        transform: translate(6px, -8px) scale(1.04) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(var(--rotate, 0deg));
    }
}

@keyframes bj-card-reveal {
    0% {
        transform: rotate(var(--rotate, 0deg)) rotateY(180deg) scale(.96);
    }
    100% {
        transform: rotate(var(--rotate, 0deg)) rotateY(0deg) scale(1);
    }
}

@keyframes bj-card-cover {
    0%, 54% {
        opacity: 1;
        transform: rotateY(0deg);
    }
    100% {
        opacity: 0;
        transform: rotateY(86deg);
        visibility: hidden;
    }
}

@keyframes bj-deck-pulse {
    from {
        transform: translateY(0);
        box-shadow: 0 4px 0 #082432, 0 14px 28px rgba(0,0,0,.28);
    }
    to {
        transform: translateY(-3px);
        box-shadow: 0 4px 0 #082432, 0 18px 34px rgba(35,131,232,.28);
    }
}

.bj-card.is-empty-card {
    opacity: .38;
    font-size: 1.5rem;
    font-weight: 900;
}

.blackjack-rules-ribbon {
    justify-self: center;
    min-width: 190px;
    display: grid;
    gap: .14rem;
    color: #8baebe;
    text-transform: uppercase;
    text-align: center;
    font-size: .58rem;
    font-weight: 850;
}

.blackjack-rules-ribbon span:first-child {
    padding: .24rem .55rem;
    color: #a9c7d5;
    background: #112d3a;
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
}

.blackjack-controls {
    display: grid;
    gap: .7rem;
    padding: .75rem;
    border-radius: 0 0 8px 8px;
    background: #17313d;
}

.blackjack-status {
    min-height: 24px;
    color: #c8dee8;
    font-size: .86rem;
    font-weight: 850;
}

.blackjack-bet-form {
    display: grid;
    gap: .7rem;
}

.blackjack-bet-form.is-disabled {
    opacity: .72;
}

.blackjack-main-button {
    width: 100%;
    min-height: 42px;
}

.blackjack-bet-form label {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    color: #b9d5e1;
    font-weight: 850;
}

.blackjack-bet-form label span {
    color: #9ebbc8;
    font-size: .75rem;
}

.blackjack-bet-form input {
    grid-column: 1 / -1;
    min-height: 44px;
    color: #e9f6ff;
    background: #0b202b;
}

.blackjack-action-grid,
.blackjack-insurance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.blackjack-action-grid button,
.blackjack-insurance button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: #3b5c6c;
    font-weight: 900;
}

.blackjack-action-grid button:disabled,
.blackjack-insurance button:disabled {
    color: #87a6b6;
    background: #244452;
}

.blackjack-insurance {
    display: none;
}

.blackjack-insurance.is-visible {
    display: grid;
}

.blackjack-insurance button:first-child {
    background: #2383e8;
}

.blackjack-meta-bar {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    padding: .75rem;
    border-radius: 8px;
    background: #102633;
    color: #a9c7d5;
    font-size: .8rem;
    font-weight: 850;
}

.blackjack-meta-bar strong {
    color: white;
}

.blackjack-history {
    box-shadow: none;
}

.mines-room {
    display: grid;
    gap: .8rem;
    margin: -.35rem -1rem -5.4rem;
    padding: .7rem .85rem 6rem;
    background: #102633;
}

.mines-board-wrap {
    padding: .8rem;
    border-radius: 8px 8px 0 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(35,131,232,.13), transparent 12rem),
        #0b202b;
    border: 1px solid rgba(255,255,255,.04);
}

.mines-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .42rem;
    width: min(100%, 430px);
    margin: 0 auto;
}

.mine-tile {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    min-width: 0;
    border: 0;
    border-radius: 8px;
    color: #dff4ff;
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), transparent),
        #2d4c5b;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.16), 0 9px 18px rgba(0,0,0,.22);
    transition: transform .16s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
    overflow: hidden;
}

.mine-tile:not(:disabled):active {
    transform: translateY(2px) scale(.98);
}

.mine-tile::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 7px;
    background: rgba(255,255,255,.04);
    transform: scale(.7);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}

.mine-tile:not(:disabled):hover::before {
    opacity: 1;
    transform: scale(1);
}

.mine-tile span {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 72%;
    height: 72%;
    border-radius: 9px;
    font-size: clamp(1.25rem, 8vw, 2rem);
    font-weight: 950;
    line-height: 1;
}

.mine-tile.is-safe {
    color: #e6fff6;
    background: linear-gradient(145deg, #20b486, #34d399);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 0 0 1px rgba(112,255,205,.25), 0 14px 24px rgba(32,180,134,.18);
}

.mine-tile.is-safe span {
    background: radial-gradient(circle, rgba(255,255,255,.42), transparent 62%);
    text-shadow: 0 2px 9px rgba(0,0,0,.22);
}

.mine-tile.is-mine {
    color: white;
    background: linear-gradient(145deg, #ff335f, #a90f32);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 0 0 1px rgba(255,94,128,.28), 0 16px 26px rgba(255,51,95,.2);
}

.mine-tile.is-hit {
    animation: mines-hit .48s ease both;
}

.mine-tile.is-new {
    animation: mines-reveal .48s cubic-bezier(.16,.92,.3,1.08) var(--tile-delay, 0ms) both;
}

.mines-board.is-lost {
    animation: mines-board-shake .34s ease both;
}

.mines-board.is-cashed .mine-tile.is-safe {
    animation: mines-cash-glow .8s ease both;
}

.mines-controls {
    display: grid;
    gap: .7rem;
    padding: .75rem;
    border-radius: 0 0 8px 8px;
    background: #17313d;
}

.mines-status {
    min-height: 24px;
    color: #c8dee8;
    font-size: .86rem;
    font-weight: 850;
}

.mines-bet-form {
    display: grid;
    gap: .7rem;
}

.mines-main-button,
.mines-cashout-button,
.mines-random-button {
    width: 100%;
    min-height: 42px;
}

.mines-random-button {
    border: 0;
    border-radius: 8px;
    color: #a9c7d5;
    background: #244452;
    font-weight: 900;
}

.mines-random-button:not(:disabled) {
    color: white;
    background: #315361;
}

.mines-bet-form label {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    color: #b9d5e1;
    font-weight: 850;
}

.mines-bet-form label span {
    color: #9ebbc8;
    font-size: .75rem;
}

.mines-bet-form input,
.mines-bet-form select {
    grid-column: 1 / -1;
    min-height: 44px;
    color: #e9f6ff;
    background: #0b202b;
}

.mines-profit-line {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    color: #b9d5e1;
    font-size: .86rem;
    font-weight: 850;
}

.mines-profit-line strong {
    color: white;
}

.mines-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
    padding: .25rem;
    border-radius: 999px;
    background: #0b202b;
}

.mines-mode-switch button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: transparent;
    font-weight: 950;
}

.mines-mode-switch button.is-active {
    background: #426477;
}

.mines-meta-bar {
    margin-top: .1rem;
}

.roulette-room {
    display: grid;
    gap: .8rem;
    margin: -.35rem -1rem -5.4rem;
    padding: .7rem .85rem 6rem;
    background: #102633;
}

.roulette-stage {
    display: grid;
    gap: .75rem;
    padding: .8rem;
    border-radius: 8px 8px 0 0;
    background:
        radial-gradient(circle at 50% 25%, rgba(35,131,232,.16), transparent 13rem),
        #0b202b;
    border: 1px solid rgba(255,255,255,.04);
    overflow: hidden;
}

.roulette-wheel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 112px;
    margin: 0 -.8rem;
    overflow: hidden;
}

.roulette-wheel {
    display: flex;
    gap: .42rem;
    will-change: transform;
}

.roulette-selector {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: .25rem;
    bottom: .25rem;
    width: 3px;
    border-radius: 99px;
    background: #dff4ff;
    box-shadow: 0 0 18px rgba(223,244,255,.48);
    transform: translateX(-50%);
}

.roulette-slot {
    flex: 0 0 74px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: white;
    border: 1px solid rgba(255,255,255,.11);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 10px 22px rgba(0,0,0,.22);
    overflow: hidden;
}

.roulette-slot i {
    font-style: normal;
    font-size: .74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.roulette-blue {
    background: linear-gradient(145deg, #2383e8, #0b63d7);
}

.roulette-onyx {
    background: linear-gradient(145deg, #314653, #111827);
}

.roulette-gold {
    color: #1f2937;
    background: linear-gradient(145deg, #ffe084, #f7b733);
}

.roulette-royal {
    background: linear-gradient(145deg, #23e7a8, #2383e8 55%, #0f2b65);
}

.roulette-slot.is-hit {
    animation: roulette-hit .75s ease both;
}

.roulette-result-card {
    display: grid;
    gap: .15rem;
    justify-items: center;
    padding: .7rem;
    border-radius: 8px;
    background: #112d3a;
    border: 1px solid rgba(255,255,255,.06);
}

.roulette-result-card span {
    color: #9ebbc8;
    font-size: .76rem;
    font-weight: 850;
}

.roulette-result-card strong {
    color: white;
    font-size: 1.1rem;
}

.roulette-result-card.is-win {
    border-color: rgba(52,211,153,.28);
    box-shadow: 0 0 22px rgba(52,211,153,.12);
}

.roulette-recent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 22px;
    overflow: hidden;
}

.roulette-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 5px 12px rgba(0,0,0,.22);
}

.roulette-controls {
    display: grid;
    gap: .7rem;
    padding: .75rem;
    border-radius: 0 0 8px 8px;
    background: #17313d;
}

.roulette-status {
    min-height: 24px;
    color: #c8dee8;
    font-size: .86rem;
    font-weight: 850;
}

.roulette-bet-form {
    display: grid;
    gap: .75rem;
}

.roulette-bet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.roulette-bet-option {
    position: relative;
    gap: .5rem;
    min-width: 0;
    padding: .7rem;
    border-radius: 8px;
    color: white;
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}

.roulette-bet-option::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,.1), transparent 42%);
    pointer-events: none;
}

.roulette-bet-option span,
.roulette-bet-option input {
    position: relative;
    z-index: 1;
}

.roulette-bet-option span {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    color: white;
    font-weight: 950;
}

.roulette-bet-option span strong {
    white-space: nowrap;
}

.roulette-bet-option input {
    min-height: 42px;
    border-color: rgba(255,255,255,.16);
    background: rgba(8,25,34,.72);
}

.roulette-total-line {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    color: #b9d5e1;
    font-size: .86rem;
    font-weight: 850;
}

.roulette-total-line strong {
    color: white;
}

.roulette-main-button {
    min-height: 42px;
}

.roulette-meta-bar {
    margin-top: .1rem;
}

.is-roulette-busy .roulette-main-button {
    opacity: .72;
}

.admin-roulette-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

@keyframes mines-reveal {
    0% {
        opacity: .35;
        transform: translateY(-18px) scale(.76) rotateX(70deg);
    }
    72% {
        opacity: 1;
        transform: translateY(3px) scale(1.08) rotateX(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

@keyframes mines-hit {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.12) rotate(-4deg); }
    65% { transform: scale(1.04) rotate(4deg); }
}

@keyframes mines-board-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

@keyframes mines-cash-glow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.28); }
    100% { filter: brightness(1); }
}

@keyframes roulette-hit {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    45% { transform: scale(1.12); filter: brightness(1.28); }
}

@media (prefers-reduced-motion: reduce) {
    .blackjack-room.is-animating .blackjack-deck,
    .bj-card.is-entering,
    .bj-card.is-revealing,
    .bj-card.is-entering::after,
    .bj-card.is-revealing::after {
        animation: none;
    }
    .mine-tile.is-new,
    .mine-tile.is-hit,
    .mines-board.is-lost,
    .mines-board.is-cashed .mine-tile.is-safe,
    .roulette-slot.is-hit {
        animation: none;
    }
}

.vip-track { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.vip-card { border-color: color-mix(in srgb, var(--vip), white 10%); background: linear-gradient(180deg, color-mix(in srgb, var(--vip), transparent 86%), rgba(255,255,255,.03)); }
.vip-card strong { display: block; margin: .35rem 0; }

.daily-gift-card {
    display: grid;
    gap: .75rem;
    align-content: start;
    background:
        linear-gradient(145deg, rgba(35,131,232,.18), rgba(124,58,237,.08)),
        #102633;
}

.daily-gift-amount {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: white;
}

.profile-list { display: grid; gap: .6rem; margin: 0; }
.profile-list div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .55rem; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; text-align: right; }
.sport-card { padding: 1rem; display: grid; gap: .8rem; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.market-button { display: grid; gap: .4rem; }
.market-button button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: .7rem; border-radius: 8px; color: white; background: rgba(35,131,232,.14); border: 1px solid rgba(35,131,232,.35); }
.chat-panel { padding: .8rem; }
.chat-messages { display: grid; gap: .6rem; max-height: 58vh; overflow: auto; padding-right: .2rem; }
.chat-message { padding: .7rem; border-radius: 8px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.chat-message span { color: var(--muted); font-size: .78rem; margin-left: .4rem; }
.chat-message p { margin: .35rem 0 0; color: #eee8ff; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; margin-top: .8rem; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); }

.admin-shell { display: grid; min-height: 100vh; background: var(--bg); }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 246px; transform: translateX(-100%); padding: 1rem; background: #0d0a14; border-right: 1px solid var(--line); z-index: 30; overflow-y: auto; }
.admin-sidebar nav { display: grid; gap: .25rem; margin-top: 1rem; }
.admin-sidebar a { padding: .7rem .75rem; border-radius: 8px; color: var(--muted); }
.admin-brand { padding: 0 !important; color: white !important; background: transparent !important; }
.admin-content { padding: .8rem; width: 100%; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.admin-mobile-nav { position: sticky; top: 0; z-index: 18; display: flex; gap: .45rem; margin: -.2rem -.8rem .9rem; padding: .45rem .8rem .65rem; overflow-x: auto; background: #081922; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.admin-mobile-nav::-webkit-scrollbar { display: none; }
.admin-mobile-nav a { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; padding: 0 .8rem; border-radius: 8px; color: #dff4ff; background: #17313d; border: 1px solid rgba(255,255,255,.06); font-size: .8rem; font-weight: 850; }
.admin-title { align-items: flex-start; }
.admin-form-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .5rem; }
.permission-grid label { display: flex; align-items: center; gap: .5rem; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--text); }
.permission-grid input { width: auto; }

@media (min-width: 720px) {
    h1 { font-size: 2.15rem; }
    .hero-app, .game-stage { grid-template-columns: minmax(0, 1fr) 280px; align-items: end; padding: 1.5rem; }
    .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .metric-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
    .bottom-nav { display: none; }
    .topbar { display: none; }
    .desktop-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); width: min(1440px, 100%); margin: 0 auto; }
    .desktop-nav { display: grid; align-content: start; gap: .25rem; min-height: 100vh; padding: 1.2rem; border-right: 1px solid var(--line); background: rgba(12,9,18,.72); }
    .desktop-nav a,
    .desktop-nav button { padding: .75rem .85rem; border-radius: 8px; color: var(--muted); }
    .content { padding: 1.4rem; }
    .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .game-card-wide { grid-column: span 2; }
    .admin-shell { grid-template-columns: 246px minmax(0, 1fr); }
    .admin-sidebar { position: sticky; transform: none; height: 100vh; }
    .admin-content { padding: 1.2rem; min-width: 0; }
    .admin-mobile-nav { display: none; }
    .admin-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Royal Bet app refresh */
.app-topbar {
    position: sticky;
    height: 68px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 44px;
    gap: .65rem;
    background: #162d39;
    border-bottom-color: rgba(0,0,0,.22);
}

.logo-script {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #f5fbff;
    font-size: 2.1rem;
    line-height: 1;
    font-family: Georgia, serif;
    font-style: italic;
}

.wallet-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 122px;
    max-width: 210px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 0 .9rem;
    border-radius: 8px;
    background: #0d2130;
    color: white;
    font-weight: 850;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    border: 0;
}

.wallet-chip span {
    min-width: 0;
    text-align: center;
}

.wallet-chip i {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #2383e8;
    color: #fff;
    font-style: normal;
    font-size: .82rem;
    flex: 0 0 auto;
}

.top-icon {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: white;
    background: transparent;
    font-weight: 900;
}

.top-profile {
    grid-column: 3;
    background: transparent;
    border: 0;
    font-size: 1.05rem;
}

.svg-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    background: currentColor;
    flex: 0 0 auto;
    mask: var(--icon) center / contain no-repeat;
    -webkit-mask: var(--icon) center / contain no-repeat;
}

.icon-profile {
    --icon: url("icons/profile.svg");
    width: 1.35rem;
    height: 1.35rem;
}

.icon-gift-nav {
    --icon: url("icons/gift.svg");
}

.icon-chat {
    --icon: url("icons/chat.svg");
}

.icon-bets {
    --icon: url("icons/bets.svg");
}

.icon-casino {
    --icon: url("icons/casino.svg");
}

.icon-lottery {
    --icon: url("icons/lottery.svg");
}

.bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0;
    padding: .25rem .25rem .35rem;
    border-radius: 0;
    background: #142b37;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.06);
}

.bottom-nav a,
.bottom-nav button {
    width: 100%;
    min-width: 0;
    display: grid;
    place-items: center;
    gap: .15rem;
    color: #b7d0dd;
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: .45rem .18rem;
    font-size: .7rem;
    font-weight: 750;
}

.bottom-nav span {
    color: #e9f6ff;
    font-size: 1.05rem;
    line-height: 1;
}

.bottom-nav .svg-icon {
    color: #e9f6ff;
}

.bottom-nav a:hover,
.bottom-nav button:hover {
    background: rgba(35,131,232,.15);
    color: white;
}

.bottom-nav .nav-lottery {
    position: relative;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 20% 18%, rgba(255,255,255,.34), transparent 18%),
        linear-gradient(135deg, #f2bd31, #ff5f3d 48%, #8b4cf5);
    box-shadow: 0 0 18px rgba(242,189,49,.28);
}

.bottom-nav .nav-lottery::before {
    content: "";
    position: absolute;
    inset: -70%;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 18px);
    animation: lotteryMove 4s linear infinite;
}

.bottom-nav .nav-lottery span,
.bottom-nav .nav-lottery {
    z-index: 1;
}

.bottom-nav .nav-gift {
    color: #b7d0dd;
    background: transparent;
}

.bottom-nav .nav-gift span {
    color: #e9f6ff;
}

.profile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgba(0,0,0,.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}

.profile-menu {
    position: fixed;
    top: 54px;
    right: .55rem;
    z-index: 55;
    width: min(292px, calc(100vw - 1.1rem));
    max-height: calc(100dvh - 70px);
    overflow: auto;
    display: grid;
    gap: .1rem;
    padding: .45rem;
    border-radius: 8px;
    background: #1a3845;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 60px rgba(0,0,0,.42);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
}

.profile-menu-open .profile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.profile-menu-open .profile-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-menu a,
.profile-menu button {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: .45rem;
    padding: 0 .35rem;
    border: 0;
    border-radius: 7px;
    color: white;
    background: transparent;
    text-align: left;
    font-size: .88rem;
    font-weight: 850;
}

.profile-menu a:hover,
.profile-menu button:hover {
    background: rgba(255,255,255,.07);
}

.profile-menu span {
    color: #a9c7d5;
    font-size: 1.05rem;
}

.profile-menu form {
    margin: 0;
}

.wallet-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 56;
    background: rgba(3,12,17,.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.wallet-popup {
    position: fixed;
    z-index: 61;
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    max-width: 430px;
    max-height: calc(100dvh - 1.5rem);
    display: grid;
    align-content: start;
    gap: .85rem;
    margin: 0 auto;
    padding: 1rem;
    overflow: auto;
    border-radius: 8px;
    background: #132d39;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 80px rgba(0,0,0,.48);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .2s ease, transform .2s ease;
}

.wallet-open {
    overflow: hidden;
}

.wallet-open .wallet-popup-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.wallet-open .wallet-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wallet-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wallet-popup-head h2 {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    font-size: 1.05rem;
}

.wallet-popup-head h2 span {
    color: #a9c7d5;
}

.wallet-popup-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c8dee8;
    font-size: 1.4rem;
    line-height: 1;
}

.wallet-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: .25rem;
    background: #0a1b25;
    border-bottom: 4px solid #244858;
}

.wallet-tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 99px;
    color: #dff4ff;
    background: transparent;
    font-size: .82rem;
    font-weight: 900;
}

.wallet-tabs button.is-active {
    background: #3b5c6c;
    color: white;
}

.wallet-tabs button[aria-disabled="true"] {
    opacity: .55;
}

.wallet-panel {
    display: none;
    gap: .8rem;
}

.wallet-panel.is-active {
    display: grid;
}

.wallet-label {
    color: #9ebbc8;
    font-size: .82rem;
    font-weight: 850;
}

.wallet-total {
    display: block;
    color: white;
    font-size: 1.25rem;
}

.wager-card,
.cashout-ready {
    display: grid;
    gap: .55rem;
    padding: .85rem;
    border-radius: 8px;
    background: #1c3a47;
    border: 1px solid rgba(255,255,255,.05);
}

.wager-card.compact {
    margin-bottom: .85rem;
}

.wager-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.wager-card span,
.cashout-ready span {
    color: #9ebbc8;
    font-size: .82rem;
    font-weight: 850;
}

.wager-card strong {
    color: white;
}

.wager-card p,
.cashout-ready p {
    margin: 0;
    color: #b7d0dd;
    font-size: .82rem;
    line-height: 1.38;
}

.wager-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #071822;
}

.wager-bar i {
    display: block;
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2383e8, #2dd4bf);
}

.wallet-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.lottery-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 56;
    background: rgba(3,12,17,.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.lottery-popup {
    position: fixed;
    z-index: 62;
    left: .6rem;
    right: .6rem;
    bottom: .6rem;
    max-width: 430px;
    max-height: calc(100dvh - 1.2rem);
    display: grid;
    align-content: start;
    gap: .85rem;
    margin: 0 auto;
    padding: 1rem;
    overflow: auto;
    border-radius: 8px;
    background: #17313d;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 28px 90px rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .2s ease, transform .2s ease;
}

.lottery-open {
    overflow: hidden;
}

.lottery-open .lottery-popup-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.lottery-open .lottery-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lottery-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.lottery-popup-head h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.lottery-popup-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #bfd7e3;
    font-size: 1.45rem;
    line-height: 1;
}

.lottery-ticket-art {
    position: relative;
    justify-self: center;
    width: 132px;
    aspect-ratio: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, #1178ff, #043d97);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.42), 0 18px 40px rgba(0,0,0,.32);
}

.lottery-ticket-art::before {
    content: "";
    position: absolute;
    width: 96px;
    height: 62px;
    border-radius: 10px;
    background: linear-gradient(145deg, #ff746d, #ef223e);
    box-shadow: 0 8px 18px rgba(0,0,0,.28);
    transform: rotate(-26deg);
}

.lottery-ticket-art::after {
    content: "";
    position: absolute;
    width: 96px;
    height: 62px;
    border-radius: 10px;
    border: 3px solid rgba(255,255,255,.78);
    border-left-style: dashed;
    transform: rotate(-26deg) translateY(-4px);
}

.lottery-ticket-art span {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 12px;
    transform: rotate(-26deg);
    background: repeating-linear-gradient(90deg, white 0 10px, transparent 10px 14px);
    clip-path: polygon(0 50%, 13% 15%, 28% 50%, 43% 15%, 58% 50%, 73% 15%, 88% 50%, 100% 15%, 100% 100%, 0 100%);
}

.lottery-ticket-art i {
    position: absolute;
    right: 19px;
    bottom: 24px;
    width: 62px;
    height: 24px;
    border-radius: 6px;
    background: rgba(8,25,34,.28);
    transform: rotate(-10deg);
}

.lottery-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem;
}

.lottery-countdown div {
    display: grid;
    place-items: center;
    min-height: 52px;
    border-radius: 8px;
    background: #41677a;
}

.lottery-countdown strong {
    color: white;
    font-size: 1rem;
    line-height: 1;
}

.lottery-countdown span {
    color: #c6dce6;
    font-size: .72rem;
    font-weight: 850;
}

.lottery-pot-card {
    display: grid;
    gap: .6rem;
    padding: .85rem;
    border-radius: 8px;
    background: #1c3a47;
}

.lottery-pot-card > div:first-child,
.lottery-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.lottery-pot-card span,
.lottery-total span {
    color: #a9c7d5;
    font-weight: 850;
}

.lottery-pot-card strong,
.lottery-total strong {
    color: white;
}

.lottery-pot-card p {
    margin: 0;
    color: #c6dce6;
}

.lottery-pot-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #0a1b25;
}

.lottery-pot-bar i {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, #2383e8, #2dd4bf);
}

.lottery-copy {
    margin: 0;
    color: #b7d0dd;
    line-height: 1.48;
    font-size: .88rem;
}

.lottery-buy-form {
    display: grid;
    gap: .65rem;
}

.lottery-quick-picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
}

.lottery-quick-picks button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: #41677a;
    font-weight: 900;
}

.lottery-total {
    padding: .7rem .8rem;
    border-radius: 8px;
    background: #0d222d;
}

.lottery-details,
.lottery-winners {
    border-radius: 8px;
    background: #1c3a47;
    border: 1px solid rgba(255,255,255,.05);
}

.lottery-details summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .85rem;
    cursor: pointer;
    color: white;
    font-weight: 900;
}

.lottery-ticket-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0 .85rem .85rem;
}

.lottery-ticket-list span {
    padding: .28rem .45rem;
    border-radius: 7px;
    color: #dff4ff;
    background: #102633;
    font-size: .72rem;
    font-weight: 850;
}

.lottery-winners {
    display: grid;
    gap: .45rem;
    padding: .85rem;
}

.lottery-winners h3 {
    margin: 0 0 .25rem;
}

.lottery-winners article {
    display: grid;
    gap: .12rem;
    padding: .65rem;
    border-radius: 8px;
    background: #102633;
}

.lottery-winners article span,
.lottery-winners article small {
    color: #9ebbc8;
}

.lottery-winners article strong {
    color: white;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.game-inactive-backdrop {
    position: fixed;
    inset: 0;
    z-index: 58;
    background: rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}

.game-inactive-popup {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 50%;
    z-index: 62;
    max-width: 360px;
    display: grid;
    gap: .75rem;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 8px;
    background: #132d39;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(-50% + 16px));
    transition: opacity .18s ease, transform .18s ease;
}

.game-inactive-popup strong {
    font-size: 1.05rem;
}

.game-inactive-popup p {
    margin: 0;
    color: #b7d0dd;
}

.game-inactive-open .game-inactive-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.game-inactive-open .game-inactive-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%);
}

.support-page {
    min-height: calc(100dvh - 68px - 5.4rem);
    margin: -.35rem -1rem -5.4rem;
    padding: .9rem 1rem 6rem;
    background: #132a35;
}

.level-progress-card {
    display: grid;
    gap: .55rem;
    margin-bottom: .9rem;
    padding: .8rem;
    border-radius: 8px;
    background: #102633;
    border: 2px solid #b7cfda;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.level-progress-head {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    color: #f4fbff;
}

.level-progress-head strong {
    font-size: .95rem;
}

.level-progress-head span {
    color: #b7cfda;
    font-size: 1.35rem;
    line-height: .8;
}

.level-percent {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: #f4fbff;
    font-size: .86rem;
    font-weight: 900;
}

.level-percent span {
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #b7cfda;
    color: #102633;
    font-size: .62rem;
    font-style: normal;
}

.level-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #071822;
}

.level-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #b7cfda;
    min-width: 3px;
}

.level-progress-card p {
    margin: 0;
    color: #9ebbc8;
    font-size: .82rem;
}

.app-shell .content {
    background: #132a35;
}

.casino-profile-card {
    padding: .9rem;
    background: #1c3a47;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(0,0,0,.2);
}

.casino-cover {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: .9rem;
    align-items: center;
}

.casino-logo {
    width: 104px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #36596a;
    color: white;
    font-size: 2rem;
    font-family: Georgia, serif;
    font-style: italic;
}

.casino-cover h1 {
    margin: 0 0 .35rem;
    font-size: 1.35rem;
}

.casino-cover p {
    margin: 0;
    color: #c5d9e3;
    font-weight: 700;
}

.live-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: .35rem;
    border-radius: 99px;
    background: #20e66b;
    vertical-align: middle;
}

.casino-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    margin-top: .95rem;
}

.casino-stats-row div {
    min-width: 0;
    padding-left: .55rem;
    border-left: 1px solid rgba(189,222,237,.16);
}

.casino-stats-row div:first-child {
    border-left: 0;
    padding-left: 0;
}

.casino-stats-row strong,
.casino-stats-row span {
    display: block;
}

.casino-stats-row strong {
    font-size: .9rem;
    color: white;
}

.casino-stats-row span {
    color: #a8c3d0;
    font-size: .8rem;
}

.promo-ribbon {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .2rem .8rem;
    margin: 1rem 0;
    padding: .95rem;
    border-radius: 8px;
    color: white;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent), #0e2530 20%), #0e2530);
    border: 1px solid rgba(255,255,255,.08);
}

.promo-ribbon span,
.promo-ribbon em {
    color: rgba(255,255,255,.76);
    font-size: .76rem;
    font-style: normal;
    font-weight: 800;
}

.promo-ribbon strong {
    font-size: 1.02rem;
}

.promo-ribbon em {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    padding: .55rem .7rem;
    border-radius: 8px;
    background: rgba(255,255,255,.14);
}

.search-bar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .55rem;
    min-height: 48px;
    padding: 0 .8rem;
    border: 1px solid #315361;
    border-radius: 8px;
    background: #0c202b;
}

.search-bar input {
    border: 0;
    background: transparent;
    padding: 0;
    color: #d8ecf5;
}

.search-bar span {
    color: #9ec3d2;
    font-size: 1.3rem;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    margin: 1.1rem 0;
}

.filter-row button {
    min-height: 40px;
    padding: 0 .95rem;
    border: 0;
    border-radius: 8px;
    background: #3b5c6c;
    color: white;
    font-weight: 850;
}

.casino-section h2 {
    margin: .2rem 0 .75rem;
    font-size: 1rem;
}

.casino-game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.casino-tile {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: .75rem;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    background: #2383e8;
    border: 0;
    text-align: left;
}

.casino-tile::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 22% 22%, rgba(255,255,255,.42), transparent 18%),
        linear-gradient(135deg, transparent 30%, rgba(255,255,255,.22) 31% 34%, transparent 35%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 10px, transparent 10px 22px);
    transform: rotate(-6deg);
}

.casino-tile span,
.casino-tile strong,
.casino-tile small {
    position: relative;
    z-index: 1;
}

.casino-tile span {
    font-size: .68rem;
    text-transform: uppercase;
    color: rgba(255,255,255,.78);
}

.casino-tile strong {
    font-size: 1rem;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.casino-tile small {
    margin-top: .35rem;
    color: #dff5ff;
    font-size: .68rem;
}

.tile-1 { background: linear-gradient(160deg, #2184ee, #13c7f3); }
.tile-2 { background: linear-gradient(160deg, #8b4cf5, #ed4fff); }
.tile-3 { background: linear-gradient(160deg, #ffcf33, #ff674d); }
.tile-4 { background: linear-gradient(160deg, #1f74ff, #2ad0a9); }
.tile-5 { background: linear-gradient(160deg, #7038ff, #fb2d69); }
.tile-6 { background: linear-gradient(160deg, #ff2856, #2b79ff); }

.casino-tile.is-disabled {
    opacity: .58;
    filter: grayscale(.25);
}

.casino-tile.is-disabled::after {
    content: "FERME";
    position: absolute;
    top: .55rem;
    right: .55rem;
    z-index: 2;
    padding: .22rem .42rem;
    border-radius: 7px;
    background: rgba(7,24,34,.76);
    color: #d3e6ef;
    font-size: .62rem;
    font-weight: 900;
}

.event-rail {
    display: grid;
    gap: .55rem;
    margin-bottom: 1rem;
}

.event-pill-card {
    display: grid;
    gap: .15rem;
    padding: .8rem;
    border-radius: 8px;
    background: #19333f;
    border: 1px solid rgba(255,255,255,.06);
}

.event-pill-card span,
.event-pill-card small {
    color: #a8c3d0;
}

.muted-card {
    opacity: .76;
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0,0,0,.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.bets-sheet {
    position: fixed;
    z-index: 45;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 76vh;
    display: grid;
    gap: .8rem;
    padding: .7rem 1rem 1rem;
    border-radius: 8px 8px 0 0;
    background: #102633;
    border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(105%);
    transition: transform .24s ease;
}

.bets-open .sheet-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.bets-open .bets-sheet {
    transform: translateY(0);
}

.sheet-handle {
    justify-self: center;
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: #496c7b;
}

.bets-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bets-sheet header span,
.bet-row span {
    color: #9dbdcb;
    font-size: .78rem;
}

.bets-sheet h2 {
    margin: .1rem 0 0;
}

.bets-sheet-list {
    display: grid;
    gap: .45rem;
    overflow: auto;
}

.bet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem;
    border-radius: 8px;
    background: #17313d;
    border: 1px solid rgba(255,255,255,.055);
}

.bet-row strong,
.bet-row span {
    display: block;
}

.bet-row em {
    flex: 0 0 auto;
    font-style: normal;
    font-weight: 900;
}

.bet-row em.won { color: #20e66b; }
.bet-row em.lost { color: #d3e6ef; }

.chat-top-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .9rem;
    border-radius: 8px;
    background: #1c3a47;
}

.chat-top-card h1 {
    margin-bottom: .35rem;
}

.vip-mini {
    display: inline-flex;
    padding: .25rem .55rem;
    border-radius: 99px;
    color: white;
    background: color-mix(in srgb, var(--vip), #102633 32%);
    font-size: .78rem;
    font-weight: 850;
}

.profile-pill {
    display: grid;
    place-items: center;
    gap: .25rem;
    color: #dff5ff;
    font-size: .72rem;
    font-weight: 800;
}

.profile-pill span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2383e8;
    color: white;
}

.mobile-chat {
    margin-top: .8rem;
    background: #102633;
    box-shadow: none;
}

.chat-message {
    background: #17313d;
}

.chat-message header {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.chat-message header small {
    padding: .12rem .4rem;
    border-radius: 99px;
    color: white;
    background: color-mix(in srgb, var(--vip), #102633 40%);
}

.chat-message header span {
    margin-left: auto;
}

@media (max-width: 370px) {
    .casino-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-topbar { grid-template-columns: 44px minmax(0, 1fr) 36px; gap: .45rem; }
    .wallet-chip { min-width: 112px; font-size: .8rem; padding: 0 .55rem; }
    .top-icon { width: 36px; }
}

@media (min-width: 720px) {
    .casino-game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .event-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chat-room {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: .65rem;
    min-height: calc(100dvh - 68px);
    height: calc(100dvh - 68px);
    margin: -.35rem -1rem -5.4rem;
    padding: .75rem .85rem 5.15rem;
    background: #102633;
    overflow: hidden;
}

.chat-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 52px;
}

.chat-room-head h1 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-room-head p {
    margin: .18rem 0 0;
    color: #9ebbc8;
    font-size: .78rem;
    font-weight: 750;
}

.chat-room-head > div {
    min-width: 0;
}

.chat-profile-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #213f4d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.chat-profile-button span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #2383e8, #62d2ff);
    font-weight: 900;
    font-size: .82rem;
}

.rank-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    min-height: 28px;
    padding: .22rem .6rem;
    border-radius: 99px;
    color: white;
    background: linear-gradient(135deg, color-mix(in srgb, var(--vip), #0c202b 18%), #143340);
    border: 1px solid color-mix(in srgb, var(--vip), white 20%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--vip), transparent 68%);
    font-size: .75rem;
    font-weight: 900;
    overflow: hidden;
}

.rank-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0 35%, rgba(255,255,255,.28) 47%, transparent 60% 100%);
    transform: translateX(-120%);
    animation: rankSweep 4.8s ease-in-out infinite;
}

.rank-badge i {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    display: inline-block;
    transform: rotate(45deg);
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.stake-chat-list {
    display: grid;
    align-content: start;
    gap: .48rem;
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding: .1rem 0;
}

.stake-chat-message {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: .3rem;
    padding: .58rem .72rem;
    border: 0;
    border-radius: 8px;
    background: #18333f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
    min-width: 0;
}

.stake-chat-message header {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    flex-wrap: wrap;
}

.stake-chat-message strong {
    color: #9fc8da;
    font-size: .86rem;
}

.stake-chat-message p {
    margin: .06rem 0 0;
    color: #f1f7fb;
    font-weight: 760;
    line-height: 1.34;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    min-width: 0;
}

.stake-chat-message header span {
    margin-left: auto;
    color: #6f92a0;
    font-size: .7rem;
}

.rank-mark {
    width: 15px;
    height: 15px;
    margin-top: .16rem;
    display: inline-block;
    clip-path: polygon(50% 0, 62% 31%, 96% 31%, 69% 52%, 80% 88%, 50% 67%, 20% 88%, 31% 52%, 4% 31%, 38% 31%);
    background: color-mix(in srgb, var(--vip), white 12%);
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--vip), transparent 25%));
}

.rank-text {
    color: color-mix(in srgb, var(--vip), white 26%);
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.rank-bronze,
.rank-badge.rank-bronze {
    --vip: #c58b4b;
}

.rank-silver,
.rank-badge.rank-silver {
    --vip: #b7cad6;
}

.rank-gold,
.rank-badge.rank-gold {
    --vip: #f4bd3d;
}

.rank-platinum,
.rank-badge.rank-platinum {
    --vip: #4ee0d2;
}

.rank-diamond,
.rank-badge.rank-diamond {
    --vip: #a7f3ff;
}

.rank-gold,
.rank-diamond,
.rank-platinum {
    animation: rankPulse 2.8s ease-in-out infinite;
}

.chat-compose {
    position: relative;
    bottom: auto;
    display: grid;
    gap: .5rem;
    padding-top: .45rem;
    background: #102633;
}

.chat-input-wrap {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid #315361;
    border-radius: 8px;
    background: #081922;
    overflow: hidden;
}

.chat-input-wrap input {
    min-height: 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d9edf6;
    padding: 0 .65rem 0 .2rem;
}

.emoji-button {
    width: 36px;
    height: 48px;
    border: 0;
    background: transparent;
    color: #dff4ff;
    font-size: 1rem;
}

.chat-input-wrap .primary-button {
    min-height: 40px;
    margin-right: .35rem;
    padding: 0 .85rem;
    background: #2383e8;
}

.chat-compose-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 48px auto;
    align-items: center;
    gap: .45rem;
}

.chat-compose-meta span {
    color: #9ebbc8;
    font-size: .72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-compose-meta output {
    color: #9ebbc8;
    text-align: center;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.chat-compose-meta output.is-low {
    color: #f2c14e;
}

.chat-tools {
    height: 38px;
    border: 0;
    border-radius: 8px;
    color: #dff4ff;
    background: #496b7d;
    font-weight: 900;
}

@keyframes rankSweep {
    0%, 72% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

@keyframes rankPulse {
    0%, 100% { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--vip), transparent 45%)); }
    50% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--vip), transparent 10%)); }
}

@keyframes lotteryMove {
    from { transform: translate3d(-10%, 0, 0) rotate(0deg); }
    to { transform: translate3d(10%, 0, 0) rotate(8deg); }
}

@media (min-width: 720px) {
    .chat-room {
        min-height: calc(100dvh - 2.8rem);
        height: calc(100dvh - 2.8rem);
        margin: 0;
        padding: 1rem;
        border-radius: 8px;
    }

    .chat-compose {
        bottom: 1rem;
    }
}

.vip-modal-backdrop {
    min-height: calc(100dvh - 68px);
    margin: -1rem -1rem -6rem;
    padding: 1rem 1rem 6rem;
    background: rgba(4,15,21,.72);
    backdrop-filter: blur(4px);
}

.vip-modal {
    display: grid;
    gap: .9rem;
    max-width: 560px;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 8px;
    background: #132d39;
    border: 1px solid rgba(183,207,218,.12);
    box-shadow: 0 24px 80px rgba(0,0,0,.38);
}

.vip-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.vip-modal-head h1 {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: 1.2rem;
}

.vip-modal-head h1 span {
    color: #b7cfda;
    font-size: 1.1rem;
}

.vip-modal-head a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #c7dde7;
    font-size: 1.7rem;
    line-height: 1;
}

.vip-summary-card {
    display: grid;
    gap: .6rem;
    padding: .8rem;
    border-radius: 8px;
    background: #0d222d;
    border: 2px solid #b7cfda;
}

.vip-summary-card strong {
    color: white;
}

.vip-summary-percent {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: white;
    font-size: .86rem;
    font-weight: 900;
}

.vip-summary-percent span {
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #0d222d;
    background: #b7cfda;
    font-size: .62rem;
}

.vip-summary-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #071822;
}

.vip-summary-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #b7cfda;
    min-width: 3px;
}

.vip-summary-card p {
    margin: 0;
    color: #9ebbc8;
    font-size: .82rem;
}

.vip-benefit-list {
    display: grid;
    gap: .75rem;
}

.vip-benefit,
.vip-info-block {
    border-radius: 8px;
    background: #1c3a47;
    border: 1px solid rgba(255,255,255,.04);
    overflow: hidden;
}

.vip-benefit summary,
.vip-info-block summary {
    list-style: none;
    cursor: pointer;
}

.vip-benefit summary::-webkit-details-marker,
.vip-info-block summary::-webkit-details-marker {
    display: none;
}

.vip-benefit summary {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-height: 82px;
    padding: .7rem .85rem;
}

.vip-benefit summary::after,
.vip-info-block summary::after {
    content: "⌄";
    color: #d3e6ef;
    font-size: 1.1rem;
}

.vip-benefit:not([open]) summary::after,
.vip-info-block:not([open]) summary::after {
    content: "›";
}

.vip-benefit summary span:nth-child(2) {
    display: grid;
    gap: .2rem;
}

.vip-benefit summary strong,
.vip-info-block summary {
    color: #f4fbff;
    font-weight: 900;
}

.vip-benefit summary small,
.vip-benefit p,
.vip-info-block p {
    color: #9ebbc8;
    line-height: 1.35;
}

.vip-benefit summary em {
    color: #b7cfda;
    font-style: normal;
}

.vip-benefit p,
.vip-info-block p {
    margin: 0;
    padding: 0 .85rem .85rem 5.35rem;
}

.vip-benefit-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
    background: linear-gradient(145deg, #2c5364, #0b1d27);
    box-shadow: inset 0 0 0 2px #071822, 0 8px 18px rgba(0,0,0,.22);
}

.vip-benefit-icon::before {
    content: "";
    width: 24px;
    height: 24px;
    display: block;
    background: #c6d8e2;
    clip-path: polygon(50% 0, 90% 42%, 66% 42%, 66% 100%, 34% 100%, 34% 42%, 10% 42%);
}

.icon-gift::before {
    clip-path: polygon(8% 35%, 92% 35%, 92% 92%, 8% 92%);
}

.icon-boost::before {
    border-radius: 50% 50% 45% 55%;
    clip-path: none;
}

.icon-list::before {
    clip-path: polygon(12% 0, 88% 0, 88% 100%, 12% 100%);
}

.vip-info-block summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 .9rem;
}

.vip-info-block p {
    padding: 0 .9rem .9rem;
}

.vip-tier-list {
    display: grid;
    gap: .55rem;
}

.vip-tier-list h2 {
    margin: .4rem 0 .2rem;
}

.vip-tier {
    display: grid;
    gap: .18rem;
    padding: .7rem .8rem;
    border-radius: 8px;
    background: #102633;
    border: 1px solid rgba(255,255,255,.05);
}

.vip-tier.is-current {
    border-color: color-mix(in srgb, var(--vip), white 18%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--vip), transparent 35%);
}

.vip-tier span {
    color: color-mix(in srgb, var(--vip), white 20%);
    font-weight: 900;
}

.vip-tier strong {
    color: white;
}

.vip-tier small {
    color: #9ebbc8;
}

@media (min-width: 720px) {
    .vip-modal-backdrop {
        min-height: calc(100dvh - 2.8rem);
        margin: 0;
        padding: 1.4rem;
        border-radius: 8px;
    }
}

.desktop-nav button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
}

.level-progress-head {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.vip-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(3,12,17,.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.vip-popup {
    position: fixed;
    z-index: 65;
    left: .95rem;
    right: .95rem;
    top: 76px;
    bottom: 76px;
    display: grid;
    align-content: start;
    gap: .9rem;
    max-width: 560px;
    margin: 0 auto;
    padding: 1rem;
    overflow: auto;
    border-radius: 8px;
    background: #132d39;
    border: 1px solid rgba(183,207,218,.14);
    box-shadow: 0 26px 86px rgba(0,0,0,.46);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .2s ease, transform .2s ease;
}

.vip-open {
    overflow: hidden;
}

.vip-open .vip-popup-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.vip-open .vip-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.vip-popup .vip-modal-head button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c7dde7;
    font-size: 1.75rem;
    line-height: 1;
}

.vip-popup .vip-modal-head button:hover {
    background: rgba(255,255,255,.07);
    color: white;
}

.vip-benefit-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 24px;
    align-items: center;
    gap: .7rem;
    min-height: 78px;
    padding: .75rem .85rem;
    border-radius: 8px;
    background: #1c3a47;
    border: 1px solid rgba(255,255,255,.04);
}

.vip-benefit-row > div {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.vip-benefit-row strong {
    color: #f4fbff;
    font-size: .95rem;
}

.vip-benefit-row small {
    color: #9ebbc8;
    line-height: 1.32;
}

.vip-benefit-row em {
    justify-self: end;
    color: #b7cfda;
    font-style: normal;
}

.vip-benefit-row.is-unlocked {
    border-color: rgba(45,212,191,.16);
    background: linear-gradient(135deg, rgba(45,212,191,.08), #1c3a47);
}

.vip-benefit-row.is-locked {
    opacity: .78;
}

.vip-popup .vip-tier-list {
    padding-bottom: .2rem;
}

@media (min-width: 720px) {
    .vip-popup {
        top: 50%;
        bottom: auto;
        max-height: min(82vh, 760px);
        transform: translateY(calc(-50% + 18px));
    }

    .vip-open .vip-popup {
        transform: translateY(-50%);
    }
}
