:root {
  color-scheme: dark;
  --bg: #0c0706;
  --surface: rgba(24, 14, 10, 0.78);
  --surface-strong: rgba(39, 22, 13, 0.92);
  --line: rgba(255, 209, 74, 0.22);
  --gold: #ffd24d;
  --gold-strong: #ffb21f;
  --red: #e1193f;
  --green: #3ecf8e;
  --cream: #fff6dc;
  --muted: #d8bf8b;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 25%, rgba(225, 25, 63, 0.22), transparent 25rem),
    radial-gradient(circle at 82% 8%, rgba(255, 210, 77, 0.18), transparent 26rem),
    linear-gradient(150deg, #090504 0%, var(--bg) 48%, #1d0e07 100%);
}

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

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 6, 5, 0.78);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 22px var(--shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold);
}

.status-page {
  padding: clamp(2rem, 5vw, 4rem) 0 3rem;
}

.status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(255, 210, 77, 0.32);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 178, 31, 0.1);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
  content: "";
}

.eyebrow.online::before {
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.eyebrow.stale::before {
  background: #f59e0b;
  box-shadow: 0 0 18px #f59e0b;
}

h1 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-pill-wrap {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
}

.status-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 16px rgba(62, 207, 142, 0.65);
}

.status-dot.offline,
.status-dot.stale {
  background: var(--red);
  box-shadow: 0 0 16px rgba(225, 25, 63, 0.55);
}

.status-dot.stale {
  background: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.55);
}

.status-meta {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tab-bar {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.tab-button {
  min-height: 42px;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab-button:hover {
  color: var(--cream);
  border-color: rgba(255, 210, 77, 0.28);
}

.tab-button[aria-selected="true"] {
  color: var(--gold);
  border-color: var(--line);
  background: rgba(255, 178, 31, 0.12);
}

.totals-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.65;
}

.totals-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.totals-unavailable .empty {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.panel {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.panel-head span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.player-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.player-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 280px;
}

.player-table th,
.player-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.player-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-table tr:last-child td {
  border-bottom: 0;
}

.player-table .empty {
  color: var(--muted);
  text-align: center;
}

.raw-json {
  margin: 0;
  padding: 1rem;
  overflow: auto;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  color: #f6e7c3;
  font-size: 0.82rem;
  line-height: 1.5;
}

.hidden {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
}

.button.small {
  min-height: 36px;
  font-size: 0.82rem;
}

footer {
  padding: 2rem 0 3rem;
  color: rgba(255, 246, 220, 0.56);
  text-align: center;
}

@media (max-width: 960px) {
  .stats-grid,
  .totals-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .totals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-bar {
    flex-wrap: wrap;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }
}

.stats-subnav {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.stats-subnav a {
  min-height: 42px;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.stats-subnav a:hover {
  color: var(--cream);
  border-color: rgba(255, 210, 77, 0.28);
}

.stats-subnav a[aria-current="page"] {
  color: var(--gold);
  border-color: var(--line);
  background: rgba(255, 178, 31, 0.12);
}

.records-hero {
  grid-template-columns: 1fr;
}

.records-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.records-unavailable .empty {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.65;
}

@media (max-width: 960px) {
  .records-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .records-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
