:root {
  color-scheme: dark;
  --bg: #07080d;
  --elev: rgba(16, 20, 28, 0.86);
  --card: #141a26;
  --card-2: #1b2333;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #93a0b5;
  --gold: #f0c14d;
  --gold-ink: #1a1406;
  --live: #ff5d6c;
  --ok: #3ddc97;
  --warn: #ffb020;
  --danger: #ff8b8b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --sans: "Outfit", "Segoe UI", sans-serif;
  --score: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(240, 193, 77, 0.16), transparent 55%),
    radial-gradient(800px 480px at 110% 0%, rgba(80, 140, 255, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: var(--gold); }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: rgba(7, 8, 13, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { grid-column: 1; }
.datebar { grid-column: 2; }
.account { grid-column: 3; justify-self: end; }
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #f6d36b, #c8922a);
  color: var(--gold-ink);
  font-family: var(--score);
  font-weight: 700;
  font-size: 18px;
}
.brand b { display: block; letter-spacing: 0.08em; font-size: 13px; }
.brand small { color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.datebar { display: flex; justify-content: center; align-items: center; gap: 8px; }
.datebar[hidden] { display: none; }
.icon-btn, .today, .gold, .ghost, .chip, .tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}
.icon-btn { width: 36px; height: 36px; }
.date-read { display: flex; flex-direction: column; align-items: center; min-width: 180px; }
.date-read strong { font-size: 15px; }
.date-read input {
  width: 32px;
  background: transparent;
  border: 0;
  color: transparent;
  cursor: pointer;
}
.date-read input::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(1); opacity: 0.8; }
.today { padding: 4px 10px; color: var(--gold); }
.account { display: flex; align-items: center; gap: 10px; }
.live-count { color: var(--live); font-size: 13px; font-weight: 600; }
.ghost, .gold { padding: 8px 14px; }
.gold { background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 650; }
.desktop-nav { display: flex; justify-content: center; gap: 8px; padding: 10px 16px 0; }
.desktop-nav a, .tab {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
}
.desktop-nav a[aria-current="page"], .tab[aria-current="page"] {
  color: var(--gold-ink);
  background: var(--gold);
  border-color: transparent;
}
main { width: min(1180px, calc(100% - 28px)); margin: 18px auto 40px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; flex: 1 1 240px; min-width: 0; }
@media (min-width: 801px) {
  .chips { flex-wrap: wrap; overflow: visible; }
}
.chip { padding: 7px 12px; color: var(--muted); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text); color: #111; border-color: transparent; }
.search, .field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.search { min-width: 180px; }
.switch { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.game {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--away) 42%, transparent), transparent 38%),
    linear-gradient(270deg, color-mix(in srgb, var(--home) 42%, transparent), transparent 38%),
    var(--card);
  box-shadow: var(--shadow);
}
.game.state-post { opacity: 0.78; }
.game-top, .side, .match, .player, .feed-item, .panel-head { display: flex; align-items: center; gap: 10px; }
.game-top { justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.side { margin-top: 10px; }
.side img, .player img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #f4f7fb;
  border-radius: 50%;
  padding: 3px;
}
.side .name { flex: 1; min-width: 0; }
.side b { font-family: var(--score); font-size: 28px; letter-spacing: 0.04em; display: block; line-height: 0.9; }
.side small, .muted { color: var(--muted); }
.score { margin-left: auto; font-family: var(--score); font-size: 40px; line-height: 1; }
.game footer { margin-top: 10px; color: var(--text); font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 8px; background: rgba(0, 0, 0, 0.28); }
.pill.live { color: white; background: var(--live); letter-spacing: 0.08em; }
.dot { width: 7px; height: 7px; border-radius: 99px; background: white; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.banner, .note, .empty, .panel, .login, .setup-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--elev);
  padding: 16px;
}
.banner { margin-bottom: 12px; color: var(--danger); }
.note { margin-bottom: 12px; color: var(--gold); }
.empty { color: var(--muted); text-align: center; padding: 36px 16px; }
.stack { display: grid; gap: 14px; }
.panel-head { justify-content: space-between; align-items: flex-start; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.panel h2, .login h1, .setup-card h2 { margin: 4px 0; font-size: 28px; letter-spacing: -0.03em; }
.standing { color: var(--gold); font-size: 14px; }
.match { justify-content: space-between; margin: 16px 0; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); }
.match .big { font-family: var(--score); font-size: 54px; line-height: 0.85; }
.match .big.lead { color: var(--gold); }
.match .who { display: block; color: var(--muted); margin-top: 4px; }
.tonight { display: grid; gap: 8px; }
.player { padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.player.live { outline: 1px solid rgba(255, 93, 108, 0.7); }
.player .grow { flex: 1; min-width: 0; }
.player .pts { font-family: var(--score); font-size: 24px; }
.slot { margin-left: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.feed-item { align-items: stretch; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-item time { width: 76px; color: var(--gold); font-variant-numeric: tabular-nums; }
.delta { color: var(--ok); font-weight: 650; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.login, .setup-grid { width: min(760px, 100%); margin: 0 auto; }
.setup-grid { display: grid; gap: 14px; }
.steps { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.form { display: grid; gap: 10px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field span { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.tabbar { display: none; }
.status { min-height: 1.2em; color: var(--muted); }

@media (max-width: 800px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { grid-column: 1; grid-row: 1; }
  .account { grid-column: 2; grid-row: 1; }
  .datebar { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .date-read { min-width: 0; flex: 1; }
  .desktop-nav { display: none; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(7, 8, 13, 0.94);
    border-top: 1px solid var(--line);
    z-index: 20;
  }
  .tab { text-align: center; border-radius: 12px; }
  main { width: min(1180px, calc(100% - 20px)); margin-bottom: 120px; }
  .panel h2 { font-size: 24px; }
  .match .big { font-size: 44px; }
  .search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}
