:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --page: #f5f5f7;
  --accent: #0071e3;
  --accent-2: #34c759;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 245, 247, 0.75)),
    radial-gradient(circle at 15% 10%, rgba(0, 113, 227, 0.16), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(52, 199, 89, 0.14), transparent 30%);
}

.mesh {
  position: absolute;
  width: 58vw;
  height: 58vw;
  filter: blur(80px);
  opacity: 0.28;
  transform: translateZ(0);
}

.mesh-a {
  left: -20vw;
  top: 14vh;
  background: conic-gradient(from 160deg, #0071e3, #a2d2ff, #ffffff, #0071e3);
  animation: drift-a 18s ease-in-out infinite alternate;
}

.mesh-b {
  right: -24vw;
  bottom: -16vw;
  background: conic-gradient(from 20deg, #34c759, #ffffff, #b8e0d2, #34c759);
  animation: drift-b 22s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(9vw, 8vh, 0) rotate(18deg); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-7vw, -7vh, 0) rotate(-16deg); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: saturate(180%) blur(22px);
}

.brand,
.nav a {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.brand-mark {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, #111 0 48%, transparent 48%),
    linear-gradient(135deg, var(--accent), #67c6ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 13px;
  color: var(--muted);
}

.nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--ink);
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 0 42px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1 {
  max-width: 900px;
  margin: 14px 0 16px;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.segmented button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.segmented button {
  min-width: 76px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.segmented button:hover {
  transform: translateY(-1px);
}

.segmented button.active {
  background: #111;
  color: #fff;
}

.spotlight,
.dashboard,
.snapshots {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: center;
  min-height: 310px;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
}

.spotlight-copy h2 {
  margin: 10px 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.spotlight-copy p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.podium-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.podium-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.podium-card:first-child {
  min-height: 260px;
  background: #111;
  color: #fff;
}

.podium-rank {
  font-size: 13px;
  color: var(--muted);
}

.podium-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.podium-card:first-child .podium-rank {
  color: rgba(255, 255, 255, 0.62);
}

.podium-card img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  background: #e5e5ea;
}

.podium-card strong {
  display: block;
  margin-top: 16px;
  font-size: 18px;
}

.dashboard,
.snapshots {
  padding: clamp(20px, 3vw, 32px);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 21px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.icon-button:hover {
  transform: rotate(18deg) scale(1.04);
}

.status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.rank-number-wrap {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.rank-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

.rank-number.top {
  color: var(--accent);
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.trend-badge.up {
  background: rgba(52, 199, 89, 0.14);
  color: #0b7f33;
}

.trend-badge.down {
  background: rgba(255, 59, 48, 0.12);
  color: #c62f28;
}

.trend-badge.new {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.podium-card:first-child .trend-badge.up {
  background: rgba(52, 199, 89, 0.2);
  color: #7dffac;
}

.podium-card:first-child .trend-badge.down {
  background: rgba(255, 69, 58, 0.22);
  color: #ff9a94;
}

.podium-card:first-child .trend-badge.new {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.game-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  object-fit: cover;
  background: linear-gradient(135deg, #e5e5ea, #fff);
}

.game-main {
  min-width: 0;
}

.game-main h3 {
  margin: 0;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.snapshot-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.snapshot-card {
  padding: 18px;
}

.snapshot-card h3 {
  margin: 0;
  font-size: 18px;
}

.snapshot-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

.fade-in {
  animation: fade-in 420ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 18px;
  }

  .nav {
    gap: 14px;
  }

  .hero {
    min-height: 480px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    flex: 1;
    min-width: 88px;
  }

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

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

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

  .status-row,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 44px 48px minmax(0, 1fr);
  }

  .rank-card .chip {
    grid-column: 3;
    width: fit-content;
  }
}
