@import url("https://fonts.googleapis.com/css2?family=Marcellus&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
    color-scheme: dark;
    --bg-1: #05060d;
    --bg-2: #0b1223;
    --bg-3: #111b35;
    --text: #eaf1ff;
    --muted: #9aa6bf;
    --accent: #2dd4bf;
    --accent-2: #4f46e5;
    --card: rgba(12, 18, 35, 0.75);
    --border: rgba(125, 140, 175, 0.25);
    --glow: rgba(79, 70, 229, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, #1a2350 0%, var(--bg-2) 45%, var(--bg-1) 100%);
}

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

.page {
    min-height: 100vh;
    padding: 32px clamp(16px, 5vw, 80px) 64px;
    padding-top: 0;
    position: relative;
    overflow: hidden;
}

.page::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.2), transparent 65%);
    filter: blur(10px);
    opacity: 0.7;
    pointer-events: none;
    animation: drift 18s ease-in-out infinite;
}

.page::after {
    content: "";
    position: absolute;
    inset: auto auto -30% -10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--glow), transparent 60%);
    filter: blur(20px);
    opacity: 0.6;
    pointer-events: none;
    animation: drift 22s ease-in-out infinite reverse;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(16px, 5vw, 80px);
    border-radius: 0;
    background: rgba(8, 12, 26, 0.95);
    border-bottom: 1px solid rgba(79, 70, 229, 0.35);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100vw;
    margin-left: calc(-1 * clamp(16px, 5vw, 80px));
    margin-right: calc(-1 * clamp(16px, 5vw, 80px));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: "Marcellus", "Times New Roman", serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #0b1223;
    font-weight: 700;
    font-size: 18px;
}

.brand-name {
    font-size: 18px;
    color: var(--muted);
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
}

.auth-page::before,
.auth-page::after {
    opacity: 0.4;
}

.auth-shell {
    margin-top: clamp(32px, 6vh, 80px);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: min(520px, 100%);
    background: rgba(8, 12, 26, 0.82);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px;
    display: grid;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(5, 7, 18, 0.45);
}

.auth-card h1 {
    font-family: "Marcellus", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 15px;
}

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

.auth-field {
    display: grid;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.auth-input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 24, 0.7);
    color: var(--text);
    font-size: 16px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.profile-section {
    margin-top: clamp(32px, 6vh, 80px);
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.profile-subtitle {
    color: var(--muted);
    font-size: 16px;
}

.profile-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.profile-card {
    background: rgba(8, 12, 26, 0.78);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    display: grid;
    gap: 6px;
}

.profile-card span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.profile-card strong {
    font-size: 22px;
}

.profile-card em {
    font-size: 12px;
    color: var(--muted);
}

.profile-card.highlight {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.15);
}

.hero {
    margin-top: clamp(40px, 10vh, 120px);
    display: grid;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.hero-banner {
    position: relative;
    min-height: clamp(320px, 50vh, 520px);
    display: grid;
    align-items: center;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(8, 12, 26, 0.78);
    border: 1px solid var(--border);
}
.hero-banner.split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 48px);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero-media {
    display: grid;
    place-items: center;
    align-self: stretch;
    justify-self: stretch;
    background: radial-gradient(circle at top, rgba(79, 70, 229, 0.22), rgba(8, 12, 26, 0.2) 70%);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.admin-page .site-header {
    margin-bottom: 32px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.admin-card h3 {
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-card p {
    color: var(--muted);
    font-size: 14px;
}

.admin-section {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.admin-filters label {
    display: grid;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.admin-filters-actions {
    justify-content: flex-end;
}

.admin-table {
    display: grid;
    gap: 10px;
}

.admin-table-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(80px, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(8, 12, 26, 0.75);
    align-items: center;
}

.admin-table-row span {
    font-size: 13px;
    color: var(--text);
}

.admin-table-head {
    background: rgba(79, 70, 229, 0.18);
    border-color: rgba(79, 70, 229, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 24, 0.7);
    color: var(--text);
    font-size: 14px;
    width: 100%;
}

.admin-form {
    display: grid;
    gap: 16px;
    max-width: 540px;
}

.admin-form label {
    display: grid;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.admin-empty {
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed var(--border);
    color: var(--muted);
    text-align: center;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.hero-text h1 {
    font-family: "Marcellus", "Times New Roman", serif;
    font-size: clamp(30px, 3.6vw, 56px);
    font-weight: 600;
    line-height: 1.08;
    text-transform: uppercase;
}

.hero-text h1 span {
    color: var(--accent);
    display: block;
}

.hero-text p {
    margin-top: 12px;
    max-width: 480px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.hero-text {
    position: relative;
    z-index: 1;
    max-width: 520px;
    display: grid;
    gap: 14px;
    padding: clamp(20px, 3vw, 32px);
}

.hero-cta {
    margin-top: 6px;
    justify-self: start;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 24px;
    backdrop-filter: blur(14px);
}

.articles-section {
    margin-top: 36px;
    display: grid;
    gap: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header h2,
.section-header h1 {
    font-size: clamp(22px, 3vw, 32px);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-header p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    gap: 14px;
}

.article-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-body {
    padding: 0 16px 18px;
    display: grid;
    gap: 10px;
}

.article-body h2,
.article-body h3 {
    font-size: 18px;
}

.article-body a {
    color: inherit;
}

.article-lead {
    color: var(--muted);
    font-size: 14px;
}

.article-page .article-content {
    display: grid;
    gap: 16px;
    max-width: 840px;
    margin: 0 auto;
    padding: 50px 0;
}

.article-header {
    display: grid;
    gap: 10px;
}

.article-header h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.article-subtitle {
    color: var(--muted);
    font-size: 16px;
}

.article-hero {
    width: 100%;
    height: clamp(220px, 40vw, 380px);
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid var(--border);
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    color: #051019;
    box-shadow: 0 18px 30px -24px rgba(56, 189, 248, 0.7);
}

.btn.ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn.muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    cursor: not-allowed;
}

.btn.xl {
    padding: 18px 20px;
    border-radius: 18px;
    font-size: 16px;
}

@keyframes drift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(-30px, 20px, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }
}

.roulette-page {
    display: grid;
    gap: 16px;
    align-content: start;
}

.roulette-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 24px;
    align-items: start;
}

.roulette-main {
    display: grid;
    gap: 28px;
}

.roulette-aside {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100vh - 48px);
    overflow: hidden;
}

.roulette-header-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.aside-toggle {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.roulette-page.is-aside-collapsed .roulette-aside {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.roulette-page.is-aside-collapsed .roulette-shell {
    grid-template-columns: minmax(0, 1fr);
}

.roulette-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-top: 8px;
}

.roulette-header h1 {
    font-family: "Marcellus", "Times New Roman", serif;
    font-size: clamp(22px, 2.5vw, 32px);
    text-transform: uppercase;
}

.roulette-header p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.balance-card {
    display: grid;
    gap: 6px;
    padding: 16px 22px;
    border-radius: 18px;
    background: rgba(6, 10, 24, 0.65);
    border: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.balance-card strong {
    font-size: 20px;
    color: var(--text);
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(11, 18, 35, 0.7);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flash-popup {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 30;
    animation: flash-pop 5s ease forwards;
}

.flash-success {
    border-color: rgba(45, 212, 191, 0.4);
    color: #5eead4;
}

.flash-error {
    border-color: rgba(244, 114, 182, 0.4);
    color: #fda4af;
}

.roulette-wheel {
    background: rgba(8, 12, 26, 0.82);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px;
    display: grid;
    gap: 18px;
}

.wheel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(20, 28, 52, 0.95), rgba(8, 12, 24, 0.95));
    padding: 18px 0;
}

.wheel-track {
    display: flex;
    gap: 6px;
    padding: 0 24px;
    will-change: transform;
}

.wheel-track.is-rolling {
    animation: wheel-roll 0.7s linear infinite;
}

.wheel-tile {
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    color: #0c1224;
    background: #cbd5f5;
}

.wheel-tile.red {
    background: #f97316;
    color: #270b05;
}

.wheel-tile.black {
    background: #475569;
    color: #f8fafc;
}

.wheel-tile.green {
    background: #22c55e;
    color: #052e16;
}

.wheel-pointer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.75);
    transform: translateX(-50%);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
}

.wheel-pointer::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
}

.wheel-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.status-text {
    color: var(--muted);
}

.status-timer {
    font-size: 18px;
    color: var(--text);
}

.roulette-history {
    display: grid;
    gap: 12px;
    text-align: center;
}

.roulette-info-row {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
    gap: 18px;
    align-items: start;
}

.roulette-leaderboards {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roulette-history h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.history-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-item,
.history-empty {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 14px;
    color: #0b1020;
    background: #cbd5f5;
}

.history-item.red {
    background: #fb7185;
}

.history-item.black {
    background: #94a3b8;
    color: #0f172a;
}

.history-item.green {
    background: #4ade80;
}

.history-item.is-latest {
    border: 2px solid #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.history-empty {
    width: auto;
    padding: 0 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.bet-panel {
    background: rgba(8, 12, 26, 0.82);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
}

.bet-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 28px;
}

.bet-main {
    display: grid;
    gap: 20px;
}

.bet-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.amount-group {
    display: grid;
    gap: 8px;
    min-width: 160px;
}

.amount-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.amount-input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 24, 0.7);
    color: var(--text);
    font-size: 16px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.chip {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
}

.chip.ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--muted);
}

.bet-targets {
    flex: 1;
    min-width: 260px;
    display: grid;
    gap: 20px;
}

.bet-section h3 {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.color-btn {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.color-btn.red {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

.color-btn.green {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.color-btn.black {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.6);
    color: #e2e8f0;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 8px;
}

.number-btn {
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 10px 0;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.number-btn.red {
    background: rgba(248, 113, 113, 0.22);
    border-color: rgba(248, 113, 113, 0.55);
}

.number-btn.black {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.45);
}

.number-btn.green {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.55);
}

.bet-summary {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 20px;
    border-radius: 18px;
    background: rgba(11, 18, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.bet-separator {
  margin: 14px 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.bet-summary span {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.bet-summary strong {
    font-size: 18px;
}

.place-bet {
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    color: #041018;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    align-self: flex-end;
    margin-left: auto;
}

.place-bet:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.place-bet.is-disabled {
    opacity: 0.35;
    filter: grayscale(0.4);
}

.bet-note {
    font-size: 12px;
    color: var(--muted);
}

.bet-amount-preview {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bet-round-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.leaderboard-panel,
.chat-panel {
    background: rgba(8, 12, 26, 0.82);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    display: grid;
    gap: 16px;
}

.leaderboard-panel.compact {
    padding: 16px;
}

.leaderboard-panel header,
.chat-panel header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.leaderboard-panel h2,
.chat-panel h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.leaderboard-panel span,
.leaderboard-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.leaderboard-list {
    display: grid;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
}

.leaderboard-list.compact {
    max-height: none;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(11, 18, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.leaderboard-user {
    color: var(--text);
    font-weight: 600;
}

.leaderboard-empty {
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.chat-messages {
    display: grid;
    gap: 12px;
    min-height: 0;
    overflow-y: hidden;
    padding-right: 6px;
}

.chat-message {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(11, 18, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.chat-message p {
    font-size: 14px;
    color: var(--text);
    margin: 0;
}

.chat-empty {
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(6, 10, 24, 0.7);
    color: var(--text);
}

.chat-form button {
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    color: #041018;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chat-status {
    font-size: 12px;
    color: var(--muted);
}

.chat-status.is-error {
    color: #fda4af;
}

.chat-panel {
    flex: 1;
    min-height: 0;
    grid-template-rows: auto 1fr auto auto;
}

@media (max-width: 1024px) {
    .roulette-shell {
        grid-template-columns: 1fr;
    }

    .roulette-aside {
        position: static;
        height: auto;
    }

    .roulette-info-row {
        grid-template-columns: 1fr;
    }
}

@keyframes flash-pop {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    12% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.is-selected {
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.7);
}

@keyframes wheel-roll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    .roulette-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bet-layout {
        grid-template-columns: 1fr;
    }

    .place-bet {
        margin-left: 0;
    }
}

/* Blackjack */
.blackjack-page {
    display: grid;
    gap: 16px;
    align-content: start;
}

.blackjack-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-top: 8px;
}

.blackjack-header h1 {
    font-family: "Marcellus", "Times New Roman", serif;
    font-size: clamp(22px, 2.5vw, 32px);
    text-transform: uppercase;
}

.blackjack-header p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.blackjack-table {
    background: rgba(8, 12, 26, 0.82);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    gap: 12px;
}

.cards-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding-bottom: 24px;
}

.hand-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hand-label {
    display: grid;
    gap: 4px;
    text-align: center;
    min-width: 70px;
}

.hand-label span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.hand-label strong {
    font-size: 36px;
    color: var(--text);
}

.cards-row {
    display: flex;
    gap: 12px;
}

.playing-card {
    width: 140px;
    height: 196px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

[data-dealer-animate="true"] .playing-card {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.playing-card.dealer-card-pending {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
}

.playing-card.red {
    color: #dc2626;
}

.playing-card.black {
    color: #1e293b;
}

.card-rank {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.card-suit {
    font-size: 52px;
    line-height: 1;
}

.playing-card.card-hidden {
    background: linear-gradient(135deg, #1e3a5f, #0f2744);
    border: 2px solid #3b82f6;
}

.card-back {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(59, 130, 246, 0.3),
        rgba(59, 130, 246, 0.3) 4px,
        transparent 4px,
        transparent 8px
    );
    border-radius: 6px;
}

.playing-card.card-placeholder {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.vs-divider {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    padding: 0 8px;
}

.game-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-box {
    display: grid;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(11, 18, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.info-box span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.info-box strong {
    font-size: 16px;
}

.info-box.result-win, .info-box.result-blackjack {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.15);
}

.info-box.result-win strong, .info-box.result-blackjack strong {
    color: #4ade80;
}

.info-box.result-push {
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.15);
}

.info-box.result-push strong {
    color: #fde047;
}

.info-box.result-lose {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
}

.info-box.result-lose strong {
    color: #f87171;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 12px 24px;
    font-size: 15px;
}

.inline-form {
    display: inline;
}

.empty-table {
    display: grid;
    gap: 16px;
    justify-items: center;
    padding: 24px 0;
}

.cards-placeholder {
    display: flex;
    gap: 12px;
    align-items: center;
}

.empty-table p {
    color: var(--muted);
    font-size: 14px;
}

.blackjack-bet-panel {
    padding: 12px 16px;
    border-radius: 16px;
}

.blackjack-bet-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.blackjack-bet-form .amount-group {
    min-width: 120px;
    gap: 4px;
}

.blackjack-bet-form .amount-input {
    padding: 10px 12px;
    font-size: 15px;
}

.blackjack-bet-form .quick-actions {
    gap: 8px;
}

.blackjack-bet-form .chip {
    padding: 10px 14px;
    font-size: 13px;
}

.blackjack-bet-form .place-bet {
    padding: 12px 28px;
    font-size: 14px;
}

.blackjack-history {
    display: grid;
    gap: 12px;
}

.blackjack-history h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-align: center;
}

.blackjack-page .history-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.blackjack-page .history-card {
    padding: 16px;
    border-radius: 14px;
    background: rgba(11, 18, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 12px;
    min-width: 200px;
}

.blackjack-page .history-card.result-win,
.blackjack-page .history-card.result-blackjack {
    border-color: rgba(34, 197, 94, 0.4);
}

.blackjack-page .history-card.result-push {
    border-color: rgba(250, 204, 21, 0.4);
}

.blackjack-page .history-card.result-lose {
    border-color: rgba(239, 68, 68, 0.4);
}

.history-hands {
    display: grid;
    gap: 8px;
}

.history-hand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.history-hand-label {
    color: var(--muted);
    min-width: 24px;
    font-size: 11px;
    text-transform: uppercase;
}

.history-hand-cards {
    display: flex;
    gap: 4px;
    flex: 1;
}

.mini-card {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

.mini-card.red {
    color: #dc2626;
}

.history-hand-value {
    font-weight: 700;
    color: var(--text);
    min-width: 24px;
    text-align: right;
    font-size: 15px;
}

.history-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-result-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-card.result-win .history-result-badge,
.history-card.result-blackjack .history-result-badge {
    color: #4ade80;
}

.history-card.result-push .history-result-badge {
    color: #fde047;
}

.history-card.result-lose .history-result-badge {
    color: #f87171;
}

.history-bet {
    font-size: 14px;
    color: var(--muted);
}

/* Result Modal */
.result-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 6, 13, 0.85);
    backdrop-filter: blur(8px);
    place-items: center;
}

.result-modal.is-visible {
    display: grid;
    animation: modal-fade-in 0.3s ease;
}

.result-modal-content {
    background: rgba(11, 18, 35, 0.95);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    display: grid;
    gap: 16px;
    justify-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.result-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 40px;
}

.result-modal.result-win .result-modal-icon,
.result-modal.result-blackjack .result-modal-icon {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.result-modal.result-push .result-modal-icon {
    background: rgba(250, 204, 21, 0.2);
    border: 2px solid rgba(250, 204, 21, 0.5);
    color: #fde047;
}

.result-modal.result-lose .result-modal-icon {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.result-modal-content h2 {
    font-family: "Marcellus", "Times New Roman", serif;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.result-modal.result-win .result-modal-content h2,
.result-modal.result-blackjack .result-modal-content h2 {
    color: #4ade80;
}

.result-modal.result-push .result-modal-content h2 {
    color: #fde047;
}

.result-modal.result-lose .result-modal-content h2 {
    color: #f87171;
}

.result-modal-content p {
    color: var(--muted);
    font-size: 15px;
}

.result-modal-payout {
    font-size: 32px;
    font-weight: 700;
}

.result-modal.result-win .result-modal-payout,
.result-modal.result-blackjack .result-modal-payout {
    color: #4ade80;
}

.result-modal.result-push .result-modal-payout {
    color: #fde047;
}

.result-modal.result-lose .result-modal-payout {
    color: #f87171;
}

.result-modal .btn {
    margin-top: 8px;
    padding: 14px 32px;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .blackjack-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cards-display {
        flex-direction: column;
        gap: 16px;
    }

    .hand-group {
        flex-direction: column;
        gap: 8px;
    }

    .game-controls {
        flex-direction: column;
    }
}
