:root {
  color-scheme: dark;
  --bg: #081019;
  --surface: #111b27;
  --surface-strong: #172434;
  --text: #f6f8fb;
  --muted: #a9b6c6;
  --line: rgba(255, 255, 255, .13);
  --green: #23d18b;
  --blue: #69a7ff;
  --red: #ff6a70;
  --amber: #f2bd5c;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #071019;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  isolation: isolate;
  min-height: min(640px, 66vh);
  overflow: hidden;
  padding: 24px clamp(18px, 5vw, 72px) 40px;
  background-image: url("images/background.png");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -120px 120px rgba(7, 16, 25, .72);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 8, 14, .9) 0%, rgba(3, 8, 14, .66) 42%, rgba(3, 8, 14, .18) 78%),
    linear-gradient(180deg, rgba(3, 8, 14, .74) 0%, rgba(3, 8, 14, .08) 45%, rgba(3, 8, 14, .84) 100%);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, #071019 88%);
}

.nav,
.hero {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto clamp(54px, 11vh, 120px);
  max-width: 1180px;
}

.brand {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: rgba(246, 248, 251, .78);
  font-weight: 750;
  text-decoration: none;
}

.nav-link:hover,
.active-link {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3.1rem, 8vw, 6.9rem);
  line-height: .88;
  letter-spacing: 0;
  text-shadow: 0 10px 42px rgba(0, 0, 0, .58);
}

.intro {
  margin: 26px 0 0;
  max-width: 620px;
  color: rgba(246, 248, 251, .78);
  font-size: 1.12rem;
  line-height: 1.65;
  text-shadow: 0 8px 28px rgba(0, 0, 0, .52);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 12, 20, .58);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--red));
}

.hero-panel strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.18;
}

.hero-panel p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.compact-header {
  min-height: 420px;
}

.compact-hero {
  grid-template-columns: minmax(0, 1fr);
}

main {
  padding: 28px clamp(18px, 5vw, 72px) 58px;
}

.toolbar,
.summary,
.scores-panel,
.tables-panel,
.scorers-panel,
.fixtures {
  max-width: 1180px;
  margin-inline: auto;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(140px, 180px);
  gap: 18px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 25, .78);
  backdrop-filter: blur(12px);
}

.search-box span,
.group-filter span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #0b1420;
  color: var(--text);
  font: inherit;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  cursor: pointer;
}

input:focus,
select:focus {
  border-color: rgba(35, 209, 139, .75);
  box-shadow: 0 0 0 3px rgba(35, 209, 139, .14);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  border-color: rgba(255, 255, 255, .3);
}

button.active {
  border-color: var(--green);
  background: var(--green);
  color: #04150f;
}

.summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary div {
  min-width: 0;
  padding: 17px 18px;
  background: rgba(17, 27, 39, .72);
}

.summary div > span {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#next-match {
  display: flex;
  align-items: center;
  gap: .28em;
}

.summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.fixtures {
  margin-top: 28px;
}

.scores-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 27, 39, .72);
}

.about-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 27, 39, .72);
}

.about-panel h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.about-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.contact-panel {
  display: grid;
  gap: 6px;
  margin-top: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 25, .72);
}

.contact-panel span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-panel a {
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 900;
  text-decoration-color: rgba(35, 209, 139, .65);
  text-underline-offset: 4px;
}

.standalone-scores {
  margin-top: 0;
}

.scores-header,
.tables-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 18px;
  align-items: end;
  min-width: 0;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.scores-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.tables-panel {
  margin-top: 0;
}

.tables-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.table-control {
  display: block;
  min-width: 0;
}

.table-control span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.tables-list {
  display: grid;
  gap: 28px;
  margin-top: 18px;
}

.group-table h3 {
  margin: 0 0 8px;
  color: rgba(246, 248, 251, .72);
  font-size: 1.28rem;
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 0;
  scrollbar-color: rgba(255, 255, 255, .32) transparent;
}

.group-table table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.group-table thead,
.scorers-table thead {
  background: rgba(255, 255, 255, .065);
}

.group-table th,
.group-table td,
.scorers-table th,
.scorers-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  text-align: center;
  white-space: nowrap;
}

.group-table thead th,
.scorers-table thead th {
  color: rgba(246, 248, 251, .88);
  font-size: .94rem;
  font-weight: 900;
}

.group-table tbody td,
.group-table tbody th,
.scorers-table tbody td,
.scorers-table tbody th {
  color: rgba(246, 248, 251, .72);
  font-size: 1.02rem;
  font-weight: 650;
}

.group-table tbody tr:nth-child(2) td,
.group-table tbody tr:nth-child(2) th {
  border-bottom-color: rgba(246, 248, 251, .58);
}

.group-table .table-position {
  width: 48px;
  color: rgba(246, 248, 251, .78);
  text-align: center;
}

.group-table .table-team {
  min-width: 250px;
  text-align: left;
}

.team-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 950;
  line-height: 1.1;
}

.table-points {
  color: var(--text) !important;
  font-size: 1.72rem !important;
  font-weight: 950 !important;
  line-height: 1;
}

.scorers-panel {
  margin-top: 0;
}

.scorers-scroll {
  margin-top: 12px;
}

.scorers-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.scorers-table .table-position,
.scorers-table .scorer-player {
  text-align: left;
}

.scorer-player {
  color: var(--text) !important;
  font-size: 1.14rem !important;
  font-weight: 950 !important;
}

.scorer-goals {
  color: var(--text) !important;
  font-size: 1.72rem !important;
  font-weight: 950 !important;
  line-height: 1;
}

.table-form {
  min-width: 126px;
}

.form-list,
.form-empty {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.form-result,
.form-empty span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
}

.form-empty span {
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, .14);
}

.form-w {
  background: var(--green);
  color: #04150f;
}

.form-d {
  background: rgba(255, 255, 255, .16);
  color: var(--text);
}

.form-l {
  background: var(--red);
  color: #240508;
}

.focus-team-row {
  background: rgba(35, 209, 139, .055);
}

.short-label {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.score-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.score-controls label {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.score-controls span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.score-controls input,
.score-controls select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#score-date {
  display: block;
  font-size: 1rem;
  text-align: left;
}

#score-date::-webkit-date-and-time-value {
  margin: 0;
  text-align: left;
}

.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.fixture-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.fixture-summary div {
  min-width: 0;
  padding: 16px;
  background: rgba(8, 16, 25, .72);
}

.fixture-summary small {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 800;
}

.fixture-summary span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.fixture-time {
  color: var(--green);
  font-size: .9rem;
}

.score-status {
  margin-top: 16px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.score-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.score-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 25, .72);
}

.score-card.is-live,
.live-card {
  border-color: rgba(35, 209, 139, .48);
  box-shadow: inset 4px 0 0 var(--green);
}

.score-time strong,
.score-time span {
  display: block;
}

.score-time strong {
  color: var(--green);
  font-size: .9rem;
}

.score-time span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.score-teams {
  display: grid;
  gap: 6px;
}

.score-teams div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2ch;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.score-teams span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-teams strong {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  text-align: right;
}

.score-teams .winner {
  color: var(--text);
}

.score-teams .muted {
  color: var(--muted);
}

.inline-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline: .16em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: .9em;
  white-space: nowrap;
}

.inline-score strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.inline-score.is-live {
  color: var(--text);
}

.inline-score.is-complete {
  color: var(--muted);
}

.score-status-inline {
  color: var(--muted);
  font-size: .76em;
  font-weight: 950;
  text-transform: uppercase;
}

.live-indicator,
.result-indicator,
.live-badge,
.watch-live {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.live-indicator,
.live-badge,
.watch-live {
  background: var(--green);
  color: #04150f;
}

.score-card .live-badge {
  background: #9af2c7;
  color: #02110b;
  font-size: .7rem;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(2, 17, 11, .18);
}

.result-indicator {
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
}

.live-badge {
  margin-top: 8px;
  width: max-content;
}

.watch-live {
  margin-left: .16em;
  text-decoration: none;
}

.day {
  margin: 0 0 32px;
}

.day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.day h2 {
  margin: 0;
  font-size: 1rem;
}

.day-count {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}

.cards {
  display: grid;
  gap: 10px;
}

.card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, auto);
  gap: 18px;
  align-items: center;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 27, 39, .86);
}

.time {
  color: var(--green);
  font-size: 1.28rem;
  font-weight: 950;
}

.match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .28em;
  margin: 0;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1.3;
}

.team {
  display: inline-flex;
  align-items: center;
  gap: .34em;
}

.flag {
  display: inline-block;
  font-size: .95em;
  line-height: 1;
}

.flag-img {
  width: .98em;
  height: .59em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28);
  object-fit: cover;
  vertical-align: -.05em;
}

.versus {
  margin-inline: .12em;
  color: rgba(246, 248, 251, .76);
  font-size: .9em;
  font-weight: 850;
}

.meta {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}

.tag.bbc {
  border-color: rgba(105, 167, 255, .42);
  color: #d7e8ff;
}

.tag.itv {
  border-color: rgba(255, 106, 112, .42);
  color: #ffd7d9;
}

.empty {
  margin: 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(17, 27, 39, .55);
}

.footer {
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.55;
}

.footer a {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-header {
    min-height: auto;
    background-position: center top;
  }

  .hero,
  .toolbar,
  .scores-header,
  .tables-header {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }

  .card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .channels {
    grid-column: 2;
    justify-content: flex-start;
  }

  .score-controls {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  #score-date {
    min-height: 44px;
    padding-inline: 12px;
  }

  .fixture-summary {
    grid-template-columns: 1fr;
  }

  .group-table table {
    min-width: 820px;
  }

  .scorers-table {
    min-width: 720px;
  }

  .group-table th,
  .group-table td {
    padding: 12px 10px;
  }

  .team-name {
    font-size: 1.1rem;
  }

  .wide-label {
    display: none;
  }

  .short-label {
    display: inline;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 18px;
    padding-bottom: 58px;
    background-position: 58% top;
  }

  .nav {
    margin-bottom: 38px;
  }

  h1 {
    font-size: clamp(2.7rem, 18vw, 4.2rem);
  }

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

  .card {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .channels {
    grid-column: auto;
  }

  .day-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .group-table h3 {
    font-size: 1.12rem;
  }

  .group-table table {
    min-width: 740px;
  }

  .group-table .table-team {
    min-width: 190px;
  }

  .team-name {
    gap: 9px;
    font-size: 1rem;
  }

  .table-points {
    font-size: 1.38rem !important;
  }
}
