/* ---------------------------------
   GLOBAL VARIABLES
--------------------------------- */
:root {
  --bg: #0b0c0f;
  --bg-soft: #11131a;
  --text: #e7e9ee;
  --muted: #a9afbd;
  --card: #151823;
  --line: #23283a;
  --brand: #7aa2ff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --maxw: 980px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --bg-soft: #fff;
    --text: #11131a;
    --muted: #475065;
    --card: #ffffff;
    --line: #e7eaf1;
  }
}

/* ---------------------------------
   BASE
--------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg-soft) 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ---------------------------------
   NAVIGATION
--------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 24px var(--brand);
}
.links {
  display: flex;
  gap: 18px;
  align-items: center;
}
@media (max-width: 640px) {
  .nav { display: none; }
}

/* ---------------------------------
   HERO
--------------------------------- */
.hero {
  text-align: center;
  padding: 80px 0 50px 0;
}
h1 {
  font-size: clamp(42px, 7vw, 72px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
p.lead {
  font-size: clamp(18px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------------------------------
   LEADERBOARD CARD
--------------------------------- */
#leaderboard {
  padding: 40px 0 80px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.card__body { padding: 0; }

/* ---------------------------------
   LEADERBOARD TABLE
--------------------------------- */
table.leaderboard {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}
thead {
  background: color-mix(in oklab, var(--brand) 80%, black 10%);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
thead th {
  text-align: center;
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

/* ✅ Left-align Team & Organization headers */
thead th:nth-child(2),
thead th:nth-child(3) {
  text-align: left;
}

tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
tbody tr {
  transition: background var(--transition-fast), color var(--transition-fast);
}
tbody tr:hover {
  background: color-mix(in oklab, var(--bg-soft) 80%, var(--brand) 10%);
}
tbody tr:hover td {
  box-shadow: inset 0 0 0 9999px rgba(122, 162, 255, 0.05);
  color: var(--text);
}
tbody td:first-child {
  font-weight: bold;
  color: var(--brand);
}
tbody td:nth-child(2),
tbody td:nth-child(3) {
  text-align: left;
}

/* ---------------------------------
   SEASON SELECTOR
--------------------------------- */
#selector {
  text-align: center;
  padding: 20px 0;
}

#selector select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  transition: border var(--transition-fast), box-shadow var(--transition-fast);
}

#selector select:hover {
  border-color: var(--brand);
  box-shadow: 0 0 8px rgba(122, 162, 255, 0.3);
}

/* ---------------------------------
   FOOTER
--------------------------------- */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.muted { color: var(--muted); }

html, body {
  background-color: var(--background, #0e0e0e); /* or whatever your hero bg color is */
  overscroll-behavior: none; /* disables the bounce glow on Safari/iOS */
}

/* Hide scrollbar but keep scroll functionality */
html {
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}