@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #06131f;
  --navy: #071827;
  --panel: rgba(10, 35, 53, 0.82);
  --panel-strong: #0d2d43;
  --line: rgba(142, 211, 237, 0.16);
  --sky: #63d9fa;
  --sky-soft: #bdefff;
  --white: #f4fbff;
  --muted: #91afbf;
  --gold: #f6c95e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sky-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 73% 0%, rgba(38, 151, 196, 0.24), transparent 35%),
    linear-gradient(145deg, rgba(95, 217, 250, 0.04), transparent 35%),
    repeating-linear-gradient(165deg, transparent 0 84px, rgba(255,255,255,0.018) 85px 86px);
}

main, footer { position: relative; }
.hero { max-width: 1320px; margin: 0 auto; padding: 28px 42px 70px; }
.brand { display: flex; align-items: center; gap: 13px; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; }
.brand b { color: var(--sky); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(99,217,250,.38); border-radius: 50%; color: var(--sky); font-size: 20px; transform: rotate(-8deg); }
.live-pill { margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.live-pill i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #61e6a8; box-shadow: 0 0 12px #61e6a8; }
.hero-copy { padding: 92px 0 60px; max-width: 790px; }
.eyebrow { margin: 0 0 18px; color: var(--sky); font-size: 11px; font-weight: 800; letter-spacing: .21em; }
h1 { margin: 0; font-size: clamp(54px, 8vw, 104px); line-height: .93; letter-spacing: -.065em; }
h1 span { color: transparent; -webkit-text-stroke: 1px rgba(189,239,255,.7); }
.intro { max-width: 600px; margin: 34px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary article { padding: 24px 0; }
.summary article + article { padding-left: 36px; border-left: 1px solid var(--line); }
.summary span, .column-labels, .xp-cell small, .level-chip small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.summary strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.04em; }

.leaderboard-shell { max-width: 1320px; margin: 0 auto 72px; padding: 42px; border: 1px solid var(--line); border-radius: 32px; background: linear-gradient(145deg, rgba(10,42,64,.94), rgba(6,23,36,.9)); box-shadow: 0 36px 90px rgba(0,0,0,.28); backdrop-filter: blur(18px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 34px; }
h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.055em; }
.search-box { display: flex; align-items: center; gap: 12px; width: min(360px, 100%); padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(3,17,27,.72); color: var(--sky); }
.search-box input { width: 100%; padding: 15px 0; border: 0; outline: 0; background: transparent; color: var(--white); font: inherit; }
.search-box input::placeholder { color: #6f8c9b; }
.personal-banner { display: flex; align-items: center; gap: 20px; margin: 0 0 25px; padding: 18px 22px; border: 1px solid rgba(99,217,250,.35); border-radius: 18px; background: rgba(36,140,179,.13); }
.personal-banner span { color: var(--sky); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.personal-banner button { margin-left: auto; border: 0; background: none; color: var(--sky-soft); font-weight: 700; cursor: pointer; }
.column-labels { display: grid; grid-template-columns: 90px minmax(260px, 1fr) 120px minmax(230px, .8fr) 130px; gap: 18px; padding: 0 22px 12px; }
.column-labels span:last-child { text-align: right; }
.leaderboard { display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 90px minmax(260px, 1fr) 120px minmax(230px, .8fr) 130px; align-items: center; gap: 18px; min-height: 86px; padding: 12px 22px; border: 1px solid rgba(134,205,232,.09); border-radius: 20px; background: rgba(8,30,46,.78); transition: border-color .2s, transform .2s, background .2s; }
.rank-row:hover { transform: translateY(-1px); border-color: rgba(99,217,250,.3); background: rgba(12,43,64,.9); }
.rank-row.top-1 { border-color: rgba(246,201,94,.38); background: linear-gradient(90deg, rgba(246,201,94,.12), rgba(12,43,64,.88) 28%); }
.rank-row.top-2 { border-color: rgba(210,232,241,.26); }
.rank-row.top-3 { border-color: rgba(220,157,106,.3); }
.rank-row.is-you { outline: 2px solid var(--sky); box-shadow: 0 0 28px rgba(99,217,250,.16); }
.rank-number { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.rank-number span { margin-right: 2px; color: var(--sky); font-size: 12px; }
.member-cell { display: flex; align-items: center; min-width: 0; gap: 15px; }
.member-cell > div:last-child { min-width: 0; }
.member-cell strong, .member-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-cell strong { font-size: 16px; }
.member-cell small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; flex: 0 0 48px; place-items: center; width: 48px; height: 48px; overflow: hidden; border: 2px solid rgba(99,217,250,.28); border-radius: 50%; background: #17445d; color: var(--sky-soft); font-size: 12px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.level-chip { justify-self: start; min-width: 82px; padding: 9px 14px; border-radius: 14px; background: #061a28; }
.level-chip small, .level-chip strong { display: block; }
.level-chip strong { margin-top: 2px; font-size: 18px; }
.progress-cell small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.progress-track { position: relative; height: 8px; border-radius: 999px; background: #04121d; }
.progress-fill { height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, rgba(46,176,218,.38), var(--sky)); box-shadow: 0 0 15px rgba(99,217,250,.36); }
.progress-plane { position: absolute; top: 50%; color: var(--white); font-size: 19px; transform: translate(-48%, -52%) rotate(-5deg); text-shadow: 0 0 12px var(--sky); }
.xp-cell { text-align: right; }
.xp-cell strong, .xp-cell small { display: block; }
.xp-cell strong { font-size: 17px; }
.xp-cell small { margin-top: 5px; }
.loading { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 28px; color: var(--muted); font-size: 12px; }
.loading i { width: 16px; height: 16px; border: 2px solid rgba(99,217,250,.2); border-top-color: var(--sky); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state h3 { margin: 16px 0 8px; color: var(--white); font-size: 24px; }
.empty-state p { margin: 0; }
.empty-plane { color: var(--sky); font-size: 38px; }
footer { display: flex; justify-content: space-between; max-width: 1320px; margin: 0 auto; padding: 0 42px 38px; color: #648292; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero, .leaderboard-shell { padding-left: 22px; padding-right: 22px; }
  .leaderboard-shell { margin-left: 12px; margin-right: 12px; border-radius: 24px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .column-labels { display: none; }
  .rank-row { grid-template-columns: 58px minmax(170px, 1fr) 76px; gap: 10px; }
  .progress-cell { grid-column: 2 / 4; }
  .xp-cell { display: none; }
  .level-chip { min-width: 68px; padding: 8px 10px; }
}

@media (max-width: 600px) {
  .hero { padding-top: 18px; }
  .brand { font-size: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero-copy { padding-top: 70px; }
  .intro { font-size: 15px; }
  .summary { grid-template-columns: 1fr; }
  .summary article + article { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .leaderboard-shell { padding-top: 30px; }
  .rank-row { padding: 12px 13px; }
  .rank-number { font-size: 18px; }
  .avatar { flex-basis: 42px; width: 42px; height: 42px; }
  .member-cell strong { font-size: 14px; }
  .personal-banner { align-items: flex-start; flex-direction: column; }
  .personal-banner button { margin-left: 0; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; padding-left: 22px; padding-right: 22px; }
}
