:root {
  color-scheme: dark;
  --bg: #14112c;
  --surface: rgba(38, 34, 74, 0.66);
  --surface-strong: rgba(45, 41, 83, 0.92);
  --border: rgba(223, 221, 255, 0.12);
  --text: #f4f3ff;
  --muted: #aaa7c4;
  --mint: #62d7bd;
  --pink: #ea718f;
  --violet: #9b8cf0;
  --gold: #f2cf71;
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(118, 101, 211, 0.19), transparent 38%),
    linear-gradient(135deg, #191536 0%, #14112c 54%, #102638 135%);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.aurora { position: fixed; z-index: -1; width: 460px; height: 460px; filter: blur(120px); opacity: .08; border-radius: 50%; pointer-events: none; }
.aurora--mint { top: 30%; right: -180px; background: var(--mint); }
.aurora--pink { top: 0; left: -260px; background: var(--pink); }

.site-header { height: 96px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark { position: relative; display: flex; align-items: flex-end; gap: 3px; width: 38px; height: 40px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.045); }
.brand-mark i { display: block; width: 6px; border: 1px solid rgba(255,255,255,.58); border-radius: 2px 2px 4px 4px; }
.brand-mark i:nth-child(1) { height: 22px; background: linear-gradient(to top, var(--mint) 0 45%, transparent 45%); }
.brand-mark i:nth-child(2) { height: 27px; background: linear-gradient(to top, var(--pink) 0 60%, transparent 60%); }
.brand-mark i:nth-child(3) { height: 19px; background: linear-gradient(to top, var(--violet) 0 35%, transparent 35%); }
.brand b { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.play-link { display: flex; align-items: center; gap: 16px; padding: 11px 13px 11px 20px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.04); font-size: 13px; font-weight: 700; transition: transform .2s, background .2s; }
.play-link:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.play-link span:last-child { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--text); color: var(--bg); }

.hero { display: grid; grid-template-columns: 1.3fr .7fr; align-items: end; gap: 64px; padding: 62px 0 52px; }
.eyebrow, .section-kicker { margin: 0 0 18px; color: #c6c1f3; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(98,215,189,.1), 0 0 16px var(--mint); }
h1 { margin: 0; max-width: 780px; font-size: clamp(48px, 7.3vw, 94px); line-height: .98; letter-spacing: -.072em; }
h1 span { background: linear-gradient(90deg, var(--mint), #b2a2ff 54%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy > p { max-width: 600px; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: 10px; }
.hero-stats div { padding: 0 22px; border-left: 1px solid var(--border); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.hero-stats span { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.podium { display: grid; grid-template-columns: 1fr 1.08fr 1fr; align-items: end; gap: 16px; margin: 24px 0 52px; }
.podium-card { position: relative; min-height: 218px; overflow: hidden; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: 0 26px 70px rgba(4, 3, 24, .24); }
.podium-card::before { content: ""; position: absolute; inset: auto -20% -70% -20%; height: 180px; border-radius: 50%; filter: blur(45px); opacity: .18; }
.podium-card--first { min-height: 254px; border-color: rgba(242,207,113,.26); background: linear-gradient(145deg, rgba(242,207,113,.11), rgba(255,255,255,.03)); }
.podium-card--first::before { background: var(--gold); }
.podium-card--second::before { background: var(--mint); }
.podium-card--third::before { background: var(--pink); }
.podium-rank { position: absolute; top: 22px; right: 24px; color: rgba(255,255,255,.12); font-size: 48px; font-weight: 800; line-height: 1; }
.podium-card--first .podium-rank { color: rgba(242,207,113,.22); font-size: 58px; }
.player-avatar { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.025)); color: var(--mint); font-size: 18px; font-weight: 800; box-shadow: inset 0 0 24px rgba(255,255,255,.035); }
.podium-card--first .player-avatar { width: 64px; height: 64px; color: var(--gold); }
.podium-card--third .player-avatar { color: var(--pink); }
.crown { position: absolute; top: -16px; left: 22px; color: var(--gold); font-size: 17px; transform: rotate(-8deg); }
.podium-name { position: relative; margin: 0; overflow: hidden; font-size: 19px; font-weight: 800; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { position: relative; display: flex; align-items: baseline; gap: 7px; margin-top: 8px; }
.podium-score strong { font-size: 26px; letter-spacing: -.04em; }
.podium-score span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.podium-meta { position: relative; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.skeleton-card { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.leaderboard-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 32px; background: rgba(26, 23, 55, .74); box-shadow: 0 36px 100px rgba(4, 3, 24, .23); backdrop-filter: blur(18px); }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 34px 36px 27px; }
.section-kicker { margin-bottom: 8px; color: var(--mint); }
h2 { margin: 0; font-size: 29px; letter-spacing: -.045em; }
.controls { display: flex; align-items: center; gap: 12px; }
.period-tabs { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: rgba(8,7,28,.25); }
.period-tab { padding: 9px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; transition: .2s; }
.period-tab:hover { color: var(--text); }
.period-tab.active { background: rgba(255,255,255,.1); color: var(--text); box-shadow: 0 5px 18px rgba(0,0,0,.13); }
.search { display: flex; align-items: center; gap: 7px; width: 170px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 13px; background: rgba(8,7,28,.25); color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search input::placeholder { color: #77748f; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: #79768f; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-align: left; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 36px; }
th:last-child, td:last-child { padding-right: 36px; }
td { padding: 17px 20px; border-bottom: 1px solid rgba(223,221,255,.065); color: #dddbea; font-size: 12px; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,.035); }
tbody tr:last-child td { border-bottom: 0; }
.rank-col { width: 90px; }
.rank-number { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: rgba(255,255,255,.05); color: var(--muted); font-weight: 800; }
.player-cell { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.table-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(145deg, rgba(98,215,189,.16), rgba(155,140,240,.13)); color: var(--mint); font-weight: 800; }
.player-cell b { display: block; max-width: 210px; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.player-cell small { color: #747189; font-size: 9px; }
.level-value { color: var(--text); font-size: 14px; font-weight: 800; }
.level-value span { color: var(--muted); font-size: 9px; font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #656277; }
.status.online { color: #9edfcf; }
.status.online::before { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.loading-row td { padding: 46px; color: var(--muted); text-align: center; }
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state h3 { margin: 17px 0 6px; font-size: 17px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.empty-tubes { display: flex; justify-content: center; align-items: end; gap: 6px; }
.empty-tubes i { display: block; width: 10px; height: 32px; border: 1px solid #85819b; border-radius: 2px 2px 7px 7px; }
.empty-tubes i:nth-child(1) { height: 25px; background: linear-gradient(to top, var(--mint) 0 30%, transparent 30%); }
.empty-tubes i:nth-child(2) { background: linear-gradient(to top, var(--pink) 0 55%, transparent 55%); }
.empty-tubes i:nth-child(3) { height: 22px; }
.panel-foot { display: flex; justify-content: space-between; padding: 17px 36px; border-top: 1px solid var(--border); background: rgba(255,255,255,.018); color: #716e85; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.panel-foot a { color: #aaa6c3; font-weight: 700; }
.panel-foot a span { margin-left: 8px; color: var(--mint); }
footer { display: flex; justify-content: space-between; padding-block: 30px 42px; color: #615e76; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .hero-stats { max-width: 520px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .controls { width: 100%; }
  .search { flex: 1; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 78px; }
  .brand small { display: none; }
  .play-link { padding-left: 14px; }
  .hero { padding: 46px 0 36px; }
  h1 { font-size: clamp(43px, 14vw, 68px); }
  .hero-copy > p { font-size: 14px; }
  .hero-stats div { padding-inline: 13px; }
  .hero-stats strong { font-size: 21px; }
  .hero-stats span { font-size: 8px; }
  .podium { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .podium-card { min-height: 195px; padding: 22px; }
  .podium-card--first { grid-column: 1 / -1; grid-row: 1; min-height: 220px; }
  .podium-card--second { grid-row: 2; }
  .podium-card--third { grid-row: 2; }
  .panel-head { padding: 28px 22px 22px; }
  .controls { align-items: stretch; flex-direction: column; }
  .period-tabs { justify-content: space-between; }
  .period-tab { flex: 1; padding-inline: 7px; }
  .search { width: 100%; padding-block: 12px; }
  th, td { padding-inline: 14px; }
  th:first-child, td:first-child { padding-left: 22px; }
  th:last-child, td:last-child { padding-right: 22px; }
  .panel-foot { padding-inline: 22px; }
  .panel-foot a { display: none; }
  footer { gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
