*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: #eef0ed;
  background-image:
    radial-gradient(ellipse 90% 70% at 8% 5%, rgba(72, 111, 237, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 95% 100%, rgba(44, 71, 207, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 88% 2%, rgba(255, 238, 130, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 55% 55% at 2% 95%, rgba(255, 238, 130, 0.28) 0%, transparent 55%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP ACCENT BAR ── */
.top-accent {
  height: 5px;
  background: linear-gradient(90deg, #c8a800 0%, #f0d000 45%, #ffe566 100%);
  flex-shrink: 0;
}

/* ── NAV ── */
nav {
  background: #133192;
  flex-shrink: 0;
}

.nav-desktop {
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 6px 20px 10px;
  gap: 2px;
}

.nav-mobile-label {
  color: rgba(255, 230, 80, 0.65);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.nav-logo {
  color: #f0d000;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 230, 80, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover { color: #ffe566; }

.nav-links a.active {
  color: #ffe566;
  border-bottom: 2px solid #ffe566;
  padding-bottom: 2px;
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
}

.card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 48px 52px 44px;
  width: 100%;
  max-width: 1000px;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
}

h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 3px;
  background: #f0d000;
  border-radius: 1px;
  margin-top: 14px;
}

/* ── ROUND NAV ── */
.round-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 36px;
}

.round-nav a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 13px;
  color: #444;
  text-decoration: none;
  border: 1px solid #ddd;
  background: #fafafa;
  transition: background 0.15s, color 0.15s;
}

.round-nav a:hover { background: #f0f0f0; color: #111; }

.round-nav a.active {
  background: #133192;
  color: #f0d000;
  border-color: #133192;
}

/* ── STANDINGS SECTIONS ── */
.standings-section {
  margin-bottom: 40px;
}

.section-heading {
  font-size: 17px;
  font-weight: 600;
  color: #111;
  margin-bottom: 12px;
}

.section-heading::after { display: none; }

/* ── DATA TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.data-table thead th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 13px;
  color: #555;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
}

.data-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

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

.data-table tbody td {
  padding: 12px 14px;
  color: #222;
  vertical-align: middle;
}

.col-num, .data-table thead th.col-num { text-align: right; }
.col-rank { width: 36px; color: #888; font-size: 13px; }
.col-date { white-space: nowrap; font-size: 13px; }
.col-points { font-weight: 700; }
.col-expand { width: 32px; text-align: center; }

.team-name { font-weight: 500; }

.positive { color: #2a7a3b; }
.negative { color: #b03020; }

.muted { color: #999; font-size: 12px; }

.data-table--compact tbody td { padding: 8px 14px; }

.division-link {
  color: #133192;
  text-decoration: none;
  font-weight: 500;
}

.division-link:hover { text-decoration: underline; }

/* ── PLAYER DETAILS (expand) ── */
.player-details summary {
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
  list-style: none;
  user-select: none;
  line-height: 1;
}

.player-details summary::-webkit-details-marker { display: none; }
.player-details[open] summary { color: #133192; }

.player-stats-popup {
  position: absolute;
  right: 52px;
  z-index: 10;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  min-width: 240px;
  padding: 8px 0;
}

.standings-table tbody tr { position: relative; }

.player-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.player-table th {
  padding: 6px 14px;
  font-weight: 600;
  color: #555;
  background: #f8f8f8;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.player-table td {
  padding: 7px 14px;
  color: #222;
  border-bottom: 1px solid #f5f5f5;
}

.player-table tr:last-child td { border-bottom: none; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #888;
}

footer a { color: #666; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: flex; }

  /* Mobile nav links sit where the logo would be — more prominent */
  .nav-mobile .nav-links {
    gap: 24px;
  }

  .nav-mobile .nav-links a {
    font-size: 15px;
    color: rgba(255, 230, 80, 0.9);
  }

  main { padding: 24px 12px; }

  .card { padding: 24px 16px; }

  /* Hide secondary table columns */
  .data-table .col-hide-mobile { display: none; }
}
