:root {
  --bg: #071326;
  --bg-gradient: radial-gradient(circle at 10% 10%, rgba(0, 176, 255, 0.45) 0%, transparent 50%),
                 radial-gradient(circle at 90% 15%, rgba(255, 170, 0, 0.42) 0%, transparent 50%),
                 radial-gradient(circle at 50% 85%, rgba(2, 136, 209, 0.35) 0%, transparent 60%),
                 linear-gradient(180deg, #0a1c36 0%, #061122 100%);
  --surface: #0f2a4d;
  --surface-elevated: #153966;
  --surface-card: rgba(15, 42, 77, 0.85);
  --border: #29b6f6;
  --border-bright: #40c4ff;
  --text: #ffffff;
  --text-muted: #e1f0ff;
  --text-dim: #a6ceff;
  --gold: #ffaa00;
  --gold-bright: #ffd54f;
  --gold-soft: rgba(255, 170, 0, 0.28);
  --gold-glow: 0 0 25px rgba(255, 170, 0, 0.55);
  --silver: #cbd5e1;
  --silver-glow: 0 0 20px rgba(203, 213, 225, 0.45);
  --bronze: #fb923c;
  --bronze-glow: 0 0 20px rgba(251, 146, 60, 0.45);
  --marigold: #ff9f1c;
  --marigold-deep: #f77f00;
  --marigold-glow: 0 0 30px rgba(255, 159, 28, 0.65);
  --cyan: #38bdf8;
  --cerulean: #0288d1;
  --cerulean-bright: #40c4ff;
  --cerulean-glow: 0 0 30px rgba(2, 136, 209, 0.7);
  --cyan-soft: rgba(56, 189, 248, 0.28);
  --font-display: "Chakra Petch", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-rpg: "Cinzel", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Background elements matching GamerTube core */
.bg-artwork {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(0, 176, 255, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 60%, rgba(255, 170, 0, 0.25) 0%, transparent 60%),
    url("/assets/gamertube-bg.jpg?v=20");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.9;
  filter: brightness(1.15) contrast(1.1);
  pointer-events: none;
  z-index: 0;
}

.bg-runes {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(56, 189, 248, 0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 15%, rgba(255, 170, 0, 0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(2, 136, 209, 0.45) 0%, transparent 100%);
  background-size: 160px 160px;
  opacity: 0.65;
  pointer-events: none;
  z-index: 1;
}

.bg-embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.page-shell {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(8, 22, 44, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  padding: 6px 14px 6px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(2, 136, 209, 0.28) 45%, rgba(10, 28, 54, 0.88) 100%);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.brand:hover {
  border-color: #ffd24d;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 170, 0, 0.4);
  transform: translateY(-1px);
}

.brand-logo-svg {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: block;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-rpg);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #ffffff 0%, #ffd24d 40%, #ff9f1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

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

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(15, 42, 77, 0.7);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #ffffff;
  border-color: var(--cyan);
  background: rgba(2, 136, 209, 0.35);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.nav-btn.is-active {
  color: #ffd54f;
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.25) 0%, rgba(2, 136, 209, 0.3) 100%);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.45);
}

.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(2, 136, 209, 0.35) 0%, rgba(255, 159, 28, 0.25) 100%);
  border: 1.5px solid #38bdf8;
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(2, 136, 209, 0.35);
  transition: all 0.2s ease;
}

.hud-badge:hover {
  border-color: #ffd24d;
  box-shadow: 0 0 22px rgba(255, 170, 0, 0.55);
}

.hud-tier-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.hud-tier-slot svg {
  width: 100%;
  height: 100%;
}

/* Hero */
.hero {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 42, 77, 0.85) 0%, rgba(8, 22, 44, 0.95) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 36px 32px 32px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 170, 0, 0.25) 0%, rgba(2, 136, 209, 0.2) 50%, transparent 80%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 14px;
  background: rgba(2, 136, 209, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
}

.hero-eyebrow-sep {
  color: var(--gold);
}

.hero-title {
  font-family: var(--font-rpg);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 14px;
  background: linear-gradient(180deg, #ffffff 0%, #ffe082 45%, #ff9f1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
}

.hero-title-accent {
  color: #38bdf8;
  -webkit-background-clip: initial;
  background-clip: initial;
  background: none;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 auto 28px;
  line-height: 1.55;
  max-width: 680px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.stat-card {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(10, 28, 54, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  text-align: center;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: var(--gold);
}

.stat-card-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.stat-card-val.is-gold {
  color: #ffd54f;
  text-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
}

.stat-card-val.is-cyan {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.stat-card-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Top 3 Podium */
.podium-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podium-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-rpg);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 4px 0 0;
  color: #ffffff;
}

.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 18px;
  margin-top: 12px;
}

.podium-card {
  position: relative;
  border-radius: 18px;
  padding: 24px 20px 22px;
  background: linear-gradient(180deg, rgba(15, 42, 77, 0.9) 0%, rgba(8, 22, 44, 0.98) 100%);
  border: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

/* 1st Place Gold */
.podium-card--first {
  border-color: #ffd54f;
  background: linear-gradient(180deg, rgba(30, 48, 80, 0.95) 0%, rgba(18, 28, 50, 0.98) 100%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 170, 0, 0.35), inset 0 1px 0 rgba(255, 235, 59, 0.4);
  padding: 32px 22px 28px;
  order: 2;
}

/* 2nd Place Silver */
.podium-card--second {
  border-color: #cbd5e1;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(203, 213, 225, 0.25);
  order: 1;
}

/* 3rd Place Bronze */
.podium-card--third {
  border-color: #fb923c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(251, 146, 60, 0.25);
  order: 3;
}

/* Open / Unclaimed Podium Spot */
.podium-card--open {
  border: 1.5px dashed rgba(56, 189, 248, 0.35) !important;
  background: rgba(10, 24, 46, 0.65) !important;
  box-shadow: none !important;
}

.podium-card--open .podium-rank-badge {
  background: rgba(15, 42, 77, 0.7);
  color: var(--text-dim);
  box-shadow: none;
}

.is-self-card {
  border-color: #ffd54f !important;
  box-shadow: 0 0 30px rgba(255, 170, 0, 0.55), 0 16px 50px rgba(0, 0, 0, 0.6) !important;
}

.podium-crown {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: drop-shadow(0 4px 10px rgba(255, 170, 0, 0.7));
  animation: floatCrown 3s ease-in-out infinite;
}

@keyframes floatCrown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.podium-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.podium-card--first .podium-rank-badge {
  background: linear-gradient(135deg, #ffd54f 0%, #ff9f1c 100%);
  color: #121820;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.7);
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
}

.podium-card--second .podium-rank-badge {
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  color: #0f172a;
  box-shadow: 0 0 16px rgba(203, 213, 225, 0.5);
}

.podium-card--third .podium-rank-badge {
  background: linear-gradient(135deg, #fed7aa 0%, #ea580c 100%);
  color: #1e1107;
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.5);
}

.podium-avatar-wrap {
  position: relative;
  margin-bottom: 12px;
}

.podium-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 2.5px solid var(--border);
  box-shadow: 0 0 20px rgba(2, 136, 209, 0.4);
}

.podium-card--first .podium-avatar {
  width: 86px;
  height: 86px;
  font-size: 2.7rem;
  border-color: #ffd54f;
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.5);
}

.podium-tier-crest {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: #071326;
  border-radius: 50%;
  border: 1.5px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.podium-name {
  font-family: var(--font-rpg);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.podium-handle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.podium-tier-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(2, 136, 209, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  margin-bottom: 14px;
}

.podium-xp-box {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(8, 22, 44, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 12px;
}

.podium-xp-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffd54f;
  letter-spacing: 0.04em;
}

.podium-xp-lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.podium-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.podium-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 42, 77, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-muted);
}

/* Controls Bar */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(10, 28, 54, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 4px;
}

.sort-btn {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(15, 42, 77, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sort-btn:hover {
  border-color: var(--cyan);
  color: #ffffff;
  background: rgba(2, 136, 209, 0.25);
}

.sort-btn.is-active {
  color: #ffd54f;
  background: rgba(255, 170, 0, 0.2);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(255, 170, 0, 0.35);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #ffffff;
  background: rgba(6, 17, 34, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 7px 14px 7px 32px;
  width: 220px;
  outline: none;
  transition: border-color 0.2s ease, width 0.2s ease;
}

.search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Leaderboard Table Section */
.table-section {
  position: relative;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  background: rgba(8, 22, 44, 0.88);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  -webkit-overflow-scrolling: touch;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  min-width: 900px;
}

.leaderboard-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(12, 34, 62, 0.95);
  padding: 16px 18px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.4);
  white-space: nowrap;
  user-select: none;
}

.leaderboard-table th.th-sortable {
  cursor: pointer;
  transition: color 0.15s ease;
}

.leaderboard-table th.th-sortable:hover {
  color: #ffd54f;
}

.leaderboard-table th.is-active-sort {
  color: #ffd54f;
  border-bottom-color: var(--gold);
}

.leaderboard-table th.is-active-sort::after {
  content: " ▼";
  font-size: 0.65rem;
}

.leaderboard-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--text-muted);
  vertical-align: middle;
}

.leaderboard-table tr {
  transition: background-color 0.15s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(2, 136, 209, 0.14);
}

/* Rank styling */
.col-rank {
  width: 70px;
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  background: rgba(15, 42, 77, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd54f 0%, #ff9f1c 100%);
  color: #121820;
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(203, 213, 225, 0.4);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #fed7aa 0%, #ea580c 100%);
  color: #1e1107;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.4);
}

/* Adventurer Cell */
.adventurer-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.adv-avatar-glyph {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.adv-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adv-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adv-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.adv-you-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #ff9f1c;
  color: #071326;
}

.adv-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.adv-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.adv-tier-badge svg {
  width: 14px;
  height: 14px;
}

/* XP Cell */
.xp-cell {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffd54f;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 170, 0, 0.35);
}

.xp-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--marigold);
  margin-left: 3px;
}

/* Level Cell */
.level-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

/* Total Clears Cell */
.clears-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  white-space: nowrap;
}

/* Game Column Cells */
.game-stat-cell {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.game-stat-primary {
  color: #ffffff;
  font-weight: 700;
}

.game-stat-sub {
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-left: 4px;
}

/* Highlight user row */
tr.is-self {
  background: linear-gradient(90deg, rgba(2, 136, 209, 0.32) 0%, rgba(255, 170, 0, 0.22) 100%) !important;
  border-left: 4px solid #ffd54f;
}

tr.is-self td {
  border-bottom-color: rgba(255, 213, 79, 0.4);
}

/* User Floating / Sticky Standing Card */
.player-standing-bar {
  position: sticky;
  bottom: 16px;
  z-index: 50;
  margin-top: 24px;
  padding: 16px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(8, 22, 44, 0.96) 0%, rgba(15, 42, 77, 0.96) 100%);
  backdrop-filter: blur(14px);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(2, 136, 209, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.standing-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.standing-rank {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffd54f;
}

.standing-details {
  display: flex;
  flex-direction: column;
}

.standing-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.standing-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.standing-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-cta-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #121820;
  background: linear-gradient(135deg, #ffd54f 0%, #ff9f1c 100%);
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 170, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.7);
}

/* Empty or Loading State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-left {
  margin: 0;
}

.footer-right {
  margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .podium-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .podium-card--first {
    order: 1;
  }
  .podium-card--second {
    order: 2;
  }
  .podium-card--third {
    order: 3;
  }
  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 24px 18px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .search-input {
    width: 100%;
  }
  .search-input-wrap {
    width: 100%;
  }
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
