:root {
  --bg: #0b0e13;
  --panel: #12161d;
  --panel-border: #22283380;
  --accent: #ff6b35;
  --accent2: #2e7cf6;
  --text: #e8edf4;
  --text-dim: #8b95a5;
  --final: #5b6472;
  --live: #19c37d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(180deg, #14181f, #0f1217);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.brand h1 {
  font-size: 18px;
  letter-spacing: 2px;
  margin: 0;
  font-weight: 800;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#game-date {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

#today-btn {
  background: var(--accent);
  color: #1a1206;
  border: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

#today-btn:hover { opacity: 0.85; }

main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.status-line {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 18px;
  min-height: 16px;
}

.games-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading, .empty, .error {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
  font-size: 16px;
}

.error { color: #f06565; }

.game-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s, border-color 0.15s;
}

.game-card:hover {
  border-color: #343c4a;
  transform: translateY(-1px);
}

.team-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff1;
}

.team-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.team-score {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}

.team.winner .team-name { color: #fff; }
.team.winner .team-score { color: var(--accent); }
.team.loser .team-score, .team.loser .team-name { color: var(--text-dim); }

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 110px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge.final { background: #2a2f3a; color: var(--final); }
.badge.scheduled { background: #1e2a3f; color: var(--accent2); }
.badge.live { background: #103528; color: var(--live); }

.venue {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
}

footer {
  text-align: center;
  padding: 18px;
  color: var(--text-dim);
  font-size: 12px;
  border-top: 1px solid var(--panel-border);
}

footer a { color: var(--accent2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .topbar { padding: 14px 16px; }
  main { padding: 16px; }
  .game-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .meta { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
  .venue { text-align: left; }
}
