/* ===== CSS VARIABLES ===== */
:root {
  --bg: #0f1117;
  --surface: #1a1f2e;
  --surface2: #242938;
  --border: #2d3348;
  --accent: #6366f1;
  --accent-dim: rgba(99,102,241,0.12);
  --accent2: #ef4444;
  --accent3: #38bdf8;
  --text: #e2e8f0;
  --muted: #8892a4;
  --green: #22c55e;
  --orange: #f97316;
  --glow: rgba(99,102,241,0.3);
  --radius: 14px;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'Inter', system-ui, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ===== BACKGROUND FX ===== */
.bg-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.bg-vinyl {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  top: -150px; right: -150px;
  background: repeating-radial-gradient(
    circle at center,
    #2d3348 0, #2d3348 2px,
    #1a1f2e 2px, #1a1f2e 7px
  );
  opacity: 0.3;
  animation: vinyl-spin 25s linear infinite;
}
.bg-vinyl::before {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--bg);
}
.bg-vinyl::after {
  content: '';
  position: absolute;
  inset: 44%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  box-shadow: 0 0 20px var(--glow);
}
@keyframes vinyl-spin { to { transform: rotate(360deg); } }

.bg-glow {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  bottom: -100px; left: -100px;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
}

/* ===== LAYOUT ===== */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  max-width: 500px; margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 26px;
  letter-spacing: -1px;
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow);
  display: flex; align-items: center; gap: 8px;
}
.logo span { font-size: 22px; }
.nav-btns { display: flex; gap: 8px; }
.nav-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 8px 14px; font-family: var(--font-mono);
  font-size: 12px; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: border-color 0.2s, background 0.2s;
}
.nav-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.nav-btn.active { border-color: var(--accent); color: var(--accent); }
.nav-btn-icon {
  width: 36px; height: 36px;
  padding: 0; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.nav-btn-invite { color: var(--green); border-color: rgba(34,197,94,0.35); }
.nav-btn-invite:hover { border-color: var(--green); background: rgba(34,197,94,0.08); }
.nav-btn-admin { color: var(--accent); border-color: rgba(99,102,241,0.4); }
.nav-btn-admin:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ===== USER GREETING ===== */
.greeting {
  padding: 12px 0 8px;
  font-size: 12px; color: var(--muted);
  letter-spacing: 1px;
}

/* ===== THEME BADGE ===== */
.theme-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 20px;
}

/* ===== VIEWS ===== */
.view { display: none; flex-direction: column; flex: 1; padding-bottom: 24px; }
.view.active { display: flex; }

/* ===== GAME VIEW ===== */

/* Progress bar */
.progress-row {
  display: flex; gap: 5px;
  padding: 14px 0 8px;
}
.prog-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.prog-step.done  { background: var(--green); }
.prog-step.wrong { background: var(--accent2); }
.prog-step.close { background: #eab308; }
.prog-step.skip  { background: var(--muted); }
.prog-step.current { background: var(--accent); animation: prog-pulse 1s ease-in-out infinite; }
@keyframes prog-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Player card */
.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px 20px;
  margin: 8px 0 16px;
  position: relative;
  overflow: hidden;
}
.player-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Waveform visualizer */
.waveform {
  display: flex; align-items: center;
  justify-content: center;
  gap: 3px;
  height: 56px;
  margin-bottom: 20px;
}
.wf-bar {
  width: 4px; border-radius: 2px;
  background: var(--border);
  transition: background 0.3s, height 0.15s;
}
.wf-bar.active {
  background: var(--accent);
  animation: wf-dance var(--dur, 0.5s) ease-in-out infinite alternate;
}
.wf-bar.played { background: var(--accent); opacity: 0.5; }
@keyframes wf-dance {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}

/* Snippet timer bar */
.snippet-info {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 14px;
  font-size: 11px; color: var(--muted); letter-spacing: 1px;
}
.snippet-label { text-transform: uppercase; }
.snippet-duration { color: var(--accent); font-weight: 700; }

.timer-bar-wrap {
  height: 3px; background: var(--border); border-radius: 2px;
  margin-bottom: 20px; overflow: hidden;
}
.timer-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; width: 0%;
  transition: width linear;
}

/* Play button */
.play-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  font-size: 24px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 var(--glow);
}
.play-btn:hover { transform: scale(1.06); box-shadow: 0 0 24px var(--glow); }
.play-btn:active { transform: scale(0.95); }
.play-btn.playing { animation: btn-pulse 1s ease-in-out infinite; }
@keyframes btn-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(99,102,241,0); }
}

/* Guess list */
.guesses-list {
  display: flex; flex-direction: column;
  gap: 8px; margin-bottom: 14px;
}
.guess-row {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
  min-height: 44px;
  display: flex; align-items: center; gap: 10px;
}
.guess-row.empty {
  background: var(--surface); border-color: var(--border);
  color: var(--muted);
}
.guess-row.skipped {
  background: var(--surface2); border-color: var(--border);
  color: var(--muted);
}
.guess-row.close {
  background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.35);
  color: #eab308;
}
.guess-row.wrong {
  background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.3);
  color: var(--accent2);
}
.guess-row.correct {
  background: rgba(87,255,154,0.1); border-color: rgba(87,255,154,0.3);
  color: var(--green);
}
.guess-row .guess-icon { font-size: 14px; flex-shrink: 0; }
.guess-row .guess-text { flex: 1; }
.guess-num {
  font-size: 10px; color: var(--muted); margin-left: auto;
}

/* Input area */
.input-area {
  position: relative; margin-bottom: 10px;
}
.guess-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guess-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.guess-input::placeholder { color: var(--muted); }
.guess-input:disabled {
  opacity: 0.5; cursor: not-allowed;
}

/* Autocomplete dropdown */
.autocomplete-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  z-index: 100;
  display: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.autocomplete-drop.open { display: block; }
.ac-item {
  padding: 13px 18px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  display: flex; flex-direction: column; gap: 2px;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.focused { background: var(--accent-dim); }
.ac-item .ac-track { color: var(--text); }
.ac-item .ac-artist { color: var(--muted); font-size: 11px; }

/* Action buttons row */
.action-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn {
  padding: 15px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  letter-spacing: 0.5px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-skip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-skip:hover:not(:disabled) { border-color: var(--muted); color: var(--text); }
.btn-guess {
  background: var(--accent);
  color: #fff;
}
.btn-guess:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

/* ===== RESULT PANEL ===== */
.result-panel {
  display: none; flex-direction: column;
  align-items: center; text-align: center;
  padding: 20px 0;
  animation: fade-up 0.5s ease;
}
.result-panel.show { display: flex; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-emoji { font-size: 56px; margin-bottom: 12px; }
.result-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
  margin-bottom: 6px;
}
.result-title.win { color: var(--green); }
.result-title.lose { color: var(--accent2); }
.result-song {
  font-size: 16px; color: var(--text); font-weight: 700;
  margin-bottom: 4px;
}
.result-artist { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.album-art {
  width: 160px; height: 160px; border-radius: 16px;
  object-fit: cover; margin-bottom: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.album-art-placeholder {
  width: 160px; height: 160px; border-radius: 16px;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; margin-bottom: 20px;
}

.score-blocks {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.score-block {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.score-block.correct { background: rgba(34,197,94,0.2);  border: 1px solid rgba(34,197,94,0.5);  color: var(--green); }
.score-block.close   { background: rgba(234,179,8,0.2);  border: 1px solid rgba(234,179,8,0.5);   color: #eab308; }
.score-block.wrong   { background: rgba(239,68,68,0.2);  border: 1px solid rgba(239,68,68,0.5);  color: var(--accent2); }
.score-block.skip    { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); }
.score-block.empty   { background: var(--surface2); border: 1px solid var(--border); opacity: 0.35; }

.share-btn {
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none; border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }

.apple-music-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fc3c44;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
  margin-bottom: 8px;
  transition: opacity 0.15s;
}
.apple-music-btn:hover { opacity: 0.85; }
.apple-music-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.amazon-music-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #ff9900;
  color: #111;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
  margin-bottom: 8px;
  transition: opacity 0.15s;
}
.amazon-music-btn:hover { opacity: 0.85; }
.amazon-music-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.next-game-info {
  font-size: 12px; color: var(--muted); margin-top: 8px;
}
#next-countdown { color: var(--accent); font-weight: 700; }

/* ===== LEADERBOARD VIEW ===== */
.lb-header {
  padding: 16px 0 8px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.lb-section-title {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.lb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}
.lb-row {
  display: flex; align-items: center;
  padding: 13px 16px; gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row.me { background: var(--accent-dim); }
.lb-rank {
  font-size: 13px; color: var(--muted); width: 22px; flex-shrink: 0;
  font-weight: 700;
}
.lb-rank.gold   { color: #ffd700; }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name {
  flex: 1; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-name.me { color: var(--accent); font-weight: 700; }
.lb-stat {
  font-size: 12px; color: var(--muted); text-align: right;
}
.lb-stat strong { color: var(--text); display: block; font-size: 14px; }
.lb-solved-blocks { display: flex; gap: 3px; }
.lb-dot {
  width: 8px; height: 8px; border-radius: 2px;
}
.lb-dot.solved { background: var(--green); }
.lb-dot.fail   { background: var(--accent2); }
.lb-dot.skip   { background: var(--muted); }

/* Today's song reveal in LB */
.today-song-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 16px;
}
.today-art {
  width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--border);
}
.today-art-placeholder {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.today-song-info { flex: 1; min-width: 0; }
.today-song-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.today-song-name { font-size: 15px; font-weight: 700; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-song-artist { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 12px 24px; border-radius: 30px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  z-index: 999; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ===== LOADING ===== */
.loading-spinner {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 0; gap: 16px; color: var(--muted); font-size: 13px;
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Mobile safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.hamburger:hover { border-color: var(--accent); background: var(--accent-dim); }
.hamburger span {
  display: block;
  width: 16px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 8px 0 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
  padding: 14px 16px;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: none;
  text-align: left;
  width: 100%;
  font-family: var(--font-display);
  text-decoration: none;
  display: block;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-link:last-child { border-bottom: none; }
.mobile-menu-link:hover { background: var(--accent-dim); color: var(--accent); }
.mobile-menu-link.active { color: var(--accent); font-weight: 700; }
.mobile-menu-link-admin { color: var(--accent); }

/* On very small screens, shrink the tab labels to fit */
@media (max-width: 360px) {
  .nav-btn { padding: 8px 10px; font-size: 11px; }
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  width: 36px; height: 36px;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --accent: #6366f1;
  --accent-dim: rgba(99,102,241,0.1);
  --accent2: #ef4444;
  --accent3: #38bdf8;
  --text: #1e293b;
  --muted: #64748b;
  --green: #16a34a;
  --orange: #ea580c;
  --glow: rgba(99,102,241,0.2);
}

[data-theme="light"] .bg-vinyl {
  background: repeating-radial-gradient(
    circle at center,
    #cbd5e1 0, #cbd5e1 2px,
    #e2e8f0 2px, #e2e8f0 7px
  );
}

[data-theme="light"] .bg-glow {
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 70%);
}

/* ===== RESULT ACTIONS ROW ===== */
.result-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 12px;
}
.stats-btn {
  padding: 14px 20px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.stats-btn:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ===== STATS MODAL ===== */
.stats-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,15,.85);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.stats-overlay.open { display: flex; }

.stats-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px 28px;
  max-width: 340px; width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.stats-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: var(--muted); font-size: 18px;
  cursor: pointer; line-height: 1; padding: 4px;
}
.stats-close:hover { color: var(--text); }
.stats-heading {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); text-align: center;
  margin-bottom: 20px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 28px;
}
.stats-cell { text-align: center; }
.stats-num {
  font-size: 32px; font-weight: 800;
  color: var(--text); line-height: 1;
}
.stats-label {
  font-size: 10px; color: var(--muted);
  margin-top: 4px; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.stats-dist-heading {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.dist-row {
  display: flex; align-items: center;
  gap: 8px; margin-bottom: 6px;
}
.dist-num {
  font-size: 13px; font-weight: 700;
  color: var(--text); width: 12px;
  text-align: right; flex-shrink: 0;
}
.dist-track { flex: 1; height: 22px; }
.dist-bar {
  height: 100%; border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  font-size: 12px; font-weight: 700;
  color: var(--text); min-width: 28px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  box-sizing: border-box;
}
.dist-bar.current {
  background: var(--green);
  border-color: var(--green);
  color: #0a0a0f;
}
