/* Scorpion Sports -- mobile first, dark, no external assets. */

:root {
  --bg: #0e1116;
  --surface: #171b22;
  --surface-2: #1e232c;
  --line: #2a303b;
  --text: #e6e9ef;
  --muted: #8b95a5;
  --accent: #f3361a;        /* sampled from the logo */
  --on-accent: #ffffff;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 12px;
  --pad: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- chrome --------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) var(--pad) 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-mark { height: 34px; width: auto; display: block; }
.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.refresh button {
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.refresh button:active { background: var(--accent); color: var(--on-accent); }

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px var(--pad) 0;
}
.tabs a {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tabs a.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

main { padding: 4px var(--pad) 24px; }

footer {
  padding: 0 var(--pad) 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
footer .dot { margin: 0 6px; }

/* --- flashes -------------------------------------------------------------- */

.flashes { list-style: none; margin: 12px var(--pad) 0; padding: 0; }
.flash {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.flash.ok { color: var(--ok); border-color: #245b39; }
.flash.error { color: var(--danger); border-color: #5b2424; }

/* --- headings ------------------------------------------------------------- */

.view-title {
  font-size: 20px;
  font-weight: 700;
  margin: 18px 0 10px;
  letter-spacing: -0.01em;
  border-left: 4px solid var(--team-color, var(--accent));
  padding-left: 10px;
}
.view-title .league {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 4px;
}

.day { margin-bottom: 18px; }
.day-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 8px;
}

/* --- game card ------------------------------------------------------------ */

.game {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--team-color, var(--accent));
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 8px;
}
/* Played games recede, but not so far that the score is hard to read. */
.game.past { opacity: 0.62; }
.game.next { background: var(--surface-2); border-color: var(--team-color, var(--accent)); }

.game-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.team-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--team-color, var(--accent));
  flex-shrink: 0;
}
.date-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 52px;
}
.matchup {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.time {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.score {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.score.w { color: var(--ok); }
.score.l { color: var(--muted); }
.score.t { color: var(--text); }

.final {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
.where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
}
.tv.tbd, .time.tbd { color: var(--muted); font-weight: 500; }

/* --- team picker ---------------------------------------------------------- */

.team-picker { margin-top: 14px; }
.team-picker select {
  width: 100%;
  appearance: none;
  background: var(--surface) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b95a5'%3E%3Cpath d='M4 6l4 4 4-4z'/%3E%3C/svg%3E") no-repeat right 12px center/16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 40px 13px 14px;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  font-weight: 600;
}

/* --- empty state ---------------------------------------------------------- */

.empty {
  text-align: center;
  padding: 28px 10px 14px;
}
.empty-head { margin: 0; font-size: 17px; font-weight: 600; }
.empty-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.empty-sub a { color: var(--accent); text-decoration: underline; }

/* --- wider screens -------------------------------------------------------- */

@media (min-width: 620px) {
  .topbar, .tabs, main, footer, .flashes { max-width: 640px; margin-inline: auto; }
  .tabs a { flex: 0 1 160px; }
}
