:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c35;
    --panel: #16213f;
    --panel-border: rgba(148, 163, 184, 0.18);
    --text: #e5eefc;
    --muted: #9fb0d0;
    --primary: #38bdf8;
    --primary-strong: #0ea5e9;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: radial-gradient(circle at top, #172554 0, var(--bg) 55%);
    color: var(--text);
    min-height: 100vh;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #04111f;
    font-weight: 700;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input,
textarea,
select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: var(--text);
    padding: 0.85rem 0.95rem;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 0.45rem;
}

label span,
h4 {
    font-size: 0.95rem;
    color: var(--muted);
}

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

a {
    color: var(--text);
    text-decoration: none;
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.eyebrow {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    font-weight: 800;
}

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

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-links a {
    display: inline-flex;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.35);
}

.nav-stack {
    justify-content: flex-end;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
    gap: 1.5rem;
    align-items: start;
}

.section-stack,
.sidebar-stack {
    display: grid;
    gap: 1.5rem;
}

.sidebar-stack {
    position: sticky;
    top: 1rem;
}

.panel {
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.video-panel {
    margin-bottom: 1.5rem;
}

.info-cta-panel {
    margin-bottom: 1.5rem;
}

.video-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.75);
}

.video-frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.markdown-reader {
    display: grid;
    gap: 1rem;
    color: var(--text);
    line-height: 1.7;
}

.markdown-reader h1,
.markdown-reader h2 {
    margin-bottom: 0;
}

.markdown-reader p {
    margin-bottom: 0;
}

.markdown-reader hr {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin: 0;
}

.markdown-reader blockquote {
    margin: 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid rgba(56, 189, 248, 0.5);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 0 16px 16px 0;
    color: var(--muted);
}

.sticky-panel {
    position: sticky;
    top: 1rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
    font-size: 0.85rem;
}

.live-indicator::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.compact-form {
    align-content: start;
}

.bets-grid,
.bets-list {
    display: grid;
    gap: 1rem;
}

.bets-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.bet-card {
    background: linear-gradient(
        180deg,
        rgba(22, 33, 63, 0.95),
        rgba(15, 23, 42, 0.9)
    );
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    padding: 1.2rem;
}

.admin-summary-card {
    display: grid;
    gap: 1rem;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.bet-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-open {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.status-closed {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}

.bet-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.bet-title {
    margin-bottom: 0.45rem;
}

.pool-box {
    min-width: 120px;
    border-radius: 18px;
    padding: 0.9rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.16);
    text-align: right;
    margin-bottom: 0.5rem;
}

.pool-box span {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.pool-box strong {
    font-size: 1.15rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.compact-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.summary-card {
    border-radius: 18px;
    padding: 0.95rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.summary-card span {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.summary-card strong {
    font-size: 1.05rem;
}

.highlight-card {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.12);
}

.compact-highlight-card {
    margin: 1rem 0;
}

.options-list {
    display: grid;
    gap: 0.7rem;
}

.detail-options-list {
    margin-top: 1rem;
}

.option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.option-meta {
    display: grid;
    gap: 0.2rem;
}

.option-side-meta {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
}

.option-label {
    font-weight: 700;
}

.option-amount {
    color: var(--muted);
    font-size: 0.88rem;
}

.odd-pill {
    min-width: 72px;
    text-align: center;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.18),
        rgba(14, 165, 233, 0.24)
    );
    border: 1px solid rgba(56, 189, 248, 0.24);
    font-weight: 800;
    font-size: 1rem;
}

.options-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.option-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
    font-size: 0.88rem;
}

.winner-chip,
.winner-badge,
.winner-option-card {
    border-color: rgba(34, 197, 94, 0.28);
}

.winner-chip,
.winner-badge {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.winner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.winner-option-card {
    background: rgba(34, 197, 94, 0.1);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #04111f;
    font-weight: 700;
}

.admin-summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.player-row,
.stake-row {
    border-radius: 18px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.player-row + .player-row,
.stake-row + .stake-row {
    margin-top: 0.8rem;
}

.player-row-due,
.winning-stake-row {
    border-color: rgba(34, 197, 94, 0.24);
    background: rgba(34, 197, 94, 0.08);
}

.player-row-top,
.stake-row-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 0.8rem;
}

.stake-pseudo {
    font-size: 1rem;
}

.stake-meta {
    margin-bottom: 0;
}

.stake-amount-box {
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    font-weight: 800;
}

.stake-metrics {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
}

.closure-summary {
    margin-top: 1rem;
}

.closure-box {
    border-radius: 18px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.settlement-list {
    display: grid;
    gap: 0.65rem;
}

.settlement-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.danger-button {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white;
}

.empty-state {
    border-radius: 18px;
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.24);
}

.feedback {
    margin-bottom: 0;
    min-height: 1.2rem;
}

@media (max-width: 900px) {
    .hero,
    .panel-header,
    .bet-header,
    .admin-summary-footer,
    .player-row-top,
    .stake-row-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel,
    .sidebar-stack {
        position: static;
    }

    .option-side-meta {
        justify-items: start;
    }
}
