:root {
  --bg: #0c0f14;
  --bg-accent: #121a28;
  --surface: #161f2e;
  --surface-hover: #1c283c;
  --border: #2a3548;
  --text: #f0f4fa;
  --muted: #8b9aad;
  --accent: #5b9fd4;
  --accent-soft: rgba(91, 159, 212, 0.12);
  --safe-very-low: #f87171;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.5;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 159, 212, 0.15), transparent),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 40%);
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.status {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1rem;
  min-height: 1.25rem;
}

.status.error {
  color: var(--safe-very-low);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}

th.col-num,
td.col-num {
  text-align: right;
}

th.col-elo,
td.col-elo {
  width: 3rem;
  padding-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

th.col-pct,
td.col-pct {
  width: 1%;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: var(--surface-hover);
}

.team-cell {
  font-weight: 500;
}

.fixture-hint {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.15rem;
}

.pct-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.pct-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 3rem;
}

.pct-track {
  width: 3rem;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pct-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.875rem;
}

.page-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.page-footer a {
  color: var(--accent);
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

code {
  font-size: 0.85em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .page {
    padding: 1.25rem 0.75rem 2rem;
  }

  th,
  td {
    padding: 0.6rem 0.5rem;
  }

  th.col-pct {
    font-size: 0.625rem;
    max-width: 4.5rem;
    white-space: normal;
    line-height: 1.2;
  }

  .pct-track {
    display: none;
  }

  .pct-bar {
    gap: 0;
  }

  .pct-value {
    min-width: 2.75rem;
    font-size: 0.875rem;
  }

  .fixture-hint {
    font-size: 0.6875rem;
  }
}
