:root {
  color-scheme: dark;
  --bg: #05050b;
  --panel: rgba(9, 12, 22, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.15);
  --ink: #f8fafc;
  --muted: #aeb8c8;
  --purple: #8a20ff;
  --magenta: #d946ef;
  --gold: #f5c542;
  --orange: #ff9f1c;
  --green: #2dd4bf;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(138, 32, 255, 0.28), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(245, 197, 66, 0.18), transparent 22%),
    linear-gradient(180deg, #05050b 0%, #101526 54%, #06060d 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

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

button,
.hero-actions a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

button:hover,
.hero-actions a:hover {
  border-color: var(--gold);
}

.site-hero {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(23, 9, 45, 0.8) 48%, rgba(0, 0, 0, 0.42)),
    url("assets/flyer-junio-ccp.jpeg") center 36% / cover;
  border-bottom: 2px solid rgba(245, 197, 66, 0.62);
  box-shadow: 0 20px 70px rgba(138, 32, 255, 0.22);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(16px, 5vw, 64px);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand img {
  width: 58px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(138, 32, 255, 0.86));
}

.hero-content {
  width: min(900px, calc(100% - 32px));
  margin: auto 0 58px;
  padding-left: clamp(16px, 5vw, 64px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(44px, 9vw, 106px);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(138, 32, 255, 0.95), 0 4px 0 #000;
}

.hero-content > p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 16px;
  color: #e5eaf3;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link {
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  border-color: rgba(245, 197, 66, 0.58);
  box-shadow: 0 0 20px rgba(138, 32, 255, 0.34);
}

main {
  padding: 0 clamp(16px, 5vw, 64px) 46px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: -42px;
}

.metrics article,
.section-block,
.table-card,
.date-card,
.club-row,
.podium-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.metrics article {
  padding: 18px;
  border-color: rgba(245, 197, 66, 0.28);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  text-shadow: 0 0 12px rgba(245, 197, 66, 0.28);
}

.section-block {
  margin-top: 22px;
  padding: clamp(16px, 3vw, 24px);
}

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

.section-heading h2 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

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

.podium-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "rank logo"
    "player logo"
    "meta logo";
  align-items: center;
  gap: 8px 14px;
  min-height: 150px;
  padding: 18px;
  border-color: rgba(245, 197, 66, 0.34);
}

.podium-club-logo {
  grid-area: logo;
  width: 108px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(245, 197, 66, 0.42);
  box-shadow: 0 0 18px rgba(138, 32, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fef3c7;
  font-size: 22px;
  font-weight: 900;
}

.podium-card:first-child {
  background: linear-gradient(145deg, rgba(138, 32, 255, 0.3), rgba(245, 197, 66, 0.13)), var(--panel);
}

.podium-card:nth-child(n+4) {
  min-height: 106px;
  padding: 10px 12px;
  gap: 5px 10px;
  background: rgba(255, 255, 255, 0.055);
}

.podium-card:nth-child(n+4) .podium-club-logo {
  width: 66px;
  border-radius: 6px;
  padding: 5px;
}

.podium-card:nth-child(n+4) .logo-placeholder {
  font-size: 15px;
}

.podium-card:nth-child(n+4) .podium-rank {
  font-size: 17px;
}

.podium-card:nth-child(n+4) .podium-player {
  font-size: 15px;
  line-height: 1.1;
  gap: 5px;
}

.podium-card:nth-child(n+4) .podium-meta {
  font-size: 12px;
  line-height: 1.25;
}

.podium-card:nth-child(n+4) .movement {
  min-width: 28px;
  min-height: 20px;
  padding: 1px 6px;
  font-size: 11px;
}

.podium-rank {
  grid-area: rank;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.podium-player {
  grid-area: player;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  word-break: break-word;
}

.podium-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.table-card {
  overflow: auto;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pagination span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hidden {
  display: none;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  font-size: 14px;
}

th {
  background: rgba(138, 32, 255, 0.28);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: #eef2ff;
}

.top-nine-row td {
  background: rgba(245, 197, 66, 0.07);
}

.top-nine-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 26px;
  border: 1px solid rgba(245, 197, 66, 0.42);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 197, 66, 0.12);
  font-weight: 900;
}

.player-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.movement {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 900;
}

.movement.up {
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.32);
}

.movement.down {
  color: #ffe4e6;
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.32);
}

.movement.neutral {
  visibility: hidden;
}

th:last-child,
td:last-child {
  text-align: right;
}

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

.date-card {
  overflow: hidden;
}

.date-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: rgba(138, 32, 255, 0.18);
}

.date-card summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.date-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.date-card .table-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  max-height: 390px;
}

.club-list {
  display: grid;
  gap: 10px;
}

.club-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.club-rank {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.club-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  word-break: break-word;
}

.club-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.28);
  flex: 0 0 auto;
}

.club-points {
  display: grid;
  gap: 7px;
  text-align: right;
  font-weight: 900;
}

.club-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.club-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--gold));
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(16px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .podium,
  .dates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-hero {
    min-height: 540px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-content {
    margin-bottom: 34px;
    padding-right: 16px;
  }

  .metrics,
  .podium,
  .dates-grid {
    grid-template-columns: 1fr;
  }

  .podium-club-logo {
    width: 86px;
  }

  .podium-card:nth-child(n+4) .podium-club-logo {
    width: 62px;
  }

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

  .club-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .club-points {
    grid-column: 1 / -1;
    text-align: left;
  }

  footer {
    flex-direction: column;
  }
}
