
:root {
  --bg: #091321;
  --surface: #111f30;
  --surface-2: #192b40;
  --border: #2a3b50;
  --text: #f4f7fb;
  --muted: #9aabc0;
  --red: #eb4555;
  --green: #57d3a0;
  --blue: #70b5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  background: #0d1929;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1250px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand strong {
  color: var(--red);
}

.brand-icon {
  font-size: 28px;
}

.header-tag, .eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

.page {
  max-width: 1250px;
  margin: auto;
  padding: 0 24px 80px;
}

.hero {
  padding: 75px 0 65px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 14px 0;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -3px;
}

.hero h1 span {
  color: var(--red);
}

.hero-description {
  color: var(--muted);
  max-width: 540px;
  font-size: 17px;
}

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 40px;
}

.tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 20px 2px;
  white-space: nowrap;
  font-weight: 700;
}

.tab:hover, .tab.active {
  color: white;
}

.tab.active {
  border-bottom-color: var(--red);
}

.panel[hidden] {
  display: none;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.section-heading h2 {
  font-size: 30px;
  margin: 5px 0;
}

.toolbar, .date-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 28px;
}

button, select, input[type="date"], .search-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 15px;
}

input[type="date"] {
  color-scheme: dark;
}

.secondary-btn:hover, .date-navigation button:hover {
  background: var(--surface-2);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}

.game-card, .team-card, .standing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.game-card {
  padding: 22px;
}

.game-card:hover, .team-card:hover {
  border-color: #59718d;
}

.game-top, .game-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.game-top {
  padding-bottom: 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.game-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.status.live {
  color: var(--green);
}

.live::before {
  content: "● ";
}

.matchup {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.score-team {
  display: flex;
  align-items: center;
  gap: 14px;
}

.score-team img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.team-info {
  flex: 1;
  min-width: 0;
}

.team-info strong {
  display: block;
  font-size: 17px;
}

.team-info small {
  display: block;
  color: var(--muted);
}

.score-number {
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.details-btn {
  color: var(--blue);
  background: none;
  border: none;
  padding: 5px;
  font-weight: 700;
}

.message {
  padding: 18px 0;
  color: var(--muted);
}

.message:empty {
  display: none;
}

.updated, .season-label {
  color: var(--muted);
  font-size: 13px;
}

.standings-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
}

.standing-card {
  padding: 18px;
}

.standing-card h3 {
  margin: 0 0 15px;
}

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

th, td {
  padding: 10px 6px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th:first-child, td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td img {
  width: 23px;
  height: 23px;
  vertical-align: middle;
  margin-right: 7px;
}

.search-input {
  width: 100%;
  max-width: 420px;
  margin-bottom: 25px;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.team-card {
  text-align: center;
  padding: 25px 15px;
}

.team-card img {
  height: 75px;
  width: 85px;
  object-fit: contain;
}

.team-card h3 {
  margin: 15px 0 5px;
  font-size: 16px;
}

.team-card p {
  font-size: 12px;
  color: var(--muted);
}

.game-dialog {
  width: min(650px, calc(100% - 24px));
  max-height: 85vh;
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.game-dialog::backdrop {
  background: rgba(0, 0, 0, .8);
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-top h2 {
  margin: 0 0 16px;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
}

.detail-teams {
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  gap: 15px;
  margin: 20px 0;
}

.detail-teams img {
  width: 65px;
  height: 65px;
}

.detail-score {
  font-size: 30px;
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 35px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p:first-child {
  color: white;
  font-weight: 800;
  letter-spacing: 2px;
}

@media (max-width: 600px) {
  .header-tag {
    display: none;
  }

  .hero {
    padding: 45px 0;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .date-navigation {
    width: 100%;
  }

  .date-navigation input {
    flex: 1;
    min-width: 0;
  }

  #team-filter {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}
