:root {
  color-scheme: light;
  --ink: #f7f8fb;
  --muted: #9ca3af;
  --line: #2a2d33;
  --panel: #17191d;
  --panel-soft: #202329;
  --blue: #111315;
  --blue-deep: #101113;
  --teal: #ccff00;
  --gold: #d6a83a;
  --red: #c13f3f;
  --green: #1d8f5b;
  --lime: #ccff00;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.ranking-table-wrap::-webkit-scrollbar,
.nav-actions::-webkit-scrollbar,
.knockout-grid::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #101113;
  -ms-overflow-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 54px;
  border-bottom: 18px solid #050607;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(204, 255, 0, 0.2), transparent 24%),
    radial-gradient(circle at 14% 92%, rgba(204, 255, 0, 0.1), transparent 28%),
    linear-gradient(135deg, #101113 0%, #14161a 62%, #0f1012 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% 36%;
  height: 520px;
  border-radius: 50%;
  background: rgba(204, 255, 0, 0.08);
  transform: rotate(-8deg);
}

.nav,
.hero-grid,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.nav {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 48px;
}

.brand > span:last-child {
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: var(--lime);
  color: #101113;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid rgba(204, 255, 0, 0.16);
  border-radius: 999px;
  background: rgba(23, 25, 29, 0.72);
  overflow-x: auto;
  transform: translateY(0);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.nav-actions a,
.nav-link {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1;
}

.nav-actions a:hover,
.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-link.is-active {
  background: var(--lime);
  border-color: rgba(255, 255, 255, 0.75);
  color: #101113;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
  padding: 22px 0 30px;
}

body:not([data-active-page="home"]) .hero-grid {
  display: none;
}

body:not([data-active-page="home"]) .hero {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 19, 0.96);
  backdrop-filter: blur(14px);
}

body:not([data-active-page="home"]) .nav {
  padding: 14px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--lime);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 4.8vw, 60px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 660px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button.primary {
  background: var(--lime);
  color: #101113;
}

.button.secondary {
  border: 1px solid rgba(204, 255, 0, 0.42);
  background: transparent;
  color: #fff;
}

.tournament-card,
.home-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(204, 255, 0, 0.22);
  border-radius: 8px;
  background: rgba(23, 25, 29, 0.86);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.panel-topline {
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-score {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.home-score span,
.home-score small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.home-score strong {
  display: block;
  margin: 4px 0;
  color: #fff;
  font-size: 52px;
  line-height: 0.92;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-nav-grid button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: #fff;
  text-align: center;
  cursor: pointer;
}

.quick-nav-grid button:hover {
  border-color: var(--lime);
}

.quick-nav-grid strong,
.quick-nav-grid span {
  display: block;
}

.quick-nav-grid strong {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1.1;
}

.quick-nav-grid span {
  position: absolute;
  top: calc(50% + 16px);
  left: 10px;
  right: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}

.card-label,
.card-note {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.pot-value {
  display: block;
  margin: 2px 0;
  color: #fff;
  font-size: 56px;
  line-height: 1;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.mini-stats div {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-stats dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-stats dd {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 800;
}

.section {
  padding: 42px 0 0;
}

.dashboard-section {
  padding-top: 34px;
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.section:last-child {
  padding-bottom: 70px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.section-heading p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.55;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi,
.prize-card,
.group-table,
.fixtures-panel,
.draw-card,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi {
  padding: 22px;
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.kpi .mini-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.kpi .mini-list span {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.kpi .mini-list b {
  display: block;
  color: #fff;
  font-size: 15px;
}

.kpi .mini-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.result-winner {
  color: var(--lime);
}

.kpi small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.prize-card {
  position: relative;
  min-height: 156px;
  padding: 18px;
  overflow: hidden;
}

.prize-card.compact {
  min-height: 180px;
}

.leaderboard-card {
  grid-column: span 2;
  min-height: 220px;
}

.prize-card .amount {
  color: var(--lime);
  font-size: 26px;
  font-weight: 800;
}

.prize-card h3 {
  margin-top: 12px;
  font-size: 16px;
}

.prize-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.leader-name {
  display: block;
  margin-top: 18px;
  color: #fff;
  font-size: 18px;
}

.prize-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.leader-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: var(--panel-soft);
}

.leader-row span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(204, 255, 0, 0.15);
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}

.leader-row strong,
.leader-row small {
  grid-column: 2;
}

.leader-row strong {
  color: #fff;
}

.leader-row small {
  margin-top: -4px;
}

.empty-state {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.leader {
  display: inline-flex;
  margin-top: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.leader-detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.group-table {
  overflow: hidden;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #111315;
  color: #fff;
  font-weight: 800;
}

.group-title span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

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

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

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

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

tr:last-child td {
  border-bottom: 0;
}

.group-table tbody tr:nth-child(-n + 2) td {
  color: var(--lime);
  font-weight: 850;
}

.group-table tbody tr:first-child td {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.group-table tbody tr:first-child td:first-child {
  font-size: 16px;
}

.group-table tbody tr:nth-child(3) td {
  color: #9ca3af;
  font-weight: 700;
  background: rgba(156, 163, 175, 0.08);
}

.ranking-panel tbody td {
  color: #fff;
}

.fixtures-panel {
  overflow: hidden;
}

.fixture-row {
  display: grid;
  grid-template-columns: 110px 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.fixture-row:last-child {
  border-bottom: 0;
}

.fixture-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fixture-team {
  font-weight: 800;
}

.fixture-vs {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.draw-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.draw-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
}

.draw-card strong {
  display: block;
}

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

.rank-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(204, 255, 0, 0.12);
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}

.rankings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking-panel {
  padding: 18px;
}

.ranking-panel.full {
  grid-column: 1 / -1;
}

.ranking-panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-item:last-child {
  border-bottom: 0;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 34px;
  border-radius: 999px;
  background: var(--lime);
  color: #101113;
  font-weight: 900;
}

.ranking-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.ranking-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.knockout-grid {
  overflow-x: visible;
  padding: 4px 0 14px;
}

.final-showcase {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid rgba(204, 255, 0, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(204, 255, 0, 0.18), rgba(204, 255, 0, 0.03)),
    #111315;
  box-shadow: var(--shadow);
}

.final-showcase span {
  color: var(--lime);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.final-showcase h3 {
  margin-top: 4px;
  font-size: 32px;
}

.final-showcase strong {
  display: block;
  justify-self: center;
  color: #fff;
  font-size: 28px;
  text-align: center;
}

.final-showcase small {
  color: var(--muted);
  line-height: 1.4;
}

.wall-planner {
  display: grid;
  grid-template-columns: 1.45fr 1.25fr 1.05fr 0.9fr 0.9fr;
  gap: 10px;
  min-width: 0;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(204, 255, 0, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(204, 255, 0, 0.04) 1px, transparent 1px),
    #111315;
  background-size: 42px 42px;
}

.bracket-round {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bracket-round h3 {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f11;
  color: var(--lime);
  font-size: 12px;
  text-transform: uppercase;
}

.bracket-slots {
  display: grid;
  gap: 6px;
}

.round-2 .bracket-slots {
  gap: 20px;
}

.round-3 .bracket-slots {
  gap: 58px;
}

.round-4 .bracket-slots {
  gap: 142px;
}

.round-5 .bracket-slots {
  gap: 18px;
}

.bracket-match {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.bracket-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  width: 10px;
  height: 1px;
  background: rgba(204, 255, 0, 0.45);
}

.round-5 .bracket-match::after {
  display: none;
}

.bracket-match span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.bracket-match-final {
  border-color: rgba(204, 255, 0, 0.6);
  background:
    linear-gradient(135deg, rgba(204, 255, 0, 0.14), rgba(204, 255, 0, 0.03)),
    var(--panel);
}

.bracket-match-final span {
  color: var(--lime);
  font-size: 11px;
}

.team-line {
  min-height: 26px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.team-line.winner {
  color: #101113;
  background: var(--lime);
}

@media (max-width: 980px) {
  .hero-grid,
  .kpi-grid,
  .groups-grid,
  .draw-grid,
  .rankings-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    gap: 32px;
  }

  .section-heading.split {
    align-items: start;
    flex-direction: column;
  }

  .knockout-grid {
    overflow-x: auto;
  }

  .wall-planner {
    min-width: 980px;
  }

  .prize-grid,
  .final-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    overflow-x: auto;
  }

  .hero-grid,
  .kpi-grid,
  .groups-grid,
  .draw-grid,
  .rankings-layout {
    grid-template-columns: 1fr;
  }

  .prize-grid,
  .final-showcase {
    grid-template-columns: 1fr;
  }

  .leaderboard-card {
    grid-column: span 1;
  }

  .hero-grid {
    padding: 40px 0 60px;
  }

  h1 {
    font-size: 42px;
  }

  .fixture-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fixture-vs {
    width: auto;
    height: auto;
    justify-self: start;
    padding: 5px 9px;
    border-radius: 999px;
  }
}
