/* AirCool leaderboard theme */

:root {
  --bg: #0a0d16;
  --panel: #121828;
  --panel-2: #0f1420;
  --line: rgba(148, 166, 210, 0.12);
  --text: #eef2fa;
  --muted: #98a2b8;
  --accent: #4c8dff;
  --accent-2: #6ba1ff;
  --gold: #f6c453;
  --silver: #c8d0dd;
  --bronze: #d98c4a;
  --kick: #53fc18;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', sans-serif;
  background:
    radial-gradient(1100px 480px at 50% -12%, rgba(76, 141, 255, 0.14), transparent 62%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; }

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.brand b {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.topbar nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.topbar nav a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s;
}

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

.watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 15px;
  border-radius: 999px;
  transition: border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}

.watch-btn:hover { border-color: rgba(83, 252, 24, 0.5); transform: translateY(-1px); }

.watch-btn img { width: 15px; height: 15px; }

/* live badge injected via {live} */
li a.button-kick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--kick) !important;
  font-weight: 700;
}

li a.button-kick::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kick);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- board tabs ---------- */

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 10px;
}

.tab {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s;
}

.tab small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
}

.tab:hover { color: var(--text); border-color: rgba(76, 141, 255, 0.45); }

.tab.active {
  background: rgba(76, 141, 255, 0.12);
  border-color: rgba(76, 141, 255, 0.55);
  color: var(--text);
}

.tab.active small { color: var(--gold); opacity: 1; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: center;
  margin: 34px 0 44px;
}

.hero .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero h1 .amt { color: var(--gold); }

.hero .sub {
  color: var(--muted);
  font-size: 15px;
  margin-top: 12px;
  max-width: 30rem;
}

.hero .cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--panel);
  border: 1px dashed rgba(148, 166, 210, 0.35);
  border-radius: 10px;
  padding: 10px 15px;
  font-family: inherit;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s;
}

.code-chip:hover { border-color: var(--accent); }

.code-chip span { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: 0; }

.code-chip i { color: var(--muted); font-size: 13px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(76, 141, 255, 0.35);
}

/* countdown card */

.count-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
  text-align: center;
}

.count-card .label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.count-grid {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
}

.count-cell b {
  display: block;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.count-cell small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 7px;
}

.count-sep {
  font-size: 26px;
  font-weight: 800;
  color: var(--muted);
  transform: translateY(-8px);
}

.count-card .foot {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- podium ---------- */

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 44px;
}

.pod {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 54px 18px 22px;
  margin-top: 36px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.pod:hover { transform: translateY(-4px); }

.pod .avatar {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
  border: 3px solid var(--line);
}

.pod .rank-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 9px;
}

.pod .name {
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pod .wager {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.pod .wager b { color: var(--text); font-weight: 700; }

.pod .prize {
  font-size: 26px;
  font-weight: 900;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}

/* metal variants */

.pod.gold {
  border-color: rgba(246, 196, 83, 0.45);
  box-shadow: 0 0 34px rgba(246, 196, 83, 0.08);
  margin-top: 22px;
  padding-top: 62px;
}

.pod.gold .avatar { width: 80px; height: 80px; top: -40px; border-color: var(--gold); }
.pod.gold .rank-chip { color: var(--gold); border-color: rgba(246, 196, 83, 0.4); }
.pod.gold .prize { color: var(--gold); font-size: 31px; }

.pod.silver .avatar { border-color: var(--silver); }
.pod.silver .rank-chip { color: var(--silver); }
.pod.silver .prize { color: var(--silver); }

.pod.bronze .avatar { border-color: var(--bronze); }
.pod.bronze .rank-chip { color: var(--bronze); }
.pod.bronze .prize { color: var(--bronze); }

/* ---------- participants board ---------- */

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-title i { color: var(--accent-2); font-size: 15px; }

.board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 44px;
}

.brow,
.brow-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 150px 110px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}

.brow-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.brow {
  border-bottom: 1px solid rgba(148, 166, 210, 0.06);
  transition: background 0.12s;
}

.brow:last-child { border-bottom: none; }
.brow:hover { background: rgba(76, 141, 255, 0.05); }

.brow .rank {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 0;
  text-align: center;
}

.brow .player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brow .player img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
  flex-shrink: 0;
}

.brow .player span {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brow .wagered,
.brow-head .wagered { text-align: right; }

.brow .wagered {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.brow .prize,
.brow-head .prize { text-align: right; }

.brow .prize {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.brow .prize.none { color: rgba(152, 162, 184, 0.45); font-weight: 500; }

/* ---------- history ---------- */

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}

.hist-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s;
}

.hist-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 141, 255, 0.45);
}

.hist-card .dates { font-weight: 800; font-size: 15px; }

.hist-card .fin {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.hist-card .pool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.hist-card .pool b { color: var(--gold); font-size: 14px; }

.hist-card .view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 13.5px;
  margin-top: 14px;
}

/* ---------- footer ---------- */

footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 28px 0;
}

footer .cols {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

footer .fbrand { display: flex; align-items: center; gap: 10px; }
footer .fbrand img { width: 34px; height: 34px; border-radius: 50%; }
footer .fbrand b { font-weight: 800; letter-spacing: 0.05em; }
footer .fbrand p { color: var(--muted); font-size: 12px; }

footer .links { display: flex; gap: 40px; }
footer .links h6 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 9px; }
footer .links a { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
footer .links a:hover { color: var(--text); }

footer .socials { display: flex; gap: 6px; }
footer .socials a {
  display: inline-flex;
  padding: 9px;
  border-radius: 9px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
footer .socials a:hover { color: var(--accent-2); background: rgba(76, 141, 255, 0.08); }
footer .socials i { font-size: 17px; }

footer .fine {
  color: var(--muted);
  font-size: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- modal ---------- */

.modal-container {
  background: rgba(5, 7, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
  padding: 20px;
}

.modal-container.show { opacity: 1; pointer-events: auto; }

.modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  padding: 22px;
}

#previous-leaderboard-content::-webkit-scrollbar { display: none; }
#previous-leaderboard-content { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- error page ---------- */

.error-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-wrap h1 { font-size: clamp(28px, 6vw, 46px); font-weight: 900; margin: 18px 0 6px; }
.error-wrap p { color: var(--muted); margin-bottom: 26px; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in { opacity: 1; transform: translateY(0); }

a:focus-visible, .code-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  li a.button-kick::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .count-card { max-width: 460px; }
}

@media (max-width: 760px) {
  .topbar nav ul { gap: 14px; }
  .topbar .brand b { display: none; }
  .watch-btn span { display: none; }
  .watch-btn { padding: 9px 11px; }

  .podium { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .pod.gold { order: -1; }

  .brow, .brow-head { grid-template-columns: 40px minmax(0, 1fr) 92px; padding: 11px 13px; }
  .brow .wagered, .brow-head .wagered { display: none; }

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

  .count-cell b { font-size: 27px; }

  footer .links { gap: 26px; }
}
