/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d0f13;
  --surface:  #161a22;
  --border:   #2a2f3a;
  --accent:   #f0a500;
  --accent2:  #e8420a;
  --text:     #e4e6eb;
  --muted:    #7a8394;
  --radius:   8px;
  --shadow:   0 4px 24px rgba(0,0,0,.5);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 2px solid var(--accent2);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
}

.logo { display: flex; align-items: baseline; gap: .5rem; }
.logo-cs {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .05em;
}
.logo-text { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ── Main ── */
main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Hero ── */
.hero { margin-bottom: 2.5rem; }
.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .4rem;
}
.subtitle { color: var(--muted); font-size: .95rem; }

/* ── Loading ── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--muted);
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-matches {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.hidden { display: none !important; }

/* ── Match cards ── */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color .2s;
}
.match-card:hover { border-color: var(--accent); }

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: .5rem;
}

.match-id {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-date {
  font-size: .8rem;
  color: var(--muted);
}

.match-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
  background: var(--accent2);
  color: #fff;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ── Maps table ── */
.maps-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.maps-table th:nth-child(1),
.maps-table td:nth-child(1) { width: 75px; }

.maps-table th:nth-child(2),
.maps-table td:nth-child(2) { width: 130px; }

.maps-table th:nth-child(4),
.maps-table td:nth-child(4) { width: 130px; }

.maps-table th,
.maps-table td {
  padding: .7rem 1.25rem;
  text-align: left;
  font-size: .875rem;
}

.maps-table th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.maps-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.maps-table tr:hover td { background: rgba(255,255,255,.025); }

.map-number {
  color: var(--muted);
  width: 75px;
}

.maps-table th:first-child {
  white-space: nowrap;
}

.map-name { font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.demo-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  padding: .3rem .75rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  transition: background .15s, color .15s;
}
.demo-link:hover {
  background: var(--accent);
  color: #000;
  text-decoration: none;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.team { font-weight: 600; color: var(--text); }
.vs   { font-size: .75em; color: var(--muted); margin: 0 .3em; }
