/* ========================================
   RESET
======================================== */

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

html,
body {
  width: 100%;
  min-height: 100%;
}

body.leaderboard-body {
  font-family: "Inter", sans-serif;
  color: #ffffff;
  overflow-x: hidden;
  position: relative;
  background: #050816;
}

/* ========================================
   BACKGROUND
======================================== */

#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -30;
  display: block;
}

body.leaderboard-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -29;
  pointer-events: none;
  background:
    linear-gradient(rgba(4, 6, 18, 0.78), rgba(4, 6, 18, 0.88)),
    url("../assets/images/storypage.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.17;
  mix-blend-mode: screen;
}

.space-overlay {
  position: fixed;
  inset: 0;
  z-index: -28;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(122, 92, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(255, 152, 88, 0.10), transparent 26%),
    radial-gradient(circle at 52% 88%, rgba(255, 84, 176, 0.08), transparent 30%);
}

.space-vignette {
  position: fixed;
  inset: 0;
  z-index: -27;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 36%, rgba(0, 0, 0, 0.26) 74%, rgba(0, 0, 0, 0.62) 100%);
}

/* ========================================
   NAVBAR
======================================== */

.navbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94%, 980px);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  font-size: 18px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

/* ========================================
   LAYOUT
======================================== */

.leaderboard-main {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  padding: 118px 18px 90px;
}

.leaderboard-container,
.ranking-board,
.sirius-transmission {
  width: min(100%, 760px);
  margin: 0 auto 22px;
  padding: 34px 36px;
  border-radius: 28px;
  background: rgba(8, 14, 34, 0.58);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.leaderboard-badge {
  display: inline-flex;
  margin-bottom: 18px;
  color: #ffd45d;
  font-size: 14px;
  font-weight: 800;
}

.leaderboard-title {
  font-size: clamp(42px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 24px;
}

.leaderboard-intro {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.86);
}

.leaderboard-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.leaderboard-status span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}

.leaderboard-status strong {
  color: #ffffff;
}

/* ========================================
   PODIUM
======================================== */

.podium {
  width: min(100%, 760px);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

.podium-card {
  min-height: 190px;
  padding: 22px 18px;
  border-radius: 24px;
  background: rgba(8, 14, 34, 0.58);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
}

.podium-card.first {
  min-height: 230px;
  background:
    linear-gradient(180deg, rgba(255, 196, 80, 0.18), rgba(8, 14, 34, 0.60));
  box-shadow: 0 0 40px rgba(255, 196, 80, 0.12);
}

.rank {
  color: #ffd45d;
  font-weight: 900;
  font-size: 13px;
}

.podium-card h2 {
  margin: 14px 0 8px;
  font-size: 24px;
}

.podium-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 14px;
}

.podium-card strong {
  color: #ffffff;
  font-size: 14px;
}

/* ========================================
   RANKING BOARD
======================================== */

.ranking-header h2,
.sirius-transmission h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.ranking-header p,
.sirius-transmission p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
  margin-bottom: 18px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 1fr 1.2fr 82px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.row-rank {
  color: #ffd45d;
  font-weight: 900;
}

.row-name {
  font-weight: 800;
}

.row-title {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.ranking-row strong {
  text-align: right;
  font-size: 13px;
}

/* ========================================
   FOOTER
======================================== */

.footer {
  position: fixed;
  left: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: 100%;
  text-align: center;
  z-index: 20;
  pointer-events: none;
}

.footer p {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.56);
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {
  .navbar {
    top: 8px;
    width: min(94%, 980px);
  }

  .navbar-inner.compact {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .logo {
    font-size: 15px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links.compact {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(8, 14, 34, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 30;
  }

  .nav-links.compact a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.04);
  }

  .navbar.menu-open .nav-links.compact {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .leaderboard-main {
    padding: 96px 14px 84px;
  }

  .leaderboard-container,
  .ranking-board,
  .sirius-transmission {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .leaderboard-title {
    font-size: 38px;
  }

  .leaderboard-intro {
    font-size: 14px;
    line-height: 1.75;
  }

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

  .podium-card,
  .podium-card.first {
    min-height: auto;
  }

  .ranking-row {
    grid-template-columns: 46px 1fr;
  }

  .row-title {
    grid-column: 2;
  }

  .ranking-row strong {
    grid-column: 2;
    text-align: left;
  }

  .footer {
    display: none;
  }
}