/* ============================================
   Svera Defense - Web UI Stylesheet
   Matching C++ raygui dark-neon theme exactly
   ============================================ */

/* --- Reset / Normalize --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: #0a0e17;
  color: #e0e0e0;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* --- CSS Custom Properties (matches C++ palette) --- */
:root {
  --bg: #0a0e17;
  --bg-panel: rgba(14, 20, 34, 0.92);
  --primary: #50dcff;       /* kNeonCyan: 80,220,255 */
  --gold: #ffd95c;          /* kNeonGold: 255,217,92 */
  --secondary: #76ff03;
  --danger: #ff1744;
  --warning: #ffc107;
  --accent-play: #ff5a32;   /* kAccentPlay: 255,90,50 */
  --accent-skills: #a078ff; /* kAccentSkills: 160,120,255 */
  --accent-lobby: #50b4ff;  /* kAccentLobby: 80,180,255 */
  --accent-gold: #ffc850;   /* kAccentGold: 255,200,80 */
  --accent-jade: #50dc8c;   /* kAccentJade: 80,220,140 */
  --accent-audio: #50b4ff;  /* kAccentAudio */
  --accent-video: #a078ff;  /* kAccentVideo */
  --accent-gameplay: #50dc8c;
  --accent-access: #ffc35a;
  --accent-graphics: #50e6dc;
  --panel-bg: rgba(14, 20, 34, 0.92);
  --border: rgba(80, 220, 255, 0.3);
  --border-idle: rgba(60, 80, 110, 0.7);
  --text: #e6ebf5;
  --text-muted: #a0aabe;
  --font-mono: 'Courier New', Courier, monospace;
  --topbar-h: 52px;
  --buildpanel-h: 110px;
}

/* --- Hidden utility --- */
.hidden {
  display: none !important;
}

/* --- Scene Transition --- */
.scene-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0e17;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.scene-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* --- Game Container --- */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

/* --- HUD Panel base --- */
.hud-panel {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Top Bar (matches kTopbarH = 52px, gradient + neon underline) --- */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-h);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(14,20,34,0.92) 0%, rgba(6,10,20,0.92) 100%);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 2px 0 0 rgba(80,220,255,0.4), 0 3px 0 0 rgba(80,220,255,0.15);
  z-index: 100;
  gap: 8px;
  animation: slideInTop 0.4s ease;
}

.top-bar-left,
.top-bar-center,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-left { flex: 0 0 auto; }
.top-bar-center { flex: 1 1 auto; justify-content: center; gap: 20px; }
.top-bar-right { flex: 0 0 auto; gap: 10px; }

.hud-gold-group, .hud-lives-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Icon placeholders */
.coin-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd95c 40%, #cc9a00 100%);
  border: 1px solid #ffb300;
  display: inline-block;
}
.heart-icon {
  width: 18px; height: 18px;
  background: var(--danger);
  clip-path: path('M9 3C6.5 0 2 0 1 3.5S3 9 9 14c6-5 9-7.5 8-10.5S11.5 0 9 3z');
  display: inline-block;
}

.hud-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(140,170,200,0.9);
  text-transform: uppercase;
}

.hud-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.gold-text { color: var(--gold); }
.health-text { color: #dcff8c; }

/* Wave group */
.wave-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wave-progress {
  width: 110px; height: 4px;
  background: rgba(30,40,55,0.9);
  border: 1px solid rgba(60,80,110,0.5);
  border-radius: 2px;
  overflow: hidden;
}
.wave-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), rgba(90,180,240,1));
  transition: width 0.5s ease;
}

/* Run timer */
.run-timer {
  font-family: var(--font-mono);
  font-size: 16px;
  color: rgba(170,195,220,0.8);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Mode pill in top bar */
.mode-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(18,26,40,0.92);
  border: 1px solid rgba(80,220,140,0.7);
  border-radius: 12px;
  border-left: 3px solid var(--accent-jade);
}
.mode-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-jade);
}
.mode-sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(180,200,220,0.6);
}
.difficulty-label {
  font-size: 11px;
  color: rgba(210,225,245,0.8);
}

/* FPS Counter */
.fps-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(120,200,130,0.8);
}

/* --- Wave Preview (under top bar) --- */
#wave-preview {
  position: fixed;
  top: var(--topbar-h);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(20,28,44,0.88);
  border: 1px solid var(--border-idle);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 95;
}
.wave-preview-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.wave-preview-enemies {
  display: flex;
  gap: 4px;
}
.wave-preview-enemies .enemy-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
}

/* Speed Buttons */
.speed-controls { display: flex; gap: 3px; }
.speed-btn {
  min-width: 30px;
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid var(--border-idle);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.speed-btn:hover {
  border-color: var(--primary);
  background: rgba(80,220,255,0.1);
}
.speed-btn.active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* --- Bottom Build Panel (matches C++ 110px height, tabbed) --- */
#build-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--buildpanel-h);
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
  animation: slideInBottom 0.5s ease;
}

/* Build panel tabs */
.build-tabs {
  display: flex;
  height: 30px;
  padding: 0 16px;
  gap: 6px;
  align-items: stretch;
  border-bottom: 1px solid rgba(60,80,110,0.4);
}
.build-tab {
  padding: 4px 12px;
  border: 1px solid rgba(60,80,110,0.5);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: rgba(20,28,40,0.8);
  color: rgba(180,190,210,0.85);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.build-tab:hover {
  color: #fff;
  background: rgba(30,40,55,0.9);
}
.build-tab.active {
  background: rgba(90,170,255,0.12);
  color: #fff;
  border-color: rgba(90,170,255,0.7);
  box-shadow: 0 2px 0 -1px rgba(90,170,255,0.8);
}
.build-tab[data-tab="Basic"].active { border-color: rgba(90,170,255,0.7); }
.build-tab[data-tab="Heavy"].active { border-color: rgba(255,150,60,0.7); }
.build-tab[data-tab="Elemental"].active { border-color: rgba(180,90,255,0.7); }
.build-tab[data-tab="Special"].active { border-color: rgba(80,240,200,0.7); }
.build-tab[data-tab="Soldiers"].active { border-color: rgba(220,200,110,0.7); }
.build-tab[data-tab="Defense"].active { border-color: rgba(160,200,160,0.7); }

/* Build cards area */
.build-cards {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.build-cards::-webkit-scrollbar { display: none; }

.build-cancel {
  position: absolute;
  top: 4px;
  right: 16px;
}

/* --- Tower Card --- */
.tower-card {
  flex-shrink: 0;
  min-width: 84px;
  width: 100px;
  height: 68px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border-idle);
  border-radius: 6px;
  background: rgba(18,26,40,0.92);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 4px;
  user-select: none;
  position: relative;
}
.tower-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: var(--primary);
  opacity: 0.6;
}
.tower-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(80,220,255,0.3);
  transform: translateY(-2px);
}
.tower-card:active {
  transform: scale(0.95);
}
.tower-card.active,
.tower-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255,217,92,0.4), inset 0 0 8px rgba(255,217,92,0.1);
}
.tower-card.unaffordable {
  opacity: 0.45;
  filter: grayscale(0.5);
  cursor: not-allowed;
}
.tower-card.unaffordable:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-idle);
}

.tower-card .tower-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.tower-card .tower-name {
  font-size: 10px;
  text-align: center;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tower-card .tower-cost {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 600;
}
.tower-card .tower-hotkey {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 9px;
  font-family: var(--font-mono);
  color: rgba(180,190,210,0.6);
}

/* --- Tower Info Panel (right side, slide-in) --- */
#tower-info {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: 280px;
  height: calc(100vh - var(--topbar-h) - var(--buildpanel-h));
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
#tower-info:not(.hidden) {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(60,75,100,0.5);
}
.panel-header #tower-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  flex: 1;
  text-shadow: 0 0 10px rgba(255,217,92,0.3);
}
.tier-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  padding: 2px 6px;
  border: 1px solid rgba(255,217,92,0.4);
  border-radius: 4px;
  background: rgba(255,217,92,0.08);
}
.panel-close {
  width: 26px; height: 26px;
  border: 1px solid var(--border-idle);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}
.panel-close:hover {
  background: rgba(255,23,68,0.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* Tier stars */
.tier-stars {
  display: flex;
  gap: 3px;
}
.tier-stars .star {
  width: 10px; height: 10px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: rgba(80,90,110,0.8);
}
.tier-stars .star.filled {
  background: var(--gold);
}

/* Stat bars */
.panel-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
}
.stat-bar-row .stat-label {
  width: 36px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(180,190,210,0.9);
}
.stat-bar {
  flex: 1;
  height: 10px;
  background: rgba(14,18,28,0.9);
  border: 1px solid rgba(60,75,100,0.5);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.stat-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.stat-bar-preview {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  opacity: 0.3;
  border-radius: 2px;
}
[data-stat="hp"] .stat-bar-fill { background: linear-gradient(90deg, rgba(20,28,44,1), rgba(80,220,90,1)); }
[data-stat="damage"] .stat-bar-fill { background: linear-gradient(90deg, rgba(20,28,44,1), rgba(255,120,110,1)); }
[data-stat="range"] .stat-bar-fill { background: linear-gradient(90deg, rgba(20,28,44,1), rgba(120,200,255,1)); }
[data-stat="fireRate"] .stat-bar-fill { background: linear-gradient(90deg, rgba(20,28,44,1), rgba(160,255,180,1)); }

.stat-bar-row .stat-value {
  min-width: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 2px 0;
}
.stat-label { color: rgba(180,190,210,0.9); font-size: 11px; }
.stat-value { font-family: var(--font-mono); color: var(--text); font-weight: 600; font-size: 12px; }

.dps-chip {
  padding: 2px 8px;
  background: rgba(20,30,50,0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: rgba(255,220,160,1);
}
.kills-row .stat-value { color: rgba(255,220,220,1); font-size: 14px; }

.tower-description {
  font-size: 11px;
  color: rgba(150,160,180,0.9);
  line-height: 1.3;
}

/* Target Mode Selector */
.panel-target { display: flex; flex-direction: column; gap: 6px; }
.target-mode-selector {
  display: flex;
  gap: 4px;
}
.target-btn {
  flex: 1;
  padding: 5px 4px;
  border: 1px solid var(--border-idle);
  border-radius: 12px;
  background: rgba(22,28,42,0.9);
  color: rgba(200,210,225,0.85);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.target-btn:hover {
  border-color: var(--primary);
  background: rgba(80,220,255,0.08);
}
.target-btn.active {
  background: rgba(50,65,95,0.9);
  color: #fff;
  border-color: rgba(120,200,255,0.8);
  box-shadow: 0 0 6px rgba(120,200,255,0.3);
}

/* Upgrade path selector */
.panel-path { display: flex; flex-direction: column; gap: 6px; }
.path-label {
  font-size: 11px;
  color: rgba(140,150,170,0.9);
}
.path-buttons {
  display: flex;
  gap: 6px;
}
.btn-path {
  flex: 1;
  padding: 8px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-path.path-a {
  background: rgba(255,170,80,0.1);
  border: 1px solid rgba(255,170,80,0.6);
  color: rgba(255,200,130,1);
}
.btn-path.path-a:hover { box-shadow: 0 0 12px rgba(255,170,80,0.4); }
.btn-path.path-b {
  background: rgba(90,220,255,0.1);
  border: 1px solid rgba(90,220,255,0.6);
  color: rgba(130,220,255,1);
}
.btn-path.path-b:hover { box-shadow: 0 0 12px rgba(90,220,255,0.4); }

/* Panel action buttons */
.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.btn-upgrade {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255,215,110,0.6);
  border-radius: 6px;
  background: rgba(255,215,110,0.08);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-upgrade:hover { box-shadow: 0 0 16px rgba(255,215,110,0.4); background: rgba(255,215,110,0.15); }
.btn-upgrade:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-sell {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(220,90,80,0.6);
  border-radius: 6px;
  background: rgba(220,90,80,0.08);
  color: rgba(255,150,140,1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-sell:hover { box-shadow: 0 0 12px rgba(220,90,80,0.4); background: rgba(220,90,80,0.15); }

/* --- Ability Bar (6 abilities, matches C++ kAbilityCount=6) --- */
#ability-bar {
  position: fixed;
  bottom: calc(var(--buildpanel-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 100;
}

.ability-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-idle);
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  overflow: hidden;
}
.ability-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(80,220,255,0.4);
  transform: scale(1.08);
}
.ability-btn:active { transform: scale(0.92); }
.ability-btn.on-cooldown { opacity: 0.6; }

.ability-btn .ability-icon {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
}

/* Ability icon colors matching C++ accent array */
.ability-icon-airstrike::after { content: '\2708'; color: rgba(255,140,60,1); }
.ability-icon-freeze::after { content: '\2744'; color: rgba(120,200,255,1); }
.ability-icon-goldrush::after { content: '\2605'; color: rgba(255,215,60,1); }
.ability-icon-repair::after { content: '\2764'; color: rgba(120,230,120,1); }
.ability-icon-timeslow::after { content: '\231A'; color: rgba(170,130,240,1); }
.ability-icon-doubler::after { content: 'x2'; font-size: 14px; font-weight: 900; color: rgba(255,180,90,1); }

/* Cooldown overlay: conic-gradient sweep */
.ability-cooldown-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(rgba(0,0,0,0.7) var(--cooldown, 0%), transparent var(--cooldown, 0%));
  pointer-events: none;
  z-index: 2;
}

/* Key label for ability */
.ability-key {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--border-idle);
  font-size: 9px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  z-index: 3;
}

/* --- Wave Banner --- */
#wave-banner {
  position: fixed;
  top: 80px; left: 0; right: 0;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(8,14,26,0.88) 0%, rgba(4,8,16,0.88) 100%);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-100%);
  transition: transform 0.5s ease, opacity 0.4s ease;
}
#wave-banner.active {
  transform: translateX(0);
  opacity: 1;
}
.banner-rail {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--primary);
}
.banner-rail.top { top: 0; }
.banner-rail.bottom { bottom: 0; }
.banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.banner-tag {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}
.banner-title {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(80,220,255,0.5);
  letter-spacing: 2px;
}
.banner-enemies {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Overlay Fullscreen --- */
.overlay-fullscreen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,23,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  animation: fadeIn 0.4s ease;
  padding: 24px;
  overflow-y: auto;
}

/* --- Main Menu --- */
.menu-bg-tint {
  position: absolute; inset: 0;
  background: rgba(8,10,18,0.4);
  pointer-events: none;
}

.menu-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 500px;
  z-index: 1;
}

.menu-title-group { text-align: center; margin-bottom: 12px; }
.game-title {
  font-size: 56px;
  font-weight: 900;
  color: #f5ebff;
  text-shadow: 0 0 30px rgba(160,120,255,0.6), 0 0 60px rgba(160,120,255,0.3);
  letter-spacing: 2px;
  animation: glow 3s ease-in-out infinite alternate;
}
.game-subtitle {
  font-size: 18px;
  color: rgba(180,190,210,0.7);
  margin-top: 6px;
  letter-spacing: 2px;
}

/* Selector pills (mode/difficulty/map) */
.menu-selectors {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.selector-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.selector-heading {
  font-size: 12px;
  font-weight: 600;
  color: rgba(160,170,195,0.8);
  letter-spacing: 1px;
}
.pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.pill-row-wrap { flex-wrap: wrap; }

.pill {
  padding: 7px 14px;
  border: 1px solid rgba(80,95,115,0.6);
  border-radius: 14px;
  background: rgba(26,32,46,0.85);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pill:hover {
  border-color: var(--primary);
  background: rgba(50,65,80,0.9);
}
.pill.active {
  background: rgba(80,220,140,0.12);
  border-color: var(--accent-jade);
  color: #fff;
  box-shadow: 0 0 10px rgba(80,220,140,0.3);
}

/* Menu buttons */
.menu-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center; }
.menu-main-buttons { margin-bottom: 8px; }
.menu-secondary-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-transform: uppercase;
  min-width: 140px;
}
.menu-btn:active { transform: scale(0.96); }

.primary-btn {
  background: var(--accent-play);
  color: #fff;
  border-color: var(--accent-play);
  box-shadow: 0 0 12px rgba(255,90,50,0.3);
}
.primary-btn:hover { box-shadow: 0 0 24px rgba(255,90,50,0.5); filter: brightness(1.1); }

.continue-btn { background: var(--accent-jade); color: var(--bg); border-color: var(--accent-jade); }
.skills-btn { background: transparent; color: var(--accent-skills); border-color: var(--accent-skills); }
.skills-btn:hover { background: rgba(160,120,255,0.1); box-shadow: 0 0 12px rgba(160,120,255,0.3); }
.lobby-btn { background: transparent; color: var(--accent-lobby); border-color: var(--accent-lobby); }
.lobby-btn:hover { background: rgba(80,180,255,0.1); box-shadow: 0 0 12px rgba(80,180,255,0.3); }
.leaderboard-btn { background: transparent; color: var(--accent-gold); border-color: var(--accent-gold); }
.leaderboard-btn:hover { background: rgba(255,200,80,0.1); box-shadow: 0 0 12px rgba(255,200,80,0.3); }
.career-btn { background: transparent; color: var(--accent-jade); border-color: var(--accent-jade); }
.career-btn:hover { background: rgba(80,220,140,0.1); }
.settings-btn { background: transparent; color: var(--text-muted); border-color: var(--border-idle); }
.settings-btn:hover { border-color: var(--text); color: var(--text); }

.secondary-btn {
  background: transparent;
  color: var(--text);
  border-color: var(--border-idle);
}
.secondary-btn:hover { border-color: var(--primary); color: var(--primary); }

/* --- Settings Overlay --- */
.settings-panel {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(60,80,110,0.4);
}
.settings-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-group-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(80,130,180,0.2);
}
.audio-accent { color: var(--accent-audio); border-color: rgba(80,180,255,0.3); }
.video-accent { color: var(--accent-video); border-color: rgba(160,120,255,0.3); }
.gameplay-accent { color: var(--accent-gameplay); border-color: rgba(80,220,140,0.3); }
.access-accent { color: var(--accent-access); border-color: rgba(255,195,90,0.3); }
.graphics-accent { color: var(--accent-graphics); border-color: rgba(80,230,220,0.3); }

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
}
.settings-row label {
  min-width: 100px;
  font-size: 14px;
  color: var(--text);
}
.slider-value {
  min-width: 40px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: right;
}

/* Neon slider */
.neon-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(14,18,28,0.9);
  border-radius: 3px;
  outline: none;
}
.neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(80,220,255,0.4);
}
.audio-slider::-webkit-slider-thumb { border-color: var(--accent-audio); box-shadow: 0 0 8px rgba(80,180,255,0.4); }
.gameplay-slider::-webkit-slider-thumb { border-color: var(--accent-gameplay); box-shadow: 0 0 8px rgba(80,220,140,0.4); }
.graphics-slider::-webkit-slider-thumb { border-color: var(--accent-graphics); box-shadow: 0 0 8px rgba(80,230,220,0.4); }

/* Neon checkbox */
.neon-checkbox {
  width: 22px; height: 22px;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--border-idle);
  border-radius: 4px;
  background: rgba(16,22,34,0.9);
  cursor: pointer;
  position: relative;
}
.neon-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.neon-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 6px; height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Segmented control */
.segmented {
  display: flex;
  border: 1px solid var(--border-idle);
  border-radius: 6px;
  overflow: hidden;
}
.seg-btn {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-left: 1px solid rgba(60,75,95,0.5);
  background: rgba(20,26,38,0.85);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.seg-btn:first-child { border-left: none; }
.seg-btn:hover { background: rgba(40,50,65,0.9); }
.seg-btn.active {
  background: rgba(80,220,255,0.15);
  color: #fff;
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 36px;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.btn-primary:hover { box-shadow: 0 0 14px rgba(80,220,255,0.5); filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { box-shadow: 0 0 14px rgba(255,23,68,0.5); }
.btn-success { background: var(--secondary); color: var(--bg); border-color: var(--secondary); }
.btn-success:hover { box-shadow: 0 0 14px rgba(118,255,3,0.5); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(80,220,255,0.08); box-shadow: 0 0 10px rgba(80,220,255,0.2); }
.btn-sm { padding: 5px 12px; font-size: 12px; min-height: 28px; }

/* --- Game Over Overlay --- */
#game-over { background: rgba(10,14,23,0.94); }
.gameover-container {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  width: 100%; max-width: 400px;
}
.game-over-title {
  font-size: 40px; font-weight: 900; text-align: center;
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255,23,68,0.5);
}
.game-over-title.victory {
  color: var(--secondary);
  text-shadow: 0 0 20px rgba(118,255,3,0.5);
}
.game-over-stats {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  padding: 16px; border: 1px solid var(--border-idle); border-radius: 8px;
  background: rgba(0,0,0,0.3);
}
.game-over-stats .stat-value { color: var(--primary); }

/* --- Multiplayer Lobby --- */
.lobby-container { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 14px; }
.lobby-title { font-size: 24px; font-weight: 900; color: var(--accent-lobby); text-align: center; letter-spacing: 2px; }
.lobby-connect { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lobby-actions-top { display: flex; gap: 8px; align-items: center; }
.lobby-players { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border-idle); border-radius: 8px; padding: 8px; background: rgba(0,0,0,0.3); }
.lobby-slot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 6px; background: rgba(80,220,255,0.03); }
.slot-label { font-size: 13px; font-weight: 600; color: var(--text); }
.slot-status { font-size: 12px; color: var(--secondary); font-weight: 500; }
.slot-status.empty { color: #666; }
.lobby-chat { display: flex; flex-direction: column; gap: 8px; }
.chat-log { border: 1px solid var(--border-idle); border-radius: 8px; padding: 8px; min-height: 80px; max-height: 120px; overflow-y: auto; background: rgba(0,0,0,0.3); font-size: 12px; color: #ccc; }
.chat-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border-idle); border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--text); font-size: 13px; outline: none; }
.chat-input:focus { border-color: var(--primary); }
.lobby-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.menu-input { padding: 8px 12px; border: 1px solid var(--border-idle); border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--text); font-size: 13px; outline: none; }
.menu-input:focus { border-color: var(--primary); }
.menu-input.small { width: 80px; }

/* Lobby Status */
.lobby-status { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; background: rgba(0,0,0,0.25); flex-wrap: wrap; }
.lobby-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lobby-status-dot.disconnected { background: #888; }
.lobby-status-dot.connecting { background: #f0ad4e; animation: pulse-dot 1s infinite; }
.lobby-status-dot.connected { background: #5cb85c; box-shadow: 0 0 6px rgba(92,184,92,0.5); }
.lobby-status-text { font-size: 13px; color: var(--text); font-weight: 500; }
.lobby-ping { font-size: 12px; color: var(--secondary); margin-left: auto; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Lobby Browser */
.lobby-browser { display: flex; flex-direction: column; gap: 8px; }
.lobby-browser-header { display: flex; align-items: center; justify-content: space-between; }
.lobby-browser-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 1px; }
.lobby-list { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border-idle); border-radius: 8px; padding: 8px; background: rgba(0,0,0,0.3); min-height: 60px; max-height: 160px; overflow-y: auto; }
.lobby-list-empty { font-size: 12px; color: #666; text-align: center; padding: 12px; }
.lobby-list-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 6px; background: rgba(80,220,255,0.03); cursor: pointer; transition: background 0.15s; }
.lobby-list-item:hover { background: rgba(80,220,255,0.08); }
.lobby-list-item.selected { background: rgba(80,180,255,0.15); border: 1px solid var(--accent-lobby); }
.lobby-list-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.lobby-list-item-info { font-size: 12px; color: var(--secondary); }
.lobby-list-item-status { font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.lobby-list-item-status.open { background: rgba(92,184,92,0.2); color: #5cb85c; }
.lobby-list-item-status.ingame { background: rgba(240,173,78,0.2); color: #f0ad4e; }

/* Lobby Room */
.lobby-room { display: flex; flex-direction: column; gap: 8px; }
.lobby-room-header { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.lobby-room-name { font-size: 16px; font-weight: 700; color: var(--accent-lobby); }
.lobby-room-id { font-size: 11px; color: #666; }
.lobby-footer { display: flex; justify-content: center; margin-top: 4px; }

/* --- MP HUD (in-game overlay) --- */
#mp-hud {
  position: fixed;
  top: calc(var(--topbar-h) + 4px);
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(14,20,34,0.85);
  border: 1px solid var(--border-idle);
  border-radius: 8px;
  z-index: 80;
}
.mp-player-list { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }

/* --- Net Stats Overlay --- */
#net-stats {
  position: fixed;
  bottom: calc(var(--buildpanel-h) + 4px);
  right: 10px;
  padding: 6px 10px;
  background: rgba(14,20,34,0.8);
  border: 1px solid var(--border-idle);
  border-radius: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  z-index: 80;
}
.net-stats-content { display: flex; gap: 10px; }

/* --- Card Draft --- */
.card-draft-container {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  width: 100%; max-width: 600px;
}
.card-draft-title {
  font-size: 28px; font-weight: 900;
  color: var(--gold);
  letter-spacing: 2px;
}
.card-draft-slots {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.draft-card {
  width: 140px; min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border-idle);
  border-radius: 10px;
  background: rgba(18,26,40,0.95);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.draft-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255,217,92,0.3);
  transform: translateY(-4px);
}
.draft-card-title { font-size: 14px; font-weight: 700; color: var(--text); text-align: center; }
.draft-card-desc { font-size: 11px; color: var(--text-muted); text-align: center; }

/* --- Skill Tree --- */
.skill-tree-container {
  width: 100%; max-width: 700px;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.skill-tree-title { font-size: 28px; font-weight: 900; color: var(--accent-skills); letter-spacing: 2px; }
.skill-branches { display: flex; gap: 8px; }
.skill-branch-btn {
  padding: 8px 16px; border: 1px solid var(--border-idle); border-radius: 6px;
  background: rgba(20,26,38,0.85); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.skill-branch-btn.active { background: rgba(160,120,255,0.15); border-color: var(--accent-skills); color: #fff; }
.skill-tree-nodes {
  width: 100%; min-height: 200px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px; padding: 12px;
  border: 1px solid var(--border-idle); border-radius: 8px; background: rgba(0,0,0,0.2);
}
.skill-node {
  padding: 10px; border: 1px solid var(--border-idle); border-radius: 8px;
  background: rgba(18,26,40,0.9); text-align: center; cursor: pointer;
  transition: all 0.15s ease;
}
.skill-node:hover { border-color: var(--accent-skills); }
.skill-node.unlocked { border-color: var(--accent-skills); background: rgba(160,120,255,0.1); }
.skill-node-name { font-size: 11px; font-weight: 600; color: var(--text); }
.skill-tree-footer { display: flex; gap: 12px; align-items: center; }

/* --- Tutorial Overlay --- */
.tutorial-container {
  max-width: 400px; padding: 24px;
  background: var(--panel-bg); border: 1px solid var(--primary);
  border-radius: 12px; text-align: center;
  display: flex; flex-direction: column; gap: 16px;
}
.tutorial-heading { font-size: 20px; font-weight: 700; color: var(--primary); }
.tutorial-text { font-size: 14px; color: var(--text); line-height: 1.5; }
.tutorial-nav { display: flex; gap: 10px; justify-content: center; }

/* --- Leaderboard --- */
.leaderboard-container {
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.leaderboard-title { font-size: 24px; font-weight: 900; color: var(--accent-gold); letter-spacing: 2px; }
.leaderboard-list {
  width: 100%; max-height: 400px; overflow-y: auto;
  border: 1px solid var(--border-idle); border-radius: 8px; background: rgba(0,0,0,0.3);
}
.leaderboard-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid rgba(60,80,110,0.3);
}
.leaderboard-row:last-child { border-bottom: none; }

/* --- Pause Overlay --- */
#pause-overlay { background: rgba(0,0,0,0.6); z-index: 900; }

/* --- Toast --- */
.toast {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%; transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(14,20,34,0.95);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  z-index: 500;
  animation: fadeIn 0.3s ease;
}

/* --- Animations --- */
@keyframes slideInTop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInBottom {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes glow {
  from { text-shadow: 0 0 20px rgba(160,120,255,0.5), 0 0 40px rgba(160,120,255,0.2); }
  to { text-shadow: 0 0 30px rgba(160,120,255,0.7), 0 0 60px rgba(160,120,255,0.4), 0 0 100px rgba(160,120,255,0.15); }
}
@keyframes pulseGold {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-idle); border-radius: 2px; }

/* --- Responsive: Desktop (>1024px) --- */
@media (min-width: 1024px) {
  #ability-bar {
    position: fixed;
    bottom: auto; left: 12px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
  }
  .game-title { font-size: 64px; }
}

/* --- Responsive: Tablet (768px - 1024px) --- */
@media (max-width: 1023px) and (min-width: 768px) {
  .game-title { font-size: 48px; }
  .tower-card { min-width: 80px; width: 90px; }
}

/* --- Responsive: Mobile (<768px) --- */
@media (max-width: 767px) {
  #top-bar { padding: 0 8px; gap: 4px; }
  .hud-value { font-size: 14px; }
  .game-title { font-size: 32px; }
  .game-over-title { font-size: 28px; }
  .menu-btn { padding: 12px 18px; font-size: 13px; min-width: 100px; }

  #tower-info {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; height: 55vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  #tower-info:not(.hidden) { transform: translateY(0); }

  .tower-card { min-width: 72px; width: 80px; height: 62px; }
  .ability-btn { width: 44px; height: 44px; }
  .lobby-connect { flex-direction: column; }
  .target-btn { min-width: 40px; font-size: 10px; }
  .pill { padding: 5px 10px; font-size: 12px; }
  .menu-secondary-buttons { flex-direction: column; align-items: stretch; }
}

/* --- Disabled state --- */
.disabled, [disabled] {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* --- Card Draft Enhancements --- */
.draft-card-rarity {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.draft-card-icon {
  font-size: 32px;
  line-height: 1;
  margin: 8px 0;
}
.draft-card.selected {
  transform: scale(1.08) translateY(-8px);
  box-shadow: 0 0 24px rgba(255,217,92,0.6);
}

/* --- Skill Node Enhancements --- */
.skill-node.available { border-color: rgba(160,120,255,0.6); cursor: pointer; }
.skill-node.available:hover { background: rgba(160,120,255,0.1); transform: translateY(-2px); }
.skill-node.maxed { border-color: var(--gold); opacity: 0.8; }
.skill-node-dots { display: flex; gap: 4px; justify-content: center; margin: 6px 0; }
.rank-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(120,130,150,0.5); }
.rank-dot.filled { border-color: transparent; }
.skill-node-desc { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.skill-node-rank { font-size: 10px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 4px; }

/* --- Tutorial Spotlight --- */
.tutorial-spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 1001;
  transition: all 0.3s ease;
}
.tutorial-container {
  position: relative;
  z-index: 1002;
}

/* --- Statistics Panel --- */
.stats-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.stats-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-jade);
  letter-spacing: 2px;
}
.stats-list {
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border-idle);
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats-list .stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(60,80,110,0.2);
}
.stats-list .stats-row:last-child { border-bottom: none; }
.stats-list .stat-label { font-size: 13px; color: var(--text); }
.stats-list .stat-value { font-family: var(--font-mono); font-size: 14px; color: var(--primary); font-weight: 600; }
