:root {
  color-scheme: dark;
  --bg: #0b111b;
  --surface: #111a27;
  --surface-2: #162233;
  --line: rgba(150, 174, 205, 0.13);
  --text: #f2f6fb;
  --muted: #7f91a9;
  --accent: #f2b46e;
  --accent-strong: #ff8a5a;
  --green: #61e5ad;
  --danger: #ff7b7b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 82% -10%, rgba(255, 143, 82, 0.11), transparent 32rem), var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 24px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 28px; }
.brand, .topbar-actions, .card-heading, .section-heading, .stat-title, .live-meta, .details-list div, footer, .note-card { display: flex; align-items: center; }
.brand { gap: 13px; }
.brand-mark, .login-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #111923; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); box-shadow: 0 10px 30px rgba(255, 138, 90, .18); font-size: 22px; font-weight: 900; }
.eyebrow, .card-label { margin: 0; color: var(--muted); font-size: 10px; letter-spacing: .16em; font-weight: 800; }
h1, h2, p { margin: 0; }
h1 { font-size: 19px; letter-spacing: -.03em; }
h2 { margin-top: 5px; font-size: 24px; letter-spacing: -.045em; }
.topbar-actions { gap: 10px; }
.connection-badge { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; padding: 8px 11px; color: var(--muted); font-size: 12px; }
.connection-badge i, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.connection-badge.is-online { color: var(--green); }
.connection-badge.is-online i, .live-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(97, 229, 173, .11); }
.connection-badge.is-offline { color: var(--danger); }
.connection-badge.is-offline i { background: var(--danger); }
.icon-button, .ghost-button { border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, .025); border-radius: 10px; }
.icon-button { width: 35px; height: 35px; font-size: 21px; line-height: 1; }
.icon-button.is-spinning { animation: spin .8s linear infinite; }
.ghost-button { padding: 8px 11px; font-size: 12px; }
.card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(22, 34, 51, .95), rgba(15, 24, 37, .95)); border-radius: 18px; box-shadow: var(--shadow); }
.hero-grid { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.55fr); gap: 16px; }
.live-card { min-height: 238px; padding: 25px; background: radial-gradient(circle at 90% 0%, rgba(255, 168, 90, .16), transparent 56%), linear-gradient(145deg, #18283b, #101927); }
.card-label { display: flex; align-items: center; gap: 8px; }
.live-number-row { display: flex; align-items: baseline; gap: 10px; margin: 19px 0 7px; }
.live-number-row strong { font-size: clamp(56px, 7vw, 88px); letter-spacing: -.09em; line-height: .9; }
.live-number-row span { color: var(--muted); font-size: 14px; }
.game-name { color: #c5d1df; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-meta { gap: 20px; margin-top: 29px; }
.live-meta span { display: flex; align-items: baseline; gap: 5px; }
.live-meta b { color: var(--text); font-size: 15px; }
.live-meta em { color: var(--muted); font-size: 11px; font-style: normal; }
.chart-card { min-height: 238px; padding: 25px 25px 18px; }
.card-heading { justify-content: space-between; gap: 15px; align-items: flex-start; }
.muted, .last-updated { color: var(--muted); font-size: 12px; }
.muted { margin-top: 6px; }
.chart-range { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chart-range span { color: var(--text); font-weight: 700; }
.chart { position: relative; height: 134px; margin-top: 21px; overflow: hidden; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.section-heading { justify-content: space-between; margin: 42px 0 17px; }
.history-table-card { margin-bottom: 12px; padding: 22px; }
.history-table-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.history-table-heading h3 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.04em; }
.period-select-wrap { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.period-select-wrap select { min-width: 190px; border: 1px solid var(--line); border-radius: 10px; outline: none; padding: 10px 12px; color: var(--text); background: #0d1622; }
.period-select-wrap select:focus { border-color: var(--accent); }
.selected-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 18px; }
.selected-summary div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(255, 255, 255, .025); }
.selected-summary span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.selected-summary strong { display: block; margin-top: 5px; color: var(--text); font-size: 23px; letter-spacing: -.06em; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.history-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
.history-table th { color: var(--muted); background: rgba(255, 255, 255, .025); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-align: right; }
.history-table th:first-child, .history-table td:first-child { text-align: left; }
.history-table th, .history-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.history-table tbody tr:last-child td { border-bottom: 0; }
.history-table td { color: #d9e2ed; text-align: right; }
.history-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.history-table td:first-child { color: var(--muted); }
.table-empty { padding: 28px !important; color: var(--muted) !important; text-align: center !important; }
.details-grid { display: grid; grid-template-columns: 1fr 1.38fr; gap: 12px; margin-top: 12px; }
.detail-card, .note-card { padding: 20px; }
.details-list { margin: 14px 0 0; }
.details-list div { justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.details-list div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 11px; } dd { max-width: 65%; margin: 0; overflow: hidden; color: #d9e2ed; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.note-card { align-items: flex-start; gap: 14px; color: #cad5e3; }
.note-card strong { display: block; margin-bottom: 7px; font-size: 13px; }
.note-card p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.note-icon { display: grid; flex: 0 0 auto; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--accent); background: rgba(242, 180, 110, .1); font-weight: 800; }
.login-panel { width: min(390px, 100%); margin: 15vh auto 0; padding: 30px; text-align: center; }
.login-mark { margin: 0 auto 22px; }
.login-panel h2 { margin-top: 8px; }
.login-panel > p:not(.eyebrow):not(.form-error) { margin-top: 9px; color: var(--muted); font-size: 13px; }
.login-panel form { margin-top: 23px; text-align: left; }
.login-panel label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.login-panel input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; padding: 12px; color: var(--text); background: #0d1622; }
.login-panel input:focus { border-color: var(--accent); }
.primary-button { width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 12px; color: #141b22; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); font-weight: 800; }
.form-error { min-height: 17px; margin-top: 10px; color: var(--danger); font-size: 11px; }
.error-toast { position: fixed; right: 20px; bottom: 20px; max-width: 360px; padding: 13px 15px; border: 1px solid rgba(255, 123, 123, .3); border-radius: 12px; color: #ffd1d1; background: #351d27; box-shadow: var(--shadow); font-size: 12px; }
footer { justify-content: space-between; margin-top: 28px; color: #506178; font-size: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .hero-grid, .details-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .shell { width: min(100% - 24px, 520px); padding-top: 17px; } .topbar { margin-bottom: 18px; } .connection-badge { padding: 7px 8px; font-size: 10px; } .ghost-button { display: none; } .hero-grid { gap: 10px; } .live-card, .chart-card { min-height: 218px; padding: 20px; } .live-number-row strong { font-size: 68px; } .chart { height: 115px; margin-top: 17px; } .section-heading { margin: 30px 0 13px; align-items: flex-end; } h2 { font-size: 21px; } .last-updated { max-width: 120px; text-align: right; line-height: 1.4; } .history-table-card { padding: 16px; } .history-table-heading { align-items: stretch; flex-direction: column; gap: 15px; } .period-select-wrap select { width: 100%; } .selected-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 17px 0 14px; } .selected-summary strong { font-size: 20px; } .history-table th, .history-table td { padding: 12px 11px; } .detail-card, .note-card { padding: 16px; } footer { margin-top: 20px; } }
