:root {
  --bg: #0f1216;
  --surface: #181c22;
  --surface-2: #20252d;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --accent: #c8102e;        /* Sydney United red */
  --accent-soft: #2a1418;
  --win: #22c55e;
  --draw: #9ca3af;
  --loss: #ef4444;
  --border: #2a313a;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 18px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 0 0 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  padding: 1rem 1rem 0.5rem;
}
.page-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.stale-banner {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.section h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.placeholder {
  color: var(--muted);
  font-size: 1rem;
}

/* Hero next-match card */
.hero-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}
.hero-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.hero-team { text-align: center; }
.hero-team img { width: 64px; height: 64px; object-fit: contain; }
.hero-team .name { font-weight: 600; font-size: 1.05rem; margin-top: 0.35rem; }
.hero-vs { color: var(--muted); font-size: 1rem; }
.hero-meta {
  display: grid;
  gap: 0.3rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}
.hero-meta .when { color: var(--text); font-weight: 600; font-size: 1.1rem; }

/* Fixture / result rows — each row is a small card */
.match-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}
.match-row:last-child { margin-bottom: 0; }

.match-row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.match-row-meta .date { color: var(--muted); }
.match-row-meta .right { color: var(--muted); text-align: right; font-weight: 600; }
.match-row-meta .right.win  { color: var(--win); }
.match-row-meta .right.draw { color: var(--draw); }
.match-row-meta .right.loss { color: var(--loss); }

.match-row-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.25;
}
.match-row-main .team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.match-row-main .team img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.match-row-main .team-name {
  word-break: break-word;
  font-weight: 500;
}
.match-row-main .team.us .team-name {
  color: var(--text);
  font-weight: 700;
}
.match-row-main .vs {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.match-row-venue {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Standings table */
.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.standings th, .standings td {
  padding: 0.5rem 0.35rem;
  text-align: right;
  border-top: 1px solid var(--border);
}
.standings th { color: var(--muted); font-weight: 500; }
.standings td.team-cell, .standings th.team-cell { text-align: left; }
.standings td.team-cell { display: flex; align-items: center; gap: 0.5rem; }
.standings td.team-cell img { width: 22px; height: 22px; object-fit: contain; }
.standings tr.us { background: var(--accent-soft); }
.standings tr.us td { color: var(--text); font-weight: 600; }

.page-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
}

@media (min-width: 600px) {
  .hero-team img { width: 80px; height: 80px; }
}
