/* ── PAGE LOADING ─────────────────────────────────────────────────── */

.results-loading {
  padding: 6rem 3rem;
  text-align: center;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
}

/* ── PAGE HEADER ──────────────────────────────────────────────────── */

.results-page-header {
  padding: 3rem 3rem 2rem;
  border-bottom: 1px solid var(--border);
}

/* ── BODY ─────────────────────────────────────────────────────────── */

.results-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 3rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ── SECTIONS ─────────────────────────────────────────────────────── */

.results-section {}

.results-section-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.results-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}

/* ── TABLE ────────────────────────────────────────────────────────── */

.results-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.results-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
}

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.results-table tbody tr:last-child { border-bottom: none; }

.results-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.results-table tbody tr.row-first { background: rgba(0,229,160,0.05); }
.results-table tbody tr.row-first:hover { background: rgba(0,229,160,0.09); }

.results-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

/* Column widths */
.col-rank  { width: 52px; font-family: 'Space Mono', monospace; font-size: 13px; color: var(--muted); }
.col-team  { min-width: 160px; }
.col-test  { text-align: right; font-family: 'Space Mono', monospace; color: var(--muted); white-space: nowrap; }
.col-score { text-align: right; font-family: 'Space Mono', monospace; font-size: 15px; color: var(--muted); }
.col-total {
  text-align: right;
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.row-first .col-total { color: var(--accent); }

/* Team link */
.results-team-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.results-team-link:hover { color: var(--accent); }

/* Score link (opens read-only scoresheet) */
.results-score-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  transition: color 0.15s, border-color 0.15s;
}
.results-score-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── BACK LINK ────────────────────────────────────────────────────── */

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ── "FULL RESULTS" LINK ON EVENT PAGE ────────────────────────────── */

.comp-results-link {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
  margin-bottom: 0.4rem;
}
.comp-results-link:hover { opacity: 1; }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .results-page-header { padding: 2rem 1.5rem 1.5rem; }
  .results-body { padding: 1.5rem 1.5rem 3rem; }
}
