/* ×1.5 scaled leaderboard */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(ellipse at top, #0a0d2e 0%, #050617 50%, #030410 100%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: #e0e7ff;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 108px 30px 60px;
}

/* ── Top navigation ──────────────────────────────────────── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  height: 48px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 28px;
  background: rgba(5, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #1a1d3a;
}
.nav-brand {
  font-size: 13px; font-weight: 600; letter-spacing: 5px;
  color: #4ad6ff; margin-right: 20px; text-decoration: none;
}
.nav-tab {
  padding: 5px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
  color: #5a608a; text-decoration: none;
  transition: all 0.2s; border: 1px solid transparent;
  font-family: inherit;
}
.nav-tab:hover { color: #c0c5e0; background: rgba(255,255,255,0.05); }
.nav-tab.nav-active {
  color: #4ad6ff; background: rgba(74,214,255,0.1);
  border-color: rgba(74,214,255,0.3);
}

.page { width: 100%; max-width: 1290px; }

.card {
  background: rgba(7, 8, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid #1a1d3a;
  border-radius: 30px;
  padding: 42px 48px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 300px at 20% 0%, rgba(74,214,255,0.08), transparent 70%),
    radial-gradient(ellipse 750px 300px at 80% 100%, rgba(181,102,255,0.06), transparent 70%);
  pointer-events: none;
}
.card > * { position: relative; }

/* HEADER */
.header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 36px;
}
.logo-mini { font-size: 15px; color: #5a608a; letter-spacing: 6px; }
.title { font-size: 39px; font-weight: 500; color: #4ad6ff; letter-spacing: 4.5px; margin-top: 6px; line-height: 1; }
.live { display: flex; align-items: center; gap: 15px; font-size: 16.5px; color: #5a608a; padding-bottom: 6px; }

.pulse-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #4ade80; position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; background: #4ade80;
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* CONSTELLATION */
.constellation-wrap { margin: 30px -12px 12px; padding: 24px 12px 36px; position: relative; }
.constellation-label { font-size: 15px; color: #5a608a; letter-spacing: 4.5px; text-align: center; margin-bottom: 54px; }
.constellation { position: relative; height: 480px; overflow: visible; }
.constellation-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.conn-line {
  fill: none; stroke-width: 1; stroke-dasharray: 3 4;
  animation: flow-line 12s linear infinite;
}
@keyframes flow-line { to { stroke-dashoffset: -28; } }
.star { fill: #ffffff; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.85; }
}

.champion-pos { position: absolute; transform: translateX(-50%); }
.champ-1-pos { top: 15px;  left: 50%; }
.champ-2-pos { top: 240px; left: 22%; }
.champ-3-pos { top: 240px; left: 78%; }

.champion {
  display: flex; flex-direction: column; align-items: center;
  animation: float 5s ease-in-out infinite;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.champ-1-pos .champion { animation-duration: 4.8s; animation-delay: 0s; }
.champ-2-pos .champion { animation-duration: 5.3s; animation-delay: -1.7s; }
.champ-3-pos .champion { animation-duration: 5.1s; animation-delay: -3.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.champion.swap-out {
  opacity: 0; transform: scale(0.7);
  transition: opacity 0.25s, transform 0.25s;
}

.champ-avatar-wrap { position: relative; margin-bottom: 24px; }
.champ-orbit-ring {
  position: absolute; inset: -15px; border-radius: 50%;
  border: 1px dashed; opacity: 0.5;
  animation: rotate-ring 22s linear infinite;
}
.champ-1-pos .champ-orbit-ring { animation-duration: 18s; }
.champ-3-pos .champ-orbit-ring { animation-direction: reverse; }
@keyframes rotate-ring { to { transform: rotate(360deg); } }

.champ-orbit-ring-2 {
  position: absolute; inset: -30px; border-radius: 50%;
  border: 1px solid; opacity: 0.15;
  animation: rotate-ring 35s linear infinite reverse;
}
.champ-glow {
  position: absolute; inset: -42px; border-radius: 50%;
  animation: pulse-halo 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse-halo {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.2); opacity: 0.65; }
}

.champ-avatar {
  position: relative; z-index: 2;
  width: 102px; height: 102px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 500; color: #07081c;
  border: 3px solid;
  background-size: cover; background-position: center;
}
.champ-1-pos .champ-avatar { width: 138px; height: 138px; font-size: 36px; border-width: 5px; }

.champ-rank-pill {
  position: absolute; bottom: -9px; left: 50%;
  transform: translateX(-50%); z-index: 3;
  background: #07081c; border: 1px solid;
  padding: 3px 15px; border-radius: 15px;
  font-size: 15px; font-weight: 500; letter-spacing: 1.5px;
}

.champ-info { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; }
.champ-name { display: flex; align-items: center; gap: 7px; font-size: 19.5px; font-weight: 500; color: #e0e7ff; max-width: 100%; overflow: hidden; }
.champ-name-text { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-1-pos .champ-name { font-size: 21px; }
.champ-handle { font-size: 16.5px; color: #5a608a; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-score {
  font-size: 27px; font-weight: 500; color: #4ad6ff;
  margin-top: 9px; font-variant-numeric: tabular-nums;
}
.champ-1-pos .champ-score { font-size: 36px; }
.champ-score.flash { animation: score-flash 0.8s ease-out; }
@keyframes score-flash {
  0% { color: #ffffff; text-shadow: 0 0 27px rgba(74,214,255,0.9); }
  100% { color: #4ad6ff; text-shadow: none; }
}
.champ-tier {
  font-size: 13.5px; padding: 3px 10.5px; border-radius: 7.5px;
  letter-spacing: 1.5px; font-weight: 500; margin-top: 6px;
}
.tier-L { background: rgba(245,184,10,0.12);  color: #f5b80a; border: 1px solid rgba(245,184,10,0.3); }
.tier-A { background: rgba(181,102,255,0.12); color: #b566ff; border: 1px solid rgba(181,102,255,0.3); }
.tier-B { background: rgba(74,144,226,0.12);  color: #4a90e2; border: 1px solid rgba(74,144,226,0.3); }
.verified { font-size: 19.5px; color: #4ad6ff; }

.crown-icon {
  position: absolute; top: -52px; left: 50%;
  font-size: 54px; color: #f5b80a; z-index: 4;
  animation: crown-bob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(245,184,10,0.7));
}
@keyframes crown-bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-6deg); }
  50% { transform: translateX(-50%) translateY(-6px) rotate(6deg); }
}

/* ── Planet orbits ── */
.pa {
  position: absolute;
  top: 50%; left: 50%;
  height: 2px; background: transparent;
  transform-origin: 0 50%;
  pointer-events: none; z-index: 5;
  margin-top: -1px;
}
.pa-a { width: 80px;  animation: arm-spin 6s linear infinite; }
.pa-b { width: 62px;  animation: arm-spin 9.5s linear infinite reverse; animation-delay: -3.1s; }
.pa-c { width: 100px; animation: arm-spin 13s linear infinite; animation-delay: -7.4s; }

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

.pb {
  position: absolute; right: 0; top: 50%;
  transform: translate(50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
}
.pb-s  { width: 7px;  height: 7px; }
.pb-xs { width: 5px;  height: 5px; }

.rank-1-color .pb { background: #f5b80a; box-shadow: 0 0 10px rgba(245,184,10,0.85), 0 0 4px #f5b80a; }
.rank-2-color .pb { background: #b566ff; box-shadow: 0 0 10px rgba(181,102,255,0.85), 0 0 4px #b566ff; }
.rank-3-color .pb { background: #4a90e2; box-shadow: 0 0 10px rgba(74,144,226,0.85), 0 0 4px #4a90e2; }

.rank-1-color .champ-orbit-ring,
.rank-1-color .champ-orbit-ring-2 { border-color: #f5b80a; }
.rank-1-color .champ-glow { background: radial-gradient(circle, rgba(245,184,10,0.5), transparent 65%); }
.rank-1-color .champ-avatar { border-color: #f5b80a; box-shadow: 0 0 30px rgba(245,184,10,0.4); }
.rank-1-color .champ-rank-pill { border-color: #f5b80a; color: #f5b80a; }

.rank-2-color .champ-orbit-ring,
.rank-2-color .champ-orbit-ring-2 { border-color: #b566ff; }
.rank-2-color .champ-glow { background: radial-gradient(circle, rgba(181,102,255,0.4), transparent 65%); }
.rank-2-color .champ-avatar { border-color: #b566ff; box-shadow: 0 0 24px rgba(181,102,255,0.45); }
.rank-2-color .champ-rank-pill { border-color: #b566ff; color: #b566ff; }

.rank-3-color .champ-orbit-ring,
.rank-3-color .champ-orbit-ring-2 { border-color: #4a90e2; }
.rank-3-color .champ-glow { background: radial-gradient(circle, rgba(74,144,226,0.4), transparent 65%); }
.rank-3-color .champ-avatar { border-color: #4a90e2; box-shadow: 0 0 22px rgba(74,144,226,0.4); }
.rank-3-color .champ-rank-pill { border-color: #4a90e2; color: #4a90e2; }

/* ── CONTROLS ROW (filters + search) ── */
.controls-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 6px;
}
.filters-group { display: flex; flex-direction: column; gap: 0; flex: 1; }

.filter-row { display: flex; align-items: center; gap: 18px; margin-bottom: 15px; }
.filter-label { font-size: 15px; color: #5a608a; letter-spacing: 3px; width: 90px; flex-shrink: 0; }
.filter-group { display: flex; gap: 9px; flex-wrap: wrap; }
.filter-btn {
  background: transparent; border: 1px solid #1f2240;
  color: #8a90b0; padding: 10.5px 21px; border-radius: 13.5px;
  font-size: 18px; cursor: pointer; transition: all 0.2s ease;
  font-family: inherit; display: inline-flex; align-items: center; gap: 7px;
}
.filter-btn:hover { border-color: #3a4070; color: #c0c5e0; }
.filter-btn.active {
  background: rgba(74,214,255,0.1);
  border-color: #4ad6ff; color: #4ad6ff;
  box-shadow: 0 0 24px rgba(74,214,255,0.25);
}
.filter-btn .ti { font-size: 18px; }

/* Search */
.lb-search-wrap { position: relative; flex-shrink: 0; }
.lb-search {
  background: rgba(255,255,255,0.04);
  border: 1px solid #1f2240;
  color: #e0e7ff;
  padding: 11px 18px 11px 42px;
  border-radius: 13.5px;
  font-size: 17px;
  font-family: inherit;
  width: 280px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lb-search::placeholder { color: #3a4070; }
.lb-search:focus {
  border-color: rgba(74,214,255,0.4);
  box-shadow: 0 0 0 3px rgba(74,214,255,0.08);
}
.lb-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #3a4070; font-size: 18px; pointer-events: none;
}

/* ── TABLE ── */
.col-header {
  display: grid;
  grid-template-columns: 78px 1fr 180px 145px 145px;
  gap: 21px; padding: 27px 24px 15px;
  font-size: 15px; color: #5a608a; letter-spacing: 3px;
  border-bottom: 1px solid #14172a; margin-top: 6px;
}
.col-header > div { white-space: nowrap; }
.col-right { text-align: right; }

#rows { display: flex; flex-direction: column; }

.lb-row {
  display: grid;
  grid-template-columns: 78px 1fr 180px 145px 145px;
  gap: 21px; padding: 21px 24px; align-items: center;
  border-bottom: 1px solid #14172a;
  transition: background 0.2s ease;
  position: relative; will-change: transform;
}
.lb-row:hover { background: rgba(74,214,255,0.03); }
.lb-row:last-child { border-bottom: none; }
.lb-row.entering {
  opacity: 0; transform: translateY(20px);
  animation: row-enter 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
@keyframes row-enter { to { opacity: 1; transform: translateY(0); } }

.lb-row.rank-1::before, .lb-row.rank-2::before, .lb-row.rank-3::before {
  content: ''; position: absolute;
  left: 0; top: 15px; bottom: 15px;
  width: 5px; border-radius: 0 3px 3px 0;
}
.lb-row.rank-1::before { background: linear-gradient(180deg, #f5b80a, #ffd764); box-shadow: 0 0 18px rgba(245,184,10,0.6); }
.lb-row.rank-2::before { background: linear-gradient(180deg, #b566ff, #d4a0ff); box-shadow: 0 0 14px rgba(181,102,255,0.5); }
.lb-row.rank-3::before { background: linear-gradient(180deg, #4a90e2, #7ab4f5); box-shadow: 0 0 12px rgba(74,144,226,0.4); }
.lb-row.rank-1 { background: linear-gradient(90deg, rgba(245,184,10,0.05), transparent 60%); }
.lb-row.rank-2 { background: linear-gradient(90deg, rgba(181,102,255,0.04), transparent 60%); }
.lb-row.rank-3 { background: linear-gradient(90deg, rgba(74,144,226,0.04), transparent 60%); }

/* Rank cell */
.rank-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.rank-num { font-size: 22.5px; color: #5a608a; font-weight: 500; font-variant-numeric: tabular-nums; }
.rank-cell.r1 .rank-num { color: #f5b80a;  font-size: 25.5px; }
.rank-cell.r2 .rank-num { color: #b566ff; font-size: 25.5px; }
.rank-cell.r3 .rank-num { color: #4a90e2; font-size: 25.5px; }
.delta {
  font-size: 15px; margin-top: 6px;
  font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(-2px);
  transition: opacity 0.4s, transform 0.4s;
}
.delta.visible { opacity: 1; transform: translateY(0); }
.delta.up   { color: #4ade80; }
.delta.down { color: #ef4444; }

/* User cell */
.user-cell { display: flex; align-items: center; gap: 18px; min-width: 0; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19.5px; font-weight: 500; color: #0a0a1a;
  flex-shrink: 0; transition: box-shadow 0.4s;
  background-size: cover; background-position: center;
}
/* Avatar rings by rank */
.avatar.ring-gold { box-shadow: 0 0 0 3px #f5b80a, 0 0 20px rgba(245,184,10,0.5); }
.avatar.ring-myth { box-shadow: 0 0 0 3px #b566ff, 0 0 16px rgba(181,102,255,0.45); }
.avatar.ring-rare { box-shadow: 0 0 0 3px #4a90e2, 0 0 14px rgba(74,144,226,0.4); }

.user-info { min-width: 0; flex: 1; }
.user-name {
  display: flex; align-items: center; gap: 9px;
  font-size: 19.5px; color: #e0e7ff; font-weight: 500;
  overflow: hidden; min-width: 0;
}
.name-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; flex-shrink: 1;
}
.user-handle { font-size: 16.5px; color: #5a608a; margin-top: 3px; display: flex; align-items: center; gap: 6px; overflow: visible; }
.tier { font-size: 13.5px; padding: 3px 10.5px; border-radius: 7.5px; letter-spacing: 1.5px; font-weight: 500; flex-shrink: 0; }

/* Score cells */
.score-cell { text-align: right; }
.score-num {
  font-size: 25.5px; color: #4ad6ff; font-weight: 500;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
/* Rank-specific score colours */
.score-num.rank-gold {
  color: #f5b80a;
  text-shadow: 0 0 18px rgba(245,184,10,0.45);
}
.score-num.rank-myth {
  color: #b566ff;
  text-shadow: 0 0 14px rgba(181,102,255,0.4);
}
.score-num.rank-rare {
  color: #4a90e2;
  text-shadow: 0 0 12px rgba(74,144,226,0.35);
}
.score-num.secondary { font-size: 21px; color: #5a6080; }
.score-num.secondary.hl { color: #c0c5e0; }
.score-num.flash { animation: score-flash 0.8s ease-out; }
.score-pct { font-size: 15px; color: #5a608a; margin-top: 4.5px; }

/* Col header active highlight */
.col-header-cell { transition: color 0.2s; }
.col-header-cell.active { color: #4ad6ff; }

/* Empty state */
.empty-state {
  padding: 48px 0; text-align: center;
  color: #5a608a; font-size: 18px;
}

.footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 27px; padding-top: 27px;
  border-top: 1px solid #14172a;
  font-size: 16.5px; color: #5a608a;
}

/* Period badge */
.period-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: #8a90b0;
  background: rgba(255,255,255,0.04);
  border: 1px solid #1f2240;
  padding: 5px 14px; border-radius: 20px;
  margin-left: 12px; vertical-align: middle;
}

/* ── Rank weekly change ── */
.rank-weekly {
  font-size: 12px; font-weight: 700;
  margin-top: 3px; letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.rank-weekly.up     { color: #4ade80; }
.rank-weekly.down   { color: #ef4444; }
.rank-weekly.same   { color: #5a608a; }
.rank-weekly.debut  { color: #5a608a; font-size: 10px; letter-spacing: 0; }

/* ── Badge chips (row preview) ── */
.badge-preview { display: inline-flex; gap: 5px; align-items: center; margin-left: 8px; }
.badge-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 12px; line-height: 1;
  background: var(--bb); border: 1px solid var(--bc);
  cursor: default; transition: transform 0.15s;
  flex-shrink: 0;
}
.badge-chip:hover { transform: scale(1.25); }
.badge-preview .badge-chip:hover { transform: none; }
/* Role badge chip: just a colored dot */
.role-chip { width: 18px; height: 18px; border-radius: 50%; }
.role-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
/* Larger role dot for profile grid */
.role-dot-lg {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
}
/* Icon badge chip — larger than emoji chip so SVG details are visible */
.icon-chip { width: 32px; height: 32px; border-radius: 8px; padding: 0; }
.badge-icon { width: 28px; height: 28px; object-fit: contain; display: block; flex-shrink: 0; }
/* Larger icon for profile grid */
.badge-icon-lg { width: 44px; height: 44px; object-fit: contain; display: block; flex-shrink: 0; }

/* ── Profile panel ── */
.lb-row.profile-open {
  background: linear-gradient(90deg, rgba(74,214,255,0.04), transparent 80%) !important;
  border-bottom: none !important;
}
.lb-row { cursor: pointer; }

.profile-panel {
  border-bottom: 1px solid #14172a;
  background: rgba(7, 8, 28, 0.6);
  overflow: hidden;
  transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.profile-panel-inner {
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Stats bar */
.profile-stats { display: flex; gap: 0; flex-wrap: wrap; }
.pstat {
  padding: 12px 24px 12px 0;
  margin-right: 24px;
  border-right: 1px solid #14172a;
  min-width: 80px;
}
.pstat:last-child { border-right: none; }
.pstat-val   { font-size: 22px; font-weight: 600; color: #e0e7ff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pstat-label { font-size: 11px; letter-spacing: 2px; color: #5a608a; margin-top: 3px; text-transform: uppercase; }
.pstat-sub   { font-size: 12px; color: #3a4070; margin-top: 2px; }

/* Bottom section: badges + chart */
.profile-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.profile-section-title {
  font-size: 12px; letter-spacing: 3px; color: #5a608a;
  margin-bottom: 14px; text-transform: uppercase;
}
.profile-no-badges { color: #5a608a; font-size: 15px; }

/* Curated review block (заменяет rank-chart для all-time) */
.profile-review {
  background: linear-gradient(135deg, rgba(74,214,255,0.05), rgba(181,102,255,0.06));
  border: 1px solid rgba(74,214,255,0.18);
  border-radius: 14px;
  padding: 16px 18px;
}
.profile-review-role {
  font-size: 16px; font-weight: 700; color: #4ad6ff;
  letter-spacing: 0.3px; margin-bottom: 8px;
}
.profile-review-text {
  font-size: 13.5px; line-height: 1.65; color: #b8c0e0;
}
.profile-review-text b { color: #e0e7ff; font-weight: 600; }
.profile-review-empty {
  color: #5a608a; font-size: 13px; line-height: 1.6;
  background: transparent; border-color: #1a1d3a;
}
.rv-tag-mini {
  margin-left: 6px; padding: 2px 7px; border-radius: 5px;
  font-size: 9px; letter-spacing: 1px; font-weight: 600;
  background: rgba(181,102,255,0.15); color: #c89bff;
  text-transform: uppercase;
}

/* Badge grid in profile */
.badge-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.badge-item {
  display: flex; align-items: center; gap: 7px;
  background: var(--bb); border: 1px solid var(--bc);
  border-radius: 10px; padding: 6px 12px;
  font-size: 14px; transition: transform 0.15s;
  cursor: default;
}
.badge-item:hover { transform: translateY(-2px); }
.badge-emoji { font-size: 16px; line-height: 1; }
.badge-name  { color: var(--bc); font-weight: 500; white-space: nowrap; }

/* ── Custom tooltip ──────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0f1320;
  color: #c8d0e8;
  font-size: 11px; font-weight: 500; font-family: inherit;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid #2a3050;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 200;
}
[data-tip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #2a3050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 200;
}
[data-tip]:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-tip]:hover::after  { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Rank chart */
.rank-chart-wrap { }
.chart-title {
  font-size: 13px; letter-spacing: 3px; color: #5a608a;
  margin-bottom: 14px; text-transform: uppercase;
}
.rank-chart-svg {
  width: 100%; height: auto; display: block;
  overflow: visible;
}
/* Hover-тултип на точках чарта */
.chart-tip { visibility: hidden; pointer-events: none; }
.chart-point:hover .chart-tip { visibility: visible; }
.chart-point { cursor: default; }
.chart-empty {
  color: #5a608a; font-size: 14px; padding: 24px 0;
  text-align: center;
}

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 22px 0 4px;
  border-top: 1px solid #14172a; margin-top: 6px;
}
.page-arrow {
  background: rgba(255,255,255,0.04);
  border: 1px solid #1f2240;
  color: #8a90b0;
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.page-arrow:hover:not(:disabled) {
  border-color: #4ad6ff; color: #4ad6ff;
  background: rgba(74,214,255,0.08);
  box-shadow: 0 0 18px rgba(74,214,255,0.2);
}
.page-arrow:disabled { opacity: 0.28; cursor: default; }
.page-info { font-size: 17px; color: #8a90b0; min-width: 90px; text-align: center; letter-spacing: 1px; }

/* ── Mobile ── */
/* ── ≤1000px: tablet — keep DC/X, shrink columns ── */
@media (max-width: 1000px) {
  body { padding: 30px 15px; }
  .card { padding: 24px; }
  .constellation { height: auto; padding: 20px 0; display: flex; justify-content: space-evenly; align-items: flex-start; gap: 4px; }
  .constellation-bg { display: none; }
  .champion-pos { position: static; transform: none; flex: 1 1 0; min-width: 0; }
  .champ-1-pos, .champ-2-pos, .champ-3-pos { top: auto; left: auto; }
  .champion { animation: none; width: 100%; }
  .champ-info { width: 100%; padding: 0 6px; box-sizing: border-box; }
  .champ-1-pos .champ-avatar { width: 80px; height: 80px; font-size: 22px; }
  .champ-1-pos .champ-score { font-size: 22px; }
  .score-num.secondary { font-size: 15px; }
  .crown-icon { display: none; }
  .col-header, .lb-row { grid-template-columns: 52px 1fr 100px 76px 76px; gap: 10px; }
  .controls-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lb-search { width: 100%; }
  .filter-label { display: none; }
  .filter-btn { padding: 8px 14px; font-size: 14px; }
  .score-num { font-size: 18px; }
  .user-name { font-size: 15px; }
  .title { font-size: 26px; }
  .profile-bottom-row { grid-template-columns: 1fr; }
}

/* ── ≤740px: phone — hide tier tag + badge preview ── */
@media (max-width: 740px) {
  body { padding: 16px 10px; }
  .card { padding: 18px 16px; border-radius: 22px; }
  .header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; }
  .title { font-size: 22px; letter-spacing: 3px; }
  /* Top nav — 4 вкладки на узких экранах, разрешаем скролл */
  .top-nav { padding: 0 10px; gap: 2px; overflow-x: auto; }
  .top-nav::-webkit-scrollbar { display: none; }
  .nav-brand { margin-right: 6px; letter-spacing: 2px; font-size: 11px; flex-shrink: 0; }
  .nav-tab { padding: 4px 8px; font-size: 11px; letter-spacing: 0; white-space: nowrap; flex-shrink: 0; }
  .col-header, .lb-row { grid-template-columns: 44px 1fr 82px 56px 56px; gap: 8px; }
  .lb-row { padding: 14px 12px; }
  .col-header { padding: 10px 12px 8px; font-size: 11px; }
  .avatar { width: 42px; height: 42px; font-size: 14px; }
  .user-cell { gap: 10px; }
  .user-name { font-size: 14px; gap: 5px; }
  .user-handle { font-size: 12px; }
  .score-num { font-size: 16px; }
  .score-num.secondary { font-size: 13px; }
  .score-pct { display: none; }
  .rank-num { font-size: 17px; }
  /* Hide tier badge and badge preview on phones */
  .tier { display: none; }
  .badge-preview { display: none; }
}

/* ── ≤480px: small phone — keep podium, very compact ── */
@media (max-width: 480px) {
  body { padding: 10px 8px; }
  .card { padding: 14px 12px; border-radius: 18px; }

  /* Header */
  .logo-mini { font-size: 11px; letter-spacing: 4px; }
  .title { font-size: 19px; letter-spacing: 2px; }
  .live { font-size: 12px; gap: 8px; }
  .pulse-dot { width: 8px; height: 8px; }

  /* Podium — keep but scale down */
  .constellation-wrap { margin: 16px -6px 8px; padding: 12px 6px 20px; }
  .constellation { padding: 10px 0; }
  .champ-avatar { width: 56px !important; height: 56px !important; font-size: 15px !important; }
  .champ-orbit-ring, .champ-orbit-ring-2 { display: none; }
  .champ-glow { inset: -20px; }
  .champ-name { font-size: 13px; gap: 4px; }
  .champ-handle { font-size: 11px; }
  .champ-score { font-size: 16px !important; margin-top: 4px; }
  .champ-rank-pill { font-size: 11px; padding: 2px 8px; }
  .champ-tier { font-size: 10px; padding: 2px 7px; }
  .pa { display: none; }

  /* Controls */
  .controls-row { gap: 8px; }
  .filter-row { gap: 5px; margin-bottom: 8px; }
  .filter-btn { padding: 6px 9px; font-size: 11px; border-radius: 9px; }
  .filter-btn .ti { font-size: 12px; }
  .lb-search { font-size: 13px; padding: 8px 12px 8px 34px; border-radius: 9px; }
  .lb-search-icon { font-size: 13px; left: 11px; }

  /* Table */
  .col-header, .lb-row { grid-template-columns: 34px 1fr 62px 40px 40px; gap: 6px; }
  .lb-row { padding: 11px 8px; }
  .col-header { padding: 8px 8px 6px; font-size: 10px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .user-cell { gap: 8px; }
  .user-name { font-size: 12px; gap: 4px; }
  .user-handle { font-size: 10px; }
  .rank-num { font-size: 15px; }
  .rank-cell.r1 .rank-num, .rank-cell.r2 .rank-num, .rank-cell.r3 .rank-num { font-size: 17px; }
  .score-num { font-size: 13px; }
  .score-num.secondary { font-size: 10px; }
  .delta { font-size: 10px; }
  .rank-weekly { font-size: 9px; }

  /* Profile panel */
  .profile-panel-inner { padding: 10px 8px 14px; gap: 12px; }
  .pstat { padding: 6px 10px 6px 0; margin-right: 10px; min-width: 54px; }
  .pstat-val { font-size: 15px; }
  .pstat-label { font-size: 9px; letter-spacing: 1px; }
  .badge-item { padding: 4px 8px; font-size: 12px; }
  .badge-icon-lg { width: 26px; height: 26px; }

  /* Footer */
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; }
  .period-badge { font-size: 11px; }
  .pagination { gap: 10px; }
  .page-arrow { width: 34px; height: 34px; font-size: 17px; }
  .page-info { font-size: 13px; }

  /* Tooltips off on touch */
  [data-tip]::before, [data-tip]::after { display: none; }
}
