:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8e8ec;
  --muted: #8b8f99;
  --red: #e14b4b;
  --blue: #4b8fe1;
  --accent: #35c2a8;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0 1rem 3rem;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.3rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
}

form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0;
}

button {
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

input[type=file] { color: var(--text); }

.note { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--red); }
.error-detail { white-space: pre-wrap; background: #000; padding: 1rem; border-radius: 6px; font-size: 0.8rem; color: #ff9d9d; }

.teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 700px) {
  .teams { grid-template-columns: 1fr; }
}

.team img { width: 100%; border-radius: 8px; border: 1px solid #2a2d36; }
.team-red h2 { color: var(--red); }
.team-blue h2 { color: var(--blue); }

table.stats { width: 100%; margin-top: 0.75rem; border-collapse: collapse; }
table.stats th, table.stats td { text-align: left; padding: 0.25rem 0.5rem; border-bottom: 1px solid #2a2d36; font-size: 0.9rem; }
table.stats th { color: var(--muted); font-weight: 500; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid #2a2d36;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
