:root {
  --bg0: #071018;
  --bg1: #0d1a24;
  --panel: rgba(14, 28, 38, 0.82);
  --line: rgba(146, 196, 214, 0.16);
  --text: #e7f2f6;
  --muted: #8aa4b3;
  --ice: #7fd0e8;
  --ice-dim: #3a8aa3;
  --glow: rgba(127, 208, 232, 0.18);
  --win: #8fdbb0;
  --danger: #e08b7a;
  --font-display: "Archivo Black", sans-serif;
  --font-body: "Sora", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg0);
  line-height: 1.5;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(90, 160, 190, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(40, 90, 120, 0.28), transparent 55%),
    linear-gradient(180deg, #0a1620 0%, #071018 45%, #050b10 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 70% 18%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.28), transparent);
  background-size: 180px 180px;
  animation: drift 40s linear infinite;
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(40px); }
}

.site-header, .shell, .site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ice-dim);
  border-radius: 0.4rem;
  color: var(--ice);
  font-family: var(--font-mono);
  font-weight: 600;
  box-shadow: 0 0 24px var(--glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand-text em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
nav a, .section-head a, .pager a {
  color: var(--ice);
  text-decoration: none;
  font-size: 0.92rem;
}
nav a:hover, .section-head a:hover { color: var(--text); }

.shell { padding: 1.5rem 0 3rem; }
.hero, .page-intro { margin-bottom: 2rem; }
.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--ice);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.01em;
  line-height: 0.95;
}
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
h2.win { color: var(--win); }
.lede, .page-intro p {
  max-width: 38rem;
  color: var(--muted);
  margin: 0.85rem 0 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-width: 28rem;
}
.stat-strip.compact { margin-top: 1rem; }
.stat-strip div {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 0.5rem;
}
.stat-strip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
}
.stat-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.section-head, .site-footer, .pager {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.board-block { margin-bottom: 1.5rem; }
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 0.65rem;
  padding: 1rem;
  backdrop-filter: blur(8px);
  overflow: auto;
}
.mono-table {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
  color: #d7ebf2;
  white-space: pre;
}
.mono-table a { color: var(--ice); text-decoration: none; }
.mono-table a:hover { text-decoration: underline; }

.list { padding: 0.35rem; }
.match-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.85rem;
  color: inherit;
  text-decoration: none;
  border-radius: 0.45rem;
}
.match-row:hover { background: rgba(127, 208, 232, 0.08); }
.match-row strong { display: block; }
.match-row span, .match-row .meta, .match-row small {
  color: var(--muted);
  font-size: 0.86rem;
}
.match-row .meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  white-space: nowrap;
}
.empty { color: var(--muted); padding: 0.75rem; margin: 0; }

.player-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.player-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.player-list a { color: var(--ice); text-decoration: none; }
.delta { color: var(--muted); font-family: var(--font-mono); font-size: 0.82rem; }

.search-form {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.search-form input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0.45rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
}
.search-form button {
  border: 0;
  border-radius: 0.45rem;
  padding: 0.75rem 1rem;
  background: var(--ice);
  color: #041018;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.pager { margin-top: 1rem; color: var(--muted); }

.score-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.5rem;
}
.team-score {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 0.65rem;
  padding: 1.1rem 1.2rem;
  text-align: center;
}
.team-score.win {
  border-color: rgba(143, 219, 176, 0.45);
  box-shadow: 0 0 28px rgba(143, 219, 176, 0.12);
}
.team-score .team-name {
  display: block;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}
.team-score strong {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1;
}
.score-hero .vs {
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.match-row.static { cursor: default; }
.match-row.static:hover { background: transparent; }
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem;
}
.grid-2.tight { gap: 0.75rem; margin-bottom: 0.85rem; }
.t2-compact-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.t2-compact-head strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.t2-compact-head span { color: var(--muted); font-size: 0.86rem; }
.t2-compact-score {
  display: flex;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.win-text { color: var(--win); }
.view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
}
.btn, .btn-active, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn {
  background: var(--ice);
  color: #041018;
}
.btn-secondary {
  background: transparent;
  color: var(--ice);
  border-color: var(--line);
}
.btn-active {
  background: rgba(127, 208, 232, 0.14);
  color: var(--text);
  border-color: var(--ice-dim);
}
@media (max-width: 800px) {
  .score-hero { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .grid-2, .stat-strip { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .match-row { flex-direction: column; }
  .match-row .meta { text-align: left; }
}
