/* ============================================
   SURVIVOR.IO — Complete Stylesheet
   ============================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Orbitron:wght@700;900&display=swap');

:root {
  --cyan:     #00e5ff;
  --cyan-dim: #0099bb;
  --green:    #00ff88;
  --gold:     #ffd700;
  --red:      #ff2244;
  --orange:   #ff6600;
  --purple:   #bb44ff;
  --bg-dark:  #080c18;
  --bg-panel: rgba(8, 18, 40, 0.88);
  --border:   rgba(0, 229, 255, 0.18);
  --text:     #d0eeff;
  --text-dim: #6888aa;
  --font-ui:  'Rajdhani', 'Segoe UI', sans-serif;
  --font-hud: 'Orbitron', 'Courier New', monospace;
}

/* ---- AUTH OVERLAY ---- */
#authOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

#authPanel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 40px 40px;
  width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 0 60px rgba(0,229,255,0.08);
}

#authLogo {
  font-family: var(--font-hud);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0,229,255,0.6);
  margin-bottom: 4px;
}

#authSubtitle {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 36px;
}

#authForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#authForm input {
  width: 100%;
  background: rgba(0,229,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#authForm input:focus {
  border-color: rgba(0,229,255,0.5);
}

#authForm input::placeholder {
  color: var(--text-dim);
}

#authError {
  display: none;
  color: var(--red);
  font-size: 0.82rem;
  text-align: center;
  min-height: 18px;
}

#authForm button {
  margin-top: 4px;
  width: 100%;
  padding: 13px;
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: var(--cyan);
  font-family: var(--font-hud);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

#authForm button:hover {
  background: var(--cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(0,229,255,0.4);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ============================================
   CANVAS
   ============================================ */
#gameCanvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ============================================
   HUD OVERLAY
   ============================================ */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: none;
}

#hud.active {
  display: block;
}

/* ---- TOP BAR ---- */
.hud-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 16px 0;
  gap: 12px;
}

/* ---- PLAYER INFO (left) ---- */
.player-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  max-width: 260px;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.level-num {
  font-size: 15px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
  transition: transform 0.15s, color 0.15s;
}

.level-num.pop {
  transform: scale(1.5);
  color: #fff;
}

/* Bars */
.bar-container {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: visible;
}

.bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 8px;
  transition: width 0.15s ease-out;
}

.bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  color: #fff;
  z-index: 1;
}

/* HP bar — color set dynamically via JS (hpPct → green/yellow/red) */
.hp-bar .bar-fill {
  background: linear-gradient(90deg, #22cc66, #00ff88);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* XP bar (small, inline) */
.xp-bar {
  height: 6px;
  width: 180px;
}

.xp-bar .bar-fill {
  background: linear-gradient(90deg, #0077cc, #00e5ff);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
}

/* ---- TIMER (center) ---- */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  min-width: 130px;
  backdrop-filter: blur(8px);
}

.timer-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-ui);
}

.timer-display {
  font-family: var(--font-hud);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px rgba(0,229,255,0.4);
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Urgent pulse when < 60s */
.timer-display.urgent {
  color: var(--red);
  text-shadow: 0 0 14px rgba(255, 34, 68, 0.7);
  animation: urgentPulse 0.8s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ---- STATS (right) ---- */
.game-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  backdrop-filter: blur(8px);
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-dim);
}

.stat-icon {
  font-size: 14px;
  line-height: 1;
}

.stat-value {
  color: #fff;
  font-weight: 700;
  font-family: var(--font-hud);
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
}

/* ---- WEAPON SLOTS (bottom-left) ---- */
.weapon-slots {
  position: absolute;
  bottom: 44px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.passive-slots {
  position: absolute;
  bottom: 44px;
  left: 70px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weapon-slot,
.passive-slot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.weapon-slot.active {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
  background: rgba(0, 30, 60, 0.7);
}

.weapon-slot.evolved {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35), inset 0 0 6px rgba(255, 215, 0, 0.08);
  animation: evolvedPulse 2s ease-in-out infinite;
}

.skill-slot-manual {
  width: 84px;
  height: 54px;
  padding: 5px 7px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.skill-slot-manual.ready {
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.24);
}

.skill-slot-manual.cooldown {
  border-color: rgba(255,255,255,0.12);
  background: rgba(14, 16, 24, 0.82);
  box-shadow: none;
}

.skill-slot-primary {
  border-color: rgba(0, 229, 255, 0.45);
  background: linear-gradient(180deg, rgba(0, 34, 58, 0.92), rgba(0, 18, 34, 0.92));
}

.skill-slot-utility {
  border-color: rgba(255, 120, 70, 0.45);
  background: linear-gradient(180deg, rgba(58, 24, 0, 0.92), rgba(34, 14, 0, 0.92));
}

.skill-slot-support {
  border-color: rgba(180, 180, 255, 0.28);
  background: linear-gradient(180deg, rgba(24, 26, 50, 0.9), rgba(12, 14, 30, 0.92));
}

.weapon-slot-hotkey {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.72);
  line-height: 1;
}

.weapon-slot-label {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  line-height: 1.05;
}

.weapon-slot-state {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(190, 220, 235, 0.82);
  text-transform: uppercase;
  line-height: 1;
}

@keyframes evolvedPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.3); }
  50%       { box-shadow: 0 0 20px rgba(255,215,0,0.6); }
}

.weapon-level,
.passive-level {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  font-family: var(--font-hud);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  line-height: 1;
}

/* ---- BOTTOM XP BAR ---- */
.xp-bar-bottom {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(0, 229, 255, 0.08);
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #0055bb 0%, #00e5ff 100%);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  transition: width 0.2s ease-out;
  position: relative;
}

.xp-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 6px;
  height: 100%;
  background: rgba(255,255,255,0.7);
  border-radius: 3px;
  filter: blur(2px);
}

/* ============================================
   SCREEN OVERLAYS
   ============================================ */
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 20, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.screen-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================
   START SCREEN
   ============================================ */
#startScreen {
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 18px 44px;
}

.start-title {
  font-family: var(--font-hud);
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow:
    0 0 20px var(--cyan),
    0 0 60px rgba(0, 229, 255, 0.4),
    0 4px 0 rgba(0, 100, 150, 0.6);
  animation: titleGlow 3s ease-in-out infinite;
  margin-bottom: 6px;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px var(--cyan), 0 0 60px rgba(0,229,255,0.4), 0 4px 0 rgba(0,100,150,0.6); }
  50%       { text-shadow: 0 0 30px var(--cyan), 0 0 80px rgba(0,229,255,0.6), 0 4px 0 rgba(0,100,150,0.6); }
}

.start-subtitle {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.start-btn {
  padding: 16px 56px;
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #000;
  background: linear-gradient(135deg, #00e5ff 0%, #0099cc 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(0, 229, 255, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
  margin-bottom: 36px;
}

.start-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.25);
  transform: skewX(-20deg);
  animation: btnShine 2.5s ease-in-out infinite;
}

@keyframes btnShine {
  0%   { left: -60%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

.start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 30px rgba(0,229,255,0.7), 0 6px 20px rgba(0,0,0,0.4);
}

.start-btn:active {
  transform: translateY(1px) scale(0.98);
}

.start-btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.start-btn-group .start-btn {
  margin-bottom: 0;
}

.start-btn-endless {
  background: linear-gradient(135deg, #8800cc 0%, #440088 100%);
  box-shadow: 0 0 20px rgba(136, 0, 200, 0.5), 0 4px 12px rgba(0,0,0,0.4);
}

.start-btn-endless:hover {
  box-shadow: 0 0 30px rgba(136, 0, 200, 0.7), 0 6px 20px rgba(0,0,0,0.4);
}

/* ---- CHARACTER CUSTOMIZATION ---- */
.skin-summary-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 420px);
  align-items: stretch;
  gap: 22px;
  margin-bottom: 24px;
  width: min(100%, 760px);
}

.customization-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
  background:
    radial-gradient(circle at top left, rgba(0, 229, 255, 0.11), transparent 38%),
    linear-gradient(180deg, rgba(11, 19, 40, 0.96), rgba(7, 12, 28, 0.94));
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 18px;
  padding: 18px 20px;
}

.custom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.custom-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.custom-section-headwear {
  grid-column: 1 / -1;
}

.custom-label {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.color-swatch:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.color-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
  transform: scale(1.08);
}

.finish-options,
.eye-options,
.aura-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.finish-options,
.eye-options,
.aura-options,
.hat-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.hat-options {
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
}

.cosmetic-option-btn,
.hat-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 128px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%),
    rgba(255,255,255,0.04);
  color: #dbe8ff;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
}

.cosmetic-option-btn:hover,
.hat-btn:hover {
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 20px rgba(0,0,0,0.18);
}

.cosmetic-option-btn.selected,
.hat-btn.selected {
  border-color: var(--cyan);
  color: var(--cyan);
  background:
    radial-gradient(circle at top, rgba(0, 229, 255, 0.14), transparent 58%),
    rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.24), 0 16px 24px rgba(0,229,255,0.08);
}

.cosmetic-option-canvas {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(5, 9, 20, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
}

.cosmetic-option-title {
  font-family: var(--font-hud);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

.cosmetic-option-subtitle {
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-dim);
}

.preview-canvas {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.28);
  background: radial-gradient(circle at top, rgba(24, 54, 96, 0.9), rgba(4, 8, 22, 0.96));
}

.preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0,229,255,0.14);
  background:
    radial-gradient(circle at top, rgba(0,229,255,0.12), transparent 42%),
    rgba(255,255,255,0.04);
}

.preview-meta {
  min-height: 40px;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  color: #c5d6f7;
}

.preview-card-compact {
  min-height: 100%;
}

.skin-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(0,229,255,0.14);
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.12), transparent 45%),
    rgba(255,255,255,0.04);
}

.skin-summary-title {
  font-family: var(--font-hud);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #fff;
}

.skin-summary-text {
  font-size: 13px;
  line-height: 1.5;
  color: #bdd1f0;
}

.skin-open-btn {
  margin-top: 4px;
  align-self: flex-start;
  padding: 10px 16px;
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(0,129,184,0.2));
  color: #e7fbff;
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.skin-open-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0,229,255,0.56);
  box-shadow: 0 12px 20px rgba(0,0,0,0.18);
}

.skin-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 20, 0.74);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.skin-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.skin-menu-shell {
  width: min(1120px, 100%);
  max-height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 22px;
  border: 1px solid rgba(0,229,255,0.16);
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.12), transparent 30%),
    linear-gradient(180deg, rgba(10, 18, 38, 0.98), rgba(5, 10, 24, 0.98));
  box-shadow: 0 24px 50px rgba(0,0,0,0.35);
  overflow: hidden;
}

.skin-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.skin-menu-title {
  margin-top: 4px;
  font-family: var(--font-hud);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #fff;
}

.skin-menu-close {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #dce9ff;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.skin-menu-close:hover {
  border-color: rgba(0,229,255,0.42);
  background: rgba(0,229,255,0.08);
  color: #fff;
}

.skin-menu-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.skin-menu-preview {
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.preview-card-studio {
  width: 100%;
}

.preview-canvas-large {
  width: 156px;
  height: 156px;
}

.skin-menu-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.customization-panel-studio {
  width: 100%;
}

.shop-note-studio {
  margin: 14px 0 0;
}

/* ---- DIFFICULTY SELECTOR ---- */
.diff-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.diff-btn {
  padding: 8px 16px;
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  color: #888;
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.diff-btn:hover {
  border-color: rgba(255,255,255,0.4);
  color: #ccc;
}

.diff-btn[data-diff="easy"].selected {
  border-color: #00ff88;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
}

.diff-btn[data-diff="normal"].selected {
  border-color: #00e5ff;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

.diff-btn[data-diff="hard"].selected {
  border-color: #ff9900;
  color: #ff9900;
  background: rgba(255, 153, 0, 0.08);
}

.diff-btn[data-diff="nightmare"].selected {
  border-color: #ff2244;
  color: #ff2244;
  background: rgba(255, 34, 68, 0.08);
}

.start-controls {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 2;
  color: var(--text-dim);
  text-align: center;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--font-hud);
  font-size: 12px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  color: var(--cyan);
  margin: 0 2px;
}

/* ============================================
   LEVEL UP SCREEN
   ============================================ */
.levelup-title {
  font-family: var(--font-hud);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 20px var(--gold), 0 0 50px rgba(255, 215, 0, 0.5);
  animation: levelupPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  margin-bottom: 6px;
}

@keyframes levelupPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.levelup-subtitle {
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* ---- SKILL CARDS GRID ---- */
.skill-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 16px;
  max-width: 900px;
}

.skill-card {
  position: relative;
  width: clamp(160px, 22vw, 210px);
  padding: 22px 18px 18px;
  border-radius: 14px;
  background: rgba(8, 16, 38, 0.94);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  animation: cardSlideIn 0.3s ease forwards;
  opacity: 0;
}

.skill-card:nth-child(1) { animation-delay: 0.05s; }
.skill-card:nth-child(2) { animation-delay: 0.12s; }
.skill-card:nth-child(3) { animation-delay: 0.19s; }

@keyframes cardSlideIn {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

/* Card type colors */
.weapon-card {
  border-color: rgba(0, 229, 255, 0.25);
  background: rgba(0, 20, 50, 0.94);
}

.weapon-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25), 0 8px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px) scale(1.02);
}

.passive-card {
  border-color: rgba(0, 255, 136, 0.2);
  background: rgba(0, 20, 15, 0.94);
}

.passive-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2), 0 8px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px) scale(1.02);
}

/* Evolution card — special gold style */
.evo-card {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(25, 18, 0, 0.96);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.15);
  animation: cardSlideIn 0.3s ease 0.02s forwards, evoGlow 2s ease-in-out infinite;
}

@keyframes evoGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(255,215,0,0.15); }
  50%       { box-shadow: 0 0 32px rgba(255,215,0,0.35); }
}

.evo-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(255,215,0,0.5), 0 8px 30px rgba(0,0,0,0.6);
  transform: translateY(-5px) scale(1.03);
}

/* Generic hover fallback */
.skill-card:not(.weapon-card):not(.passive-card):not(.evo-card):hover {
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 20px rgba(255,255,255,0.08), 0 8px 30px rgba(0,0,0,0.5);
  transform: translateY(-4px) scale(1.02);
}

.skill-card:active {
  transform: translateY(-1px) scale(0.99) !important;
}

.skill-icon {
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}
.skill-icon svg {
  display: block;
  filter: drop-shadow(0 0 5px currentColor);
}
.upgrade-icon-img {
  width: 52px;
  height: 52px;
  image-rendering: auto;
  display: block;
}
.weapon-slot .upgrade-icon-img,
.passive-slot .upgrade-icon-img {
  width: 30px;
  height: 30px;
}
.hero-stats .upgrade-icon-img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.skill-name {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.skill-desc {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---- Level pips ---- */
.skill-level-pips {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s, border-color 0.15s;
}

.weapon-card .pip.filled {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 5px var(--cyan);
}

.passive-card .pip.filled {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 5px var(--green);
}

.pip.filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 5px var(--gold);
}

/* ---- Level transition text ---- */
.skill-level-text {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-top: 2px;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.passive-card .skill-level-text {
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.skill-level-new {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  padding: 1px 6px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 3px;
  background: rgba(255, 215, 0, 0.08);
}

/* Weapon card: gold-orange left accent */
.weapon-card {
  border-left: 3px solid rgba(0, 229, 255, 0.5);
}

/* Passive card: green left accent */
.passive-card {
  border-left: 3px solid rgba(0, 255, 136, 0.5);
}

/* ---- Evolution badge ---- */
.evo-badge {
  font-family: var(--font-hud);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 2px 8px;
  background: linear-gradient(90deg, #aa7700, #ffd700, #aa7700);
  background-size: 200% auto;
  animation: shinyGold 2s linear infinite;
  border-radius: 3px;
  color: #000;
  margin-top: 4px;
}

@keyframes shinyGold {
  to { background-position: 200% center; }
}

/* ============================================
   GAME OVER / VICTORY SCREEN
   ============================================ */
.gameover-title {
  font-family: var(--font-hud);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  animation: gameoverDrop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes gameoverDrop {
  from { transform: translateY(-40px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.gameover-title.defeat {
  color: var(--red);
  text-shadow: 0 0 20px rgba(255, 34, 68, 0.7);
}

.gameover-title.victory {
  color: var(--gold);
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.3);
}

.gameover-subtitle {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

/* ---- Stats grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
  width: min(560px, 90vw);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-number {
  font-family: var(--font-hud);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

/* ---- Buttons ---- */
.restart-btn {
  padding: 15px 52px;
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #000;
  background: linear-gradient(135deg, #aaa 0%, #ddd 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.restart-btn.defeat {
  background: linear-gradient(135deg, var(--red), #ff6688);
  box-shadow: 0 0 18px rgba(255, 34, 68, 0.4), 0 4px 12px rgba(0,0,0,0.4);
}

.restart-btn.victory-btn {
  background: linear-gradient(135deg, #cc9900, var(--gold));
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.4), 0 4px 12px rgba(0,0,0,0.4);
}

.restart-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.restart-btn:active {
  transform: translateY(1px) scale(0.98);
}

.gameover-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.restart-btn-menu {
  background: linear-gradient(135deg, #1a2a40 0%, #2a3f5a 100%) !important;
  color: #a0c8ff !important;
  border: 1px solid rgba(100, 160, 255, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4) !important;
}

.restart-btn-menu:hover {
  background: linear-gradient(135deg, #223350 0%, #34507a 100%) !important;
}

.restart-btn-shop {
  background: linear-gradient(135deg, #1a3020 0%, #2a5a3a 100%) !important;
  color: #80ffb0 !important;
  border: 1px solid rgba(80, 220, 130, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4) !important;
}

.restart-btn-shop:hover {
  background: linear-gradient(135deg, #224030 0%, #347a50 100%) !important;
}

/* ============================================
   BOSS WARNING
   ============================================ */
#bossWarning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 90;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

#bossWarning.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.boss-warn-text {
  font-family: var(--font-hud);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900;
  color: var(--red);
  letter-spacing: 0.15em;
  text-shadow:
    0 0 20px rgba(255, 34, 68, 0.9),
    0 0 50px rgba(255, 34, 68, 0.5);
  animation: bossWarnFlash 0.3s ease-in-out infinite;
}

@keyframes bossWarnFlash {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.boss-warn-sub {
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,100,100,0.7);
  margin-top: 4px;
}

/* ============================================
   WAVE INDICATOR
   ============================================ */
.wave-indicator {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 80;
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255,215,0,0.6);
  padding: 8px 24px;
  background: rgba(30, 18, 0, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(4px);
}

.wave-indicator.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Special wave banner */
.special-wave-indicator {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 80;
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 10px 28px;
  background: rgba(10, 5, 25, 0.9);
  border: 1px solid rgba(255, 150, 0, 0.35);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  backdrop-filter: blur(6px);
  text-align: center;
}

.special-wave-indicator.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   DAMAGE NUMBERS
   ============================================ */
.damage-number {
  position: fixed;
  font-family: var(--font-hud);
  font-weight: 700;
  pointer-events: none;
  z-index: 70;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  animation: floatUp 0.8s ease forwards;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0%   { transform: translateY(0)    scale(1);    opacity: 1; }
  30%  { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-45px) scale(0.9); opacity: 0; }
}

.damage-number.crit {
  animation: critPop 0.9s ease forwards;
}

@keyframes critPop {
  0%   { transform: translateY(0)    scale(1.8); opacity: 1; }
  20%  { transform: translateY(-15px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-55px) scale(0.9); opacity: 0; }
}

/* ============================================
   COMBO DISPLAY
   ============================================ */
#comboDisplay {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  text-align: center;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  white-space: nowrap;
}

#comboDisplay.active  { opacity: 1; }
#comboDisplay.inactive { opacity: 0; }

.combo-kills {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-right: 6px;
}

.combo-mult {
  color: var(--gold);
  font-size: 22px;
  text-shadow: 0 0 10px rgba(255,215,0,0.7);
}

/* ============================================
   MOBILE JOYSTICK
   ============================================ */
.joystick-zone {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 45%;
  z-index: 5;
  touch-action: none;
}

/* ============================================
   PAUSE BUTTON & QUALITY TOGGLE (HUD)
   ============================================ */
.pause-btn,
.quality-btn {
  position: absolute;
  top: 10px;
  font-family: var(--font-hud);
  font-weight: 700;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 7px;
  background: var(--bg-panel);
  color: var(--cyan);
  cursor: pointer;
  pointer-events: all;
  backdrop-filter: blur(6px);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  z-index: 20;
  line-height: 1;
}

.pause-btn {
  right: 16px;
  font-size: 18px;
  padding: 6px 12px;
}

.quality-btn {
  right: 72px;
  font-size: 11px;
  padding: 7px 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-color: rgba(255,255,255,0.12);
}

.pause-btn:hover,
.quality-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--cyan);
  transform: scale(1.08);
}

.pause-btn:active { transform: scale(0.95); }

/* ============================================
   PAUSE OVERLAY
   ============================================ */
.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 20, 0.85);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pause-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.pause-title {
  font-family: var(--font-hud);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  margin-bottom: 40px;
}

.pause-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(300px, 80vw);
}

.pause-menu-btn {
  padding: 14px 24px;
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #000;
  background: linear-gradient(135deg, #00e5ff, #0099cc);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.4), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}

.pause-menu-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.6), 0 6px 18px rgba(0,0,0,0.5);
}

.pause-menu-btn:active { transform: scale(0.97); }

.pause-menu-btn-secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pause-menu-btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.1));
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

.pause-volume {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 44px));
}

.pause-volume .volume-row {
  justify-content: center;
}

.pause-volume-label {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(180, 200, 220, 0.7);
  min-width: 54px;
}

.volume-slider {
  width: 180px;
  accent-color: #00e5ff;
  cursor: pointer;
}

.menu-volume-panel .volume-slider {
  flex: 1;
  width: auto;
}

/* ============================================
   SCROLLBAR (hidden)
   ============================================ */
::-webkit-scrollbar { display: none; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 600px) {
  .hud-top {
    padding: 8px 10px 0;
    gap: 8px;
  }

  .player-info {
    min-width: 140px;
  }

  .bar-container {
    width: 140px;
  }

  .xp-bar { width: 140px; }

  .timer-display {
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-cards {
    gap: 10px;
  }

  .skill-card {
    width: clamp(130px, 40vw, 180px);
    padding: 16px 12px 14px;
  }

  .skill-icon { font-size: 28px; width: 44px; height: 44px; }
  .skill-icon svg { width: 36px; height: 36px; }
  .upgrade-icon-img { width: 40px; height: 40px; }
  .skill-name { font-size: 13px; }
  .skill-desc { font-size: 11px; }

  .weapon-slots { bottom: 50px; }
  .passive-slots { bottom: 50px; }
}

@media (max-width: 380px) {
  .hud-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .timer-container {
    align-self: center;
  }

  .game-stats {
    display: none;
  }
}

/* ============================================
   META / HERO / SHOP EXTENSIONS
   ============================================ */
.meta-topbar {
  display: flex;
  justify-content: center;
  margin: -6px 0 18px;
}

.gold-bank {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 205, 64, 0.35);
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.14), rgba(255, 137, 25, 0.12));
  color: #ffe89a;
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(255, 196, 0, 0.12);
}

.gold-value {
  font-size: 18px;
  color: #fff4c2;
}

.menu-volume-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: min(360px, calc(100vw - 44px));
  margin: -4px auto 18px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(5, 14, 32, 0.62);
}

.menu-volume-panel .volume-row {
  width: 100%;
}

.menu-volume-label,
.menu-volume-value,
.pause-volume-value {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(190, 218, 238, 0.78);
}

.menu-volume-label {
  min-width: 54px;
}

.menu-volume-value,
.pause-volume-value {
  min-width: 38px;
  text-align: right;
  color: #c9f5ff;
}

.section-title {
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-hud);
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--text-dim);
}

.hero-panel {
  width: min(100%, 1040px);
  margin: 0 auto 24px;
}

.hero-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hero-card {
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.16), transparent 55%),
    rgba(10, 18, 38, 0.86);
  color: #d8e5ff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,229,255,0.45);
  box-shadow: 0 16px 28px rgba(0,0,0,0.22);
}

.hero-card.selected {
  border-color: rgba(0,229,255,0.9);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.35), 0 18px 30px rgba(0,229,255,0.1);
}

.hero-card.locked {
  opacity: 0.86;
}

.hero-card.challenge {
  border-color: rgba(142, 114, 255, 0.45);
}

.hero-card.purchasable {
  border-color: rgba(255, 196, 0, 0.35);
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hero-icon {
  font-size: 22px;
}

.hero-name {
  font-family: var(--font-hud);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #fff;
}

.hero-desc {
  min-height: 42px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.hero-stats {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.45;
  color: #b8d0ff;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.hero-stats svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  flex-shrink: 0;
}

.hero-footer {
  margin-top: 12px;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #fff2a8;
  text-transform: uppercase;
}

.customization-panel {
  width: min(100%, 1040px);
}

.color-swatch {
  position: relative;
  overflow: hidden;
}

.color-swatch.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.34);
}

.shop-price {
  position: absolute;
  inset: auto 2px 2px 2px;
  z-index: 1;
  font-family: var(--font-hud);
  font-size: 8px;
  color: #fff;
}

.cosmetic-option-btn.locked,
.hat-btn.locked,
.trail-btn.locked {
  border-color: rgba(255, 196, 0, 0.24);
  color: #ffe29f;
  background: rgba(255, 186, 44, 0.08);
}

.shop-inline {
  margin-left: 6px;
  color: #ffe29f;
  font-size: 10px;
}

.trail-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 280px;
}

.trail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.trail-btn:hover {
  border-color: var(--cyan);
  color: #fff;
}

.trail-btn.selected {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
}

.trail-sample {
  position: relative;
  width: 24px;
  height: 10px;
  display: inline-block;
}

.trail-sample::before,
.trail-sample::after {
  content: "";
  position: absolute;
  top: 50%;
  border-radius: 999px;
  transform: translateY(-50%);
}

.trail-sample::before {
  left: 0;
  width: 22px;
  height: 6px;
  background: linear-gradient(90deg, var(--trail-accent), var(--trail-color));
  opacity: 0.95;
}

.trail-sample::after {
  right: -1px;
  width: 8px;
  height: 8px;
  background: var(--trail-color);
  box-shadow: 0 0 12px var(--trail-color);
}

.shop-note {
  margin: -8px auto 18px;
  max-width: 980px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.hud-status-strip {
  position: absolute;
  top: 78px;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  pointer-events: none;
}

.hud-chip {
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8, 14, 28, 0.8);
  backdrop-filter: blur(10px);
  text-align: center;
}

.hud-chip-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.hud-chip-value {
  color: #eef6ff;
  font-size: 13px;
}

.biome-transition-banner,
.escalation-banner,
.unlock-banner {
  position: fixed;
  left: 50%;
  top: 130px;
  transform: translateX(-50%) translateY(-14px);
  opacity: 0;
  z-index: 120;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.biome-transition-banner.active,
.escalation-banner.active,
.unlock-banner.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.biome-transition-banner,
.escalation-banner {
  min-width: min(460px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(4, 10, 22, 0.92);
  box-shadow: 0 18px 38px rgba(0,0,0,0.32);
  text-align: center;
}

.banner-kicker {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.banner-title {
  margin-top: 6px;
  color: #fff;
  font-family: var(--font-hud);
  font-size: 22px;
  letter-spacing: 0.06em;
}

.banner-desc {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 12px;
}

.escalation-banner {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 18px 38px rgba(0,0,0,0.34);
}

.unlock-banner {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 196, 0, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: #fff3c9;
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .hero-selection {
    grid-template-columns: 1fr;
  }

  .hud-chip {
    min-width: 0;
    width: calc(50% - 5px);
  }

  .gold-bank {
    font-size: 11px;
  }
}

/* ===== V2 HUD / SUPER OVERRIDES ===== */
#hud .hud-top {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr minmax(160px, 210px);
  align-items: start;
  gap: 16px;
  padding-top: 10px;
  pointer-events: none;
}

#hud .player-info,
#hud .top-center-stack,
#hud .hud-right-stack {
  min-width: 0;
}

#hud .player-info {
  pointer-events: auto;
}

#hud .top-center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

#hud .timer-container {
  padding-top: 4px;
}

#hud .hud-right-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

#hud .top-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  pointer-events: auto;
}

#hud .top-controls .hud-control-btn,
#hud .top-controls .pause-btn,
#hud .top-controls .quality-btn {
  position: static;
  inset: auto;
  min-width: 94px;
  height: 42px;
  margin: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  white-space: nowrap;
}

#hud .game-stats {
  position: static;
  width: auto;
  min-width: 0;
}

#hud .game-stats .stat-row {
  justify-content: flex-end;
}

#hud .hud-chip.inactive {
  display: none;
}

.super-meter {
  position: relative;
  width: min(440px, 92vw);
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(5, 12, 24, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.super-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,229,255,0.16), rgba(0,229,255,0.75));
  transition: width 0.14s ease;
}

.super-meter.ready {
  border-color: rgba(255, 214, 77, 0.55);
  box-shadow: 0 0 0 1px rgba(255,214,77,0.14), 0 0 18px rgba(255,214,77,0.14);
}

.super-meter.ready .super-meter-fill {
  background: linear-gradient(90deg, rgba(255,186,44,0.35), rgba(255,230,90,0.95));
}

.super-meter-label {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #f3fbff;
  text-transform: uppercase;
  text-align: center;
}

.chaos-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: min(440px, 92vw);
}

.chaos-event-chip {
  --status-accent: #ffd166;
}

.chaos-event-chip.inactive {
  display: none;
}

.surge-meter {
  --status-accent: #ffd166;
}

.surge-meter:not(.active) {
  display: none;
}

.surge-meter.active {
  display: grid;
}

.surge-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--status-fill-from), var(--status-fill-to));
  transition: width 0.16s ease;
}

@keyframes frenzy-pulse {
  0%, 100% {
    border-color: var(--status-accent-soft);
    box-shadow: 0 12px 28px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.03);
  }
  50% {
    border-color: var(--status-accent);
    box-shadow: 0 0 0 1px var(--status-accent-soft), 0 0 22px var(--status-accent-glow), 0 12px 28px rgba(0,0,0,0.24);
  }
}

.surge-meter.frenzy {
  animation: frenzy-pulse 0.5s ease-in-out infinite;
}

.surge-meter.frenzy .surge-meter-fill {
  filter: saturate(1.12) brightness(1.05);
}

.surge-meter-label {
  color: #fff5d8;
  text-shadow: 0 0 8px var(--status-accent-glow);
}

.buff-strip {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  align-items: stretch;
}

.buff-strip.inactive {
  display: none;
}

.buff-pill {
  display: grid;
  align-items: center;
  gap: 10px;
}

.buff-pill-icon {
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px var(--status-accent-glow));
}

.buff-pill-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.buff-pill-label {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #eef7ff;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buff-pill-time {
  color: rgba(228, 239, 255, 0.82);
}

/* ---- SUPER BAR (inside left panel) ---- */
.super-bar-btn {
  position: relative;
  width: 100%;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,0.22);
  background: linear-gradient(135deg, rgba(8, 16, 30, 0.94), rgba(6, 12, 24, 0.86));
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  box-shadow: 0 12px 28px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.super-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,229,255,0.18), rgba(0,229,255,0.84));
  transition: width 0.14s ease;
}

.super-bar-label {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #dff8ff;
  white-space: nowrap;
  gap: 7px;
}

@keyframes super-pulse {
  0%, 100% { border-color: rgba(255,214,77,0.7); box-shadow: 0 0 10px rgba(255,214,77,0.3); }
  50%       { border-color: rgba(255,214,77,1.0); box-shadow: 0 0 22px rgba(255,214,77,0.65); }
}

.super-bar-btn.ready {
  animation: super-pulse 0.6s ease-in-out infinite;
}

.super-bar-btn.ready .super-bar-fill {
  background: linear-gradient(90deg, rgba(255,186,44,0.35), rgba(255,230,90,0.95));
}

.super-bar-btn.cooldown {
  opacity: 0.55;
}

/* ---- BIOME ROW ---- */
.hud-status-card {
  --status-accent: #7fe8ff;
  --status-accent-soft: rgba(127, 232, 255, 0.22);
  --status-accent-glow: rgba(127, 232, 255, 0.14);
  --status-fill-from: rgba(127, 232, 255, 0.18);
  --status-fill-to: rgba(127, 232, 255, 0.88);
  position: relative;
  width: 100%;
  min-height: 38px;
  padding: 0 12px 0 10px;
  border-radius: 14px;
  border: 1px solid var(--status-accent-soft);
  background: linear-gradient(135deg, rgba(8, 16, 30, 0.94), rgba(6, 12, 24, 0.86));
  box-shadow: 0 12px 28px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.03);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hud-status-tag,
.hud-status-main,
.hud-status-meta {
  position: relative;
  z-index: 1;
}

.hud-status-tag {
  min-width: 58px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--status-accent-soft);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), var(--status-fill-from));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f2fbff;
  white-space: nowrap;
}

.hud-status-main {
  min-width: 0;
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #eef8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-status-meta {
  font-family: var(--font-hud);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(228, 239, 255, 0.82);
  white-space: nowrap;
}

.biome-row {
  --status-accent: #7fe8ff;
}

.biome-row-icon {
  color: rgba(208, 240, 255, 0.92);
}

/* ---- PLAYER-INFO INLINE CHIP ---- */
.pi-chip {
  --status-accent: #ffd166;
}

.pi-chip.inactive {
  display: none;
}

.chaos-event-banner {
  position: fixed;
  left: 50%;
  top: 208px;
  transform: translateX(-50%) translateY(-16px);
  opacity: 0;
  z-index: 118;
  width: min(520px, 92vw);
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(7, 12, 28, 0.93);
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.chaos-event-banner.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chaos-event-banner .banner-kicker {
  font-size: 10px;
}

.chaos-event-banner .banner-title {
  font-family: var(--font-hud);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: #fff;
}

.chaos-event-banner .banner-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
}

/* (super-btn states now handled via .super-bar-btn — see above) */

.biome-transition-banner,
.escalation-banner,
.unlock-banner {
  top: 164px;
  width: min(560px, 92vw);
}

#bossWarning {
  top: 244px !important;
}

.wave-indicator,
.special-wave-indicator {
  top: 330px !important;
}

@media (max-width: 980px) {
  .skin-summary-panel,
  .customization-panel {
    grid-template-columns: 1fr;
  }

  .preview-card {
    order: -1;
  }

  .skin-summary-card {
    align-items: center;
    text-align: center;
  }

  .skin-open-btn {
    align-self: center;
  }

  .skin-menu-layout {
    grid-template-columns: 1fr;
  }

  .skin-menu-preview {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  #hud .hud-top {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #hud .player-info,
  #hud .hud-right-stack {
    width: 100%;
  }

  #hud .hud-right-stack {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #hud .hud-status-strip {
    width: min(520px, 92vw);
    flex-wrap: wrap;
  }

  .chaos-stack {
    width: min(520px, 92vw);
  }

  .biome-transition-banner,
  .escalation-banner,
  .unlock-banner,
  .chaos-event-banner {
    top: 210px;
  }

  #bossWarning {
    top: 290px !important;
  }

  .wave-indicator,
  .special-wave-indicator {
    top: 370px !important;
  }
}

@media (max-width: 720px) {
  #startScreen {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .skin-summary-panel {
    grid-template-columns: 1fr;
    width: min(100%, 420px);
  }

  .skin-menu-overlay {
    padding: 10px;
  }

  .skin-menu-shell {
    max-height: 92vh;
  }

  .skin-menu-header {
    padding: 14px 14px 12px;
  }

  .skin-menu-scroll,
  .skin-menu-preview {
    padding: 12px;
  }

  .hat-options,
  .finish-options,
  .eye-options,
  .aura-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-canvas {
    width: 112px;
    height: 112px;
  }

  #hud .hud-top {
    gap: 8px;
  }

  #hud .hud-right-stack {
    flex-direction: column;
    align-items: stretch;
  }

  #hud .top-controls {
    width: 100%;
    justify-content: center;
  }

  #hud .top-controls .hud-control-btn,
  #hud .top-controls .pause-btn,
  #hud .top-controls .quality-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  #hud .hud-status-strip {
    gap: 8px;
  }

  #hud .hud-chip {
    flex: 1 1 calc(50% - 4px);
  }

  .super-meter {
    width: min(92vw, 420px);
  }

  .chaos-stack {
    width: min(92vw, 420px);
  }

  .biome-transition-banner,
  .escalation-banner,
  .unlock-banner,
  .chaos-event-banner {
    top: 236px;
  }

  #bossWarning {
    top: 316px !important;
  }

  .wave-indicator,
  .special-wave-indicator {
    top: 392px !important;
  }
}

/* ============================================
   GAMEPLAY UPDATE — New CSS
   ============================================ */

/* ---- Kill Streak Notification ---- */
.streak-notification {
  position: fixed;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 26px;
  font-weight: 900;
  color: #ff8800;
  text-shadow: 0 0 20px #ff880088;
  pointer-events: none;
  z-index: 210;
  opacity: 0;
  transition: opacity 0.18s, transform 0.22s;
  white-space: nowrap;
}
.streak-notification.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.streak-num { color: #ffdd00; margin-right: 6px; }
.streak-label { color: #ff8800; }

/* ---- Level-Up Reroll / Skip ---- */
.levelup-action-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  padding: 0 12px 4px;
}

.levelup-action-btn {
  background: rgba(8, 18, 40, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  color: #c8d8e8;
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.levelup-action-btn:hover:not(.disabled) {
  background: rgba(0, 229, 255, 0.10);
  border-color: rgba(0, 229, 255, 0.5);
}
.levelup-action-btn.disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.reroll-btn .action-cost {
  color: #ffd700;
  margin-left: 5px;
}
.skip-btn .action-hint {
  color: rgba(0, 229, 255, 0.7);
  font-size: 10px;
  margin-left: 5px;
}

/* ---- Post-Run Summary Grid ---- */
.stats-divider {
  text-align: center;
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(180, 200, 220, 0.5);
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 14px;
}

.summary-grid .stat-number {
  font-size: 17px !important;
}

.mastery-recap {
  width: min(760px, calc(100% - 24px));
  margin: 10px auto 14px;
  padding: 10px 12px;
  border: 1px solid rgba(140, 180, 220, 0.18);
  border-radius: 8px;
  background: rgba(8, 14, 26, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.mastery-recap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mastery-recap-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.mastery-recap-kicker,
.mastery-card-label {
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(180, 220, 255, 0.58);
}

.mastery-recap-title {
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8f7ff;
}

.mastery-medal,
.mastery-mode-pill {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mastery-medal-none,
.mastery-mode-pill {
  color: rgba(210, 225, 240, 0.72);
  background: rgba(255, 255, 255, 0.06);
}

.mastery-medal-bronze {
  color: #ffb37a;
  border-color: rgba(255, 150, 80, 0.34);
  background: rgba(255, 120, 50, 0.12);
}

.mastery-medal-silver {
  color: #dce7ff;
  border-color: rgba(190, 210, 255, 0.36);
  background: rgba(160, 190, 255, 0.12);
}

.mastery-medal-gold {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.38);
  background: rgba(255, 215, 0, 0.13);
}

.mastery-medal-mastery {
  color: #8fffea;
  border-color: rgba(80, 255, 220, 0.44);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(120, 80, 255, 0.18));
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.14);
}

.mastery-recap-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.mastery-compact-item {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.mastery-compact-item strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mastery-compact-item em {
  display: block;
  margin-top: 3px;
  color: rgba(215, 232, 245, 0.76);
  font-style: normal;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mastery-next-bar {
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mastery-next-bar > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b4ff, #00e5ff);
}

.mastery-recap-compact {
  max-width: 620px;
  margin: 10px auto;
}

.mastery-recap-compact .mastery-recap-strip {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 760px) {
  .mastery-recap-strip {
    grid-template-columns: 1fr;
  }

  .mastery-recap-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .mastery-medal,
  .mastery-mode-pill {
    width: 100%;
  }
}

/* ---- Challenge Panel ---- */
.challenge-panel-wrapper {
  width: 100%;
  max-width: 760px;
  margin: 10px auto 0;
}

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  padding: 4px 0 8px;
}

.challenge-card {
  background: rgba(5, 12, 24, 0.82);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.challenge-card.done {
  border-color: rgba(80, 255, 140, 0.45);
  background: rgba(10, 40, 20, 0.70);
}

.challenge-card-title {
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e0f0ff;
}

.challenge-card-desc {
  font-size: 10px;
  color: rgba(180, 200, 220, 0.7);
}

.challenge-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}

.challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b4ff, #00e5ff);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.challenge-progress-text {
  font-size: 9px;
  color: rgba(180,220,255,0.5);
  text-align: right;
}

.challenge-reward {
  font-size: 9px;
  color: rgba(255, 220, 80, 0.75);
  margin-top: 2px;
}

/* ---- Challenge-locked shop items ---- */
.challenge-locked {
  border-color: rgba(255, 180, 40, 0.35) !important;
}

.shop-challenge-hint {
  font-size: 9px;
  color: rgba(255, 200, 60, 0.80);
  display: block;
  text-align: center;
  margin-top: 2px;
}

/* ---- SETTINGS OVERLAY ---- */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 10, 0.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.settings-overlay.active { display: flex; }

.settings-shell {
  background: linear-gradient(160deg, #050d1a 0%, #0a1428 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 16px;
  padding: 24px 28px;
  min-width: 340px;
  max-width: 520px;
  width: 90%;
  max-height: 88vh;
  overflow-y: auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  padding-bottom: 12px;
}

.settings-title {
  font-family: 'Orbitron', monospace;
  color: #00e5ff;
  font-size: 17px;
  letter-spacing: 0.1em;
}

.settings-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a0b8d0;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.settings-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.settings-section { margin-bottom: 20px; }

.settings-section-title {
  font-family: 'Orbitron', monospace;
  color: rgba(0, 229, 255, 0.55);
  font-size: 9px;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 10px;
}

.settings-label {
  color: #a0b8d0;
  font-size: 12px;
  flex: 1;
}

.settings-slider {
  width: 130px;
  accent-color: #00e5ff;
}

.settings-select {
  min-width: 150px;
  max-width: 190px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.28);
  color: #d9f6ff;
  font-family: var(--font-hud, 'Orbitron', monospace);
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.settings-select:focus {
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.12);
}

.settings-select option {
  background: #071222;
  color: #e8fbff;
}

/* Quality Selector */
.quality-selector { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }

.quality-selector button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #607080;
  font-family: 'Orbitron', monospace;
  font-size: 8px;
  padding: 5px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.quality-selector button.selected {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.5);
  color: #00e5ff;
}
.quality-selector button:hover:not(.selected) {
  border-color: rgba(0, 229, 255, 0.25);
  color: #a0e0ff;
}

/* Toggle Button */
.toggle-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 44px;
  transition: all 0.15s;
}
.toggle-btn.off {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #506070;
}

.settings-perf-note {
  color: rgba(160, 184, 212, 0.4);
  font-size: 10px;
  margin-top: 12px;
  text-align: center;
}

/* Settings button in main menu diff row */
.menu-settings-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0b8d0;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}
.menu-settings-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
  color: #c0e8ff;
}

/* ============================================
   HOME SCREEN V2 — Redesign
   ============================================ */

/* ── Override base start screen padding ── */
#startScreen {
  padding: 0;
  gap: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,229,255,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(136,0,200,0.07) 0%, transparent 60%),
    rgba(4, 8, 20, 0.96);
}

/* ── HEADER ── */
.home-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
  background: rgba(4, 8, 20, 0.6);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  gap: 12px;
}

.home-logo-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-logo-title {
  font-family: var(--font-hud);
  font-size: clamp(20px, 3.5vw, 34px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 0 14px var(--cyan),
    0 0 36px rgba(0, 229, 255, 0.3);
  animation: titleGlow 3s ease-in-out infinite;
  line-height: 1;
}

.home-logo-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.home-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-gold-bank {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 205, 64, 0.35);
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.12), rgba(255, 137, 25, 0.10));
  color: #ffe89a;
  font-family: var(--font-hud);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.home-gold-icon {
  font-size: 15px;
  color: var(--gold);
  filter: drop-shadow(0 0 4px rgba(255,215,0,0.5));
}

.home-gold-bank .gold-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff4c2;
}

.home-settings-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.home-settings-btn:hover {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  transform: rotate(30deg);
}

/* ── ABOVE THE FOLD ── */
.home-fold {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  flex-shrink: 0;
}

/* ── HERO SHOWCASE ── */
.home-hero-showcase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(0, 229, 255, 0.10), transparent 55%),
    rgba(6, 12, 28, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.home-hero-showcase::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.home-hero-avatar {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.4));
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.home-hero-info-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.home-hero-class-name {
  font-family: var(--font-hud);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  line-height: 1;
}

.home-hero-role {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.home-hero-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.home-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.home-chip-hp {
  color: #80ffb4;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.08);
}

.home-chip-spd {
  color: #a0e8ff;
  border-color: rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.07);
}

.home-chip-dmg {
  color: #ffcc88;
  border-color: rgba(255, 180, 80, 0.3);
  background: rgba(255, 160, 60, 0.08);
}

.home-hero-super {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 214, 77, 0.25);
  background: rgba(255, 196, 0, 0.07);
}

.home-super-label {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 214, 77, 0.7);
  text-transform: uppercase;
}

.home-super-name {
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: 700;
  color: #ffe58a;
  letter-spacing: 0.04em;
}

/* ── RUN CONTROLS ── */
.home-run-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Mode buttons (= direct CTAs) */
.home-mode-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 2px solid;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.home-mode-btn::before {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255, 255, 255, 0.12);
  transform: skewX(-20deg);
  animation: btnShine 3s ease-in-out infinite;
  pointer-events: none;
}

.home-mode-timed {
  border-color: rgba(0, 229, 255, 0.5);
  background: linear-gradient(160deg, rgba(0, 60, 90, 0.7), rgba(0, 30, 60, 0.85));
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15), 0 8px 24px rgba(0,0,0,0.3);
}

.home-mode-timed:hover {
  border-color: var(--cyan);
  background: linear-gradient(160deg, rgba(0, 80, 120, 0.8), rgba(0, 40, 80, 0.9));
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.35), 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-3px) scale(1.02);
}

.home-mode-endless {
  border-color: rgba(136, 0, 200, 0.55);
  background: linear-gradient(160deg, rgba(50, 0, 80, 0.7), rgba(25, 0, 50, 0.85));
  box-shadow: 0 0 20px rgba(136, 0, 200, 0.15), 0 8px 24px rgba(0,0,0,0.3);
}

.home-mode-endless:hover {
  border-color: var(--purple);
  background: linear-gradient(160deg, rgba(70, 0, 110, 0.8), rgba(40, 0, 70, 0.9));
  box-shadow: 0 0 32px rgba(136, 0, 200, 0.35), 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-3px) scale(1.02);
}

.home-mode-arena {
  border-color: rgba(255, 120, 70, 0.55);
  background: linear-gradient(160deg, rgba(100, 30, 0, 0.72), rgba(55, 18, 0, 0.88));
  box-shadow: 0 0 20px rgba(255, 120, 70, 0.18), 0 8px 24px rgba(0,0,0,0.3);
}

.home-mode-arena:hover {
  border-color: #ff8f5e;
  background: linear-gradient(160deg, rgba(130, 40, 0, 0.82), rgba(75, 22, 0, 0.94));
  box-shadow: 0 0 34px rgba(255, 120, 70, 0.34), 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-3px) scale(1.02);
}

.home-mode-btn:active {
  transform: translateY(1px) scale(0.98) !important;
}

.home-mode-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 8px currentColor);
}

.home-mode-timed .home-mode-icon { color: var(--cyan); }
.home-mode-endless .home-mode-icon { color: var(--purple); }
.home-mode-arena .home-mode-icon { color: #ff8f5e; }

.home-mode-label {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.home-mode-sub {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(180, 210, 230, 0.6);
}

/* ── DIFFICULTY (compact override) ── */
.home-diff-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0;
  justify-content: flex-start;
}

.home-diff-group .diff-btn {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 8px;
  flex: 1;
  text-align: center;
}

.home-diff-nightmare {
  background: rgba(80, 0, 0, 0.25) !important;
}

.home-diff-nightmare.selected {
  background: rgba(180, 0, 0, 0.18) !important;
  text-shadow: 0 0 8px rgba(255, 34, 68, 0.6);
}

/* ── MICROCOPY ── */
.home-microcopy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.home-micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.20);
  color: #9ff4ff;
  width: fit-content;
}

.home-micro-daily {
  animation: none;
}

@keyframes dailyPulse {
  0%, 100% { box-shadow: none; }
  50%       { box-shadow: 0 0 12px rgba(255, 215, 0, 0.18); }
}

/* ── RETENTION BAR ── */
.home-retention-bar {
  width: 100%;
  max-width: 960px;
  margin: 14px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex-shrink: 0;
}

.home-retention-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 30, 0.7);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}

.home-retention-pill:hover {
  border-color: rgba(0, 229, 255, 0.2);
  background: rgba(10, 20, 44, 0.75);
}

.home-ret-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.home-ret-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-ret-label {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-ret-val {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  color: #e8f4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── HERO PANEL WRAPPER ── */
.hero-panel {
  width: min(100%, 960px);
  margin: 18px auto 0;
  padding: 0 20px;
}

.hero-panel .section-title {
  margin-bottom: 10px;
  text-align: left;
  letter-spacing: 0.18em;
}

/* ── ENHANCED HERO CARDS ── */
.hero-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.hero-card {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.10), transparent 55%),
    rgba(8, 15, 34, 0.88);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.hero-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,229,255,0.35);
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}

.hero-card.selected {
  border-color: var(--cyan) !important;
  border-width: 2px;
  background:
    radial-gradient(circle at top left, rgba(0,229,255,0.18), transparent 55%),
    rgba(0, 20, 50, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.28),
    0 0 24px rgba(0,229,255,0.18),
    0 14px 30px rgba(0,0,0,0.3) !important;
}

.hero-card.selected .hero-name {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,229,255,0.5);
}

.hero-card.selected .hero-footer {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 10px;
}

/* ── CHALLENGE PANEL ── */
.challenge-panel-wrapper {
  width: min(100%, 960px);
  margin: 18px auto 0;
  padding: 0 20px;
}

.challenge-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.challenge-see-all-btn {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.challenge-see-all-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.5);
}

/* Hide challenges beyond first 3 by default */
#challengePanel .challenge-grid .challenge-card:nth-child(n + 4) {
  display: none;
}

#challengePanel.show-all .challenge-card {
  display: flex !important;
}

/* Challenge cards — more visual quality */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 0 0 4px;
}

.challenge-card {
  padding: 12px 14px;
  border-radius: 12px;
  gap: 5px;
  transition: border-color 0.18s, background 0.18s;
}

.challenge-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(8, 20, 42, 0.9);
}

.challenge-card-title {
  font-size: 11px;
  color: #e8f4ff;
}

.challenge-card-desc {
  font-size: 11px;
  color: rgba(180, 208, 230, 0.75);
  line-height: 1.4;
}

.challenge-reward {
  font-size: 10px;
  color: rgba(255, 220, 100, 0.85);
  padding-top: 2px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  margin-top: 2px;
}

.challenge-progress-bar {
  height: 5px;
  border-radius: 4px;
  margin-top: 4px;
}

.challenge-progress-fill {
  background: linear-gradient(90deg, #00aaff, var(--cyan));
}

.challenge-card.done {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 30, 18, 0.75);
}

.challenge-card.done .challenge-card-title {
  color: var(--green);
}

/* ── SHOP STRIP (compact override) ── */
.home-shop-strip {
  width: min(100%, 960px);
  margin: 18px auto 0;
  padding: 0 20px;
  grid-template-columns: 160px minmax(0, 1fr);
}

.home-shop-strip .preview-card {
  min-height: auto;
  gap: 8px;
  padding: 12px 10px;
}

.home-shop-strip .preview-canvas {
  width: 100px;
  height: 100px;
}

.home-shop-strip .skin-summary-title {
  font-size: 16px;
}

.home-shop-strip .skin-summary-text {
  font-size: 12px;
}

.home-shop-strip + .shop-note {
  max-width: 960px;
  margin: 8px auto 0;
  padding: 0 20px;
  text-align: left;
}

/* ── CONTROLS (very minimal) ── */
.start-controls {
  width: min(100%, 960px);
  margin: 12px auto 0;
  padding: 0 20px 28px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(100, 130, 160, 0.6);
  text-align: left;
}

/* ── RESPONSIVE: FOLD ON NARROW SCREENS ── */
@media (max-width: 700px) {
  .home-fold {
    grid-template-columns: 1fr;
    padding: 14px 14px 0;
    gap: 14px;
  }

  .home-hero-avatar {
    font-size: 38px;
  }

  .home-hero-showcase {
    flex-direction: row;
    align-items: center;
    min-height: auto;
    padding: 14px 16px;
    gap: 12px;
  }

  .home-retention-bar {
    grid-template-columns: 1fr 1fr;
    padding: 0 14px;
  }

  #retentionLastRun {
    grid-column: 1 / -1;
  }

  .hero-panel,
  .challenge-panel-wrapper,
  .home-shop-strip,
  .home-shop-strip + .shop-note,
  .start-controls {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-shop-strip {
    grid-template-columns: 1fr;
  }

  .home-mode-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .home-header {
    padding: 10px 14px 8px;
  }

  .home-logo-sub { display: none; }

  .home-retention-bar {
    grid-template-columns: 1fr;
  }

  #retentionLastRun { grid-column: auto; }
}

/* ============================================
   SHOP V2 — Redesigned Skin-Shop
   ============================================ */

/* ── Modal shell ── */
.skin-menu-overlay {
  padding: 16px;
}

.skin-menu-shell {
  width: min(1080px, 100%);
  max-height: min(90vh, 860px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.14);
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(0,229,255,0.07), transparent 50%),
    radial-gradient(ellipse 50% 50% at 100% 100%, rgba(136,0,200,0.06), transparent 55%),
    linear-gradient(180deg, rgba(8, 16, 36, 0.99), rgba(4, 10, 24, 0.99));
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
}

/* ── Header V2 ── */
.shop-header-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.shop-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-header-eyebrow {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.shop-header-title {
  font-family: var(--font-hud);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 16px rgba(0,229,255,0.25);
  line-height: 1;
}

.shop-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 196, 0, 0.08);
  color: #ffe89a;
  font-family: var(--font-hud);
  font-size: 13px;
}

.shop-gold-icon {
  font-size: 14px;
  color: var(--gold);
  filter: drop-shadow(0 0 4px rgba(255,215,0,0.5));
}

.shop-gold-val {
  font-size: 18px;
  font-weight: 900;
  color: #fff4c2;
}

.shop-gold-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,220,100,0.55);
  text-transform: uppercase;
}

.shop-close-v2 {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  letter-spacing: 0;
  padding: 0;
}

.shop-close-v2:hover {
  border-color: rgba(255,80,80,0.5);
  background: rgba(255,60,60,0.1);
  color: #ff6666;
}

/* ── Category Tabs ── */
.shop-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}

.shop-tabs::-webkit-scrollbar { display: none; }

.shop-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-tab:hover {
  color: #c0d8f0;
  background: rgba(255,255,255,0.04);
}

.shop-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
}

.shop-tab-icon {
  font-size: 18px;
  line-height: 1;
}

.shop-tab-label {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Main Layout ── */
.shop-layout-v2 {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 0;
}

/* ── Preview Panel (left) ── */
.shop-preview-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  border-right: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(circle at 50% 30%, rgba(0,229,255,0.08), transparent 60%),
    rgba(255,255,255,0.01);
}

.shop-preview-canvas-wrap {
  position: relative;
  padding: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.08), transparent 70%);
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 32px rgba(0,229,255,0.08), inset 0 0 20px rgba(0,229,255,0.04);
}

.shop-preview-canvas {
  width: 160px !important;
  height: 160px !important;
  border-radius: 50%;
  display: block;
  border: none;
  background: transparent;
}

.shop-preview-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-dim);
  padding: 0 8px;
  max-width: 180px;
}

.shop-preview-label {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0,229,255,0.4);
}

/* ── Scrollable Item Panel ── */
.shop-scroll-v2 {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,229,255,0.15) transparent;
}

/* ── Section visibility ── */
.shop-section {
  display: none;
}

.shop-section--active {
  display: block;
  animation: shopSectionIn 0.2s ease forwards;
}

@keyframes shopSectionIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section header ── */
.shop-section-header {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.shop-section-title {
  font-family: var(--font-hud);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  line-height: 1;
}

.shop-section-desc {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ── Color swatches (enlarged) ── */
.shop-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-color-grid .color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.shop-color-grid .color-swatch:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.shop-color-grid .color-swatch.selected {
  border-color: #fff;
  border-width: 3px;
  box-shadow: 0 0 14px rgba(255,255,255,0.5);
  transform: scale(1.12);
}

/* ── Item Card Grid ── */
.shop-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

/* ── Enhanced cosmetic-option-btn ── */
.cosmetic-option-btn,
.hat-btn {
  min-height: 148px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.06), transparent 55%),
    rgba(10, 18, 38, 0.85);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
  padding: 12px 10px 14px;
  gap: 7px;
  position: relative;
  overflow: visible;
}

.cosmetic-option-btn:hover,
.hat-btn:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,229,255,0.12);
  background:
    radial-gradient(circle at top, rgba(0,229,255,0.10), transparent 55%),
    rgba(6, 14, 34, 0.92);
}

.cosmetic-option-btn.selected,
.hat-btn.selected {
  border-color: var(--cyan);
  border-width: 2px;
  background:
    radial-gradient(circle at top, rgba(0,229,255,0.16), transparent 55%),
    rgba(0, 20, 50, 0.9);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.25), 0 0 20px rgba(0,229,255,0.12), 0 12px 28px rgba(0,0,0,0.25);
}

/* Selected badge */
.cosmetic-option-btn.selected::after,
.hat-btn.selected::after {
  content: '✦';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
}

.cosmetic-option-btn.locked,
.hat-btn.locked {
  border-color: rgba(255, 196, 0, 0.22);
  opacity: 0.82;
}

/* Price badge inside card */
.shop-price {
  position: absolute;
  bottom: 6px;
  right: 6px;
  left: auto;
  inset: auto 6px 6px auto;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 196, 0, 0.12);
  border: 1px solid rgba(255, 196, 0, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cosmetic-option-canvas {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.06), rgba(4, 8, 20, 0.9));
  border: 1px solid rgba(255,255,255,0.08);
}

.cosmetic-option-title {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.cosmetic-option-subtitle {
  font-size: 10px;
  color: var(--text-dim);
}

/* ── Trail grid (card-style layout) ── */
.shop-trail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.shop-trail-grid .trail-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(8, 14, 32, 0.80);
  width: 100%;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  min-height: 90px;
  font-size: 13px;
}

.shop-trail-grid .trail-btn:hover {
  border-color: rgba(0,229,255,0.35);
  background: rgba(6, 14, 32, 0.92);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.shop-trail-grid .trail-btn.selected {
  border-color: var(--cyan);
  border-width: 2px;
  background: rgba(0, 20, 48, 0.88);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.2), 0 0 16px rgba(0,229,255,0.10);
}

.shop-trail-grid .trail-sample {
  width: 100%;
  height: 12px;
  display: block;
  position: relative;
}

.shop-trail-grid .trail-sample::before {
  width: 100%;
  height: 8px;
  left: 0;
}

.shop-trail-grid .trail-sample::after {
  right: 0;
  width: 10px;
  height: 10px;
}

.shop-trail-grid .shop-inline {
  font-size: 11px;
  margin-left: 0;
  color: var(--gold);
}

/* ── Shop footer note ── */
/* ── WEAPON SHOP ── */
.weapon-shop-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.weapon-shop-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weapon-shop-card.owned { border-color: rgba(0,255,136,0.35); background: rgba(0,255,136,0.06); }
.weapon-shop-card.shop-type { border-color: rgba(255,200,0,0.25); }
.weapon-shop-card.challenge-type { border-color: rgba(180,80,255,0.25); }

.weapon-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weapon-card-icon { font-size: 26px; flex-shrink: 0; }
.weapon-card-info { flex: 1; }
.weapon-card-name { font-size: 14px; font-weight: 700; color: #e8f4ff; }
.weapon-card-evo  { font-size: 11px; color: rgba(200,160,255,0.7); margin-top: 2px; }
.weapon-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; white-space: nowrap;
}
.shop-badge      { background: rgba(255,200,0,0.18); color: #ffd700; border: 1px solid rgba(255,200,0,0.4); }
.challenge-badge { background: rgba(180,80,255,0.18); color: #cc88ff; border: 1px solid rgba(180,80,255,0.4); }

.weapon-card-desc     { font-size: 12px; color: rgba(180,210,240,0.8); line-height: 1.4; }
.weapon-card-evo-desc { font-size: 11px; color: rgba(200,160,255,0.6); font-style: italic; }

.weapon-status { font-size: 12px; font-weight: 600; margin-top: 4px; }
.weapon-status.unlocked { color: #00ff88; }
.weapon-status.locked   { color: rgba(180,80,255,0.7); }

.weapon-buy-btn {
  margin-top: 4px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #b8860b, #ffd700);
  border: none; border-radius: 8px;
  color: #1a1200; font-size: 13px; font-weight: 700;
  cursor: pointer; align-self: flex-start;
  transition: opacity 0.15s;
}
.weapon-buy-btn:hover { opacity: 0.85; }

.shop-footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 11px;
  line-height: 1.6;
  color: rgba(140,170,200,0.45);
}

/* ── HOMESCREEN SHOP TEASER ── */
.home-shop-teaser {
  width: min(100%, 960px);
  margin: 14px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.86;
}

.home-shop-teaser > .home-shop-preview-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0,229,255,0.10), transparent 70%);
  border: 1px solid rgba(0,229,255,0.18);
  box-shadow: 0 0 24px rgba(0,229,255,0.06);
}

.home-shop-canvas {
  width: 66px !important;
  height: 66px !important;
  border-radius: 50%;
  border: none !important;
  background: transparent !important;
  display: block;
}

.home-shop-teaser-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-shop-teaser-eyebrow {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(0,229,255,0.58);
  text-transform: uppercase;
}

.home-shop-teaser-title {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1;
}

.home-shop-teaser-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.home-shop-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--font-hud);
  letter-spacing: 0.04em;
  color: rgba(180,210,240,0.7);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.home-shop-teaser-current {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-shop-open-btn {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0,229,255,0.35);
  background: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(0,100,180,0.15));
  color: var(--cyan);
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.shop-tab[data-tab="waffen"],
.shop-section[data-cat="waffen"] {
  display: none !important;
}

.home-shop-open-btn:hover {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0,229,255,0.20), rgba(0,140,220,0.22));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,229,255,0.15);
}

.home-shop-arrow {
  font-size: 16px;
  transition: transform 0.15s;
}

.home-shop-open-btn:hover .home-shop-arrow {
  transform: translateX(3px);
}

/* Remove old shop-note below teaser */
.home-shop-teaser + .shop-note { display: none; }

/* ── Responsive Shop ── */
@media (max-width: 900px) {
  .shop-layout-v2 {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .shop-preview-canvas {
    width: 130px !important;
    height: 130px !important;
  }
}

@media (max-width: 700px) {
  .shop-layout-v2 {
    grid-template-columns: 1fr;
  }

  .shop-preview-v2 {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 16px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .shop-preview-canvas {
    width: 90px !important;
    height: 90px !important;
  }

  .shop-preview-canvas-wrap {
    padding: 6px;
    flex-shrink: 0;
  }

  .shop-tabs {
    gap: 2px;
    padding: 8px 12px 0;
  }

  .shop-tab {
    padding: 6px 10px 8px;
  }

  .shop-tab-label {
    font-size: 9px;
  }

  .home-shop-teaser {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 14px;
    gap: 14px;
  }

  .home-shop-open-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .skin-menu-overlay {
    padding: 8px;
  }

  .skin-menu-shell {
    max-height: 95vh;
  }

  .shop-header-v2 {
    padding: 12px 14px 10px;
  }

  .shop-scroll-v2 {
    padding: 14px 14px 20px;
  }

  .shop-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
  }
}

/* =============================================
   V3 HUD — REDESIGNED PLAYSCREEN
   Cleaner layout · More gameplay space
   ============================================= */

/* Narrower left and right columns — reclaim screen for gameplay */
#hud .hud-top {
  grid-template-columns: minmax(168px, 192px) 1fr minmax(128px, 172px);
  gap: 12px;
}

/* Compact player panel — level + hp + xp + super only */
.player-info {
  min-width: 168px;
  max-width: 192px;
  gap: 4px;
}

/* Slimmer timer pill */
#hud .timer-container {
  padding: 4px 12px 6px;
  min-width: 106px;
}
#hud .timer-display {
  font-size: 22px;
}
#hud .timer-label {
  font-size: 8px;
  letter-spacing: 0.10em;
}

/* Compact HUD control buttons */
#hud .top-controls .hud-control-btn,
#hud .top-controls .pause-btn,
#hud .top-controls .quality-btn {
  min-width: 66px;
  height: 32px;
  font-size: 10px;
  letter-spacing: 0.06em;
  border-radius: 8px;
}
#hud .top-controls {
  gap: 7px;
}

/* Compact right stack */
#hud .hud-right-stack {
  gap: 6px;
}

/* Kills badge — small, semantic, standalone chip */
.kills-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: rgba(4, 10, 22, 0.76);
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 8px;
  font-family: var(--font-hud);
  color: var(--text-dim);
  font-size: 13px;
  backdrop-filter: blur(8px);
}
.kills-icon {
  font-size: 11px;
  opacity: 0.48;
  line-height: 1;
}

/* ---- Combat context ----
   Keep one-glance info local to the player panel. */
.hud-context-zone {
  position: absolute;
  left: 14px;
  top: 116px;
  width: min(188px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

.hud-focus-strip {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.hud-focus-strip #biomeChip {
  flex: none;
}

.hud-focus-strip .hud-status-card,
.hud-detail-drawer .hud-status-card,
.hud-detail-toggle {
  min-height: 26px;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  gap: 6px;
  background: rgba(4, 10, 22, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.hud-focus-strip .hud-status-tag,
.hud-detail-drawer .hud-status-tag {
  min-width: 34px;
  height: 18px;
  padding: 0 5px;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.hud-focus-strip .hud-status-main,
.hud-detail-drawer .hud-status-main {
  font-size: 10px;
  letter-spacing: 0.03em;
}

.hud-focus-strip .hud-status-meta,
.hud-detail-drawer .hud-status-meta {
  font-size: 9px;
}

.combat-focus-chip {
  flex: none;
  min-width: 0;
}

.combat-focus-chip.inactive {
  display: none;
}

.hud-detail-toggle {
  width: 100%;
  pointer-events: all;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #d8ecff;
  font-family: var(--font-hud);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.hud-detail-toggle:hover,
.hud-detail-toggle:focus-visible {
  border-color: rgba(0, 229, 255, 0.28);
  background: rgba(6, 16, 34, 0.92);
  transform: translateY(-1px);
  outline: none;
}

.hud-detail-toggle.active {
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.24);
}

.hud-detail-toggle.inactive {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
}

.hud-detail-toggle-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(218, 232, 248, 0.82);
}

.hud-detail-toggle-value {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  color: #f1fbff;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hud-detail-drawer {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.hud-context-zone.expanded .hud-detail-drawer {
  display: flex;
}

.hud-detail-drawer .hud-status-card {
  flex: none;
  min-width: 0;
}

.hud-detail-drawer .buff-strip {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

.hud-detail-drawer .buff-pill {
  gap: 6px;
}

.hud-detail-drawer .buff-pill-label {
  font-size: 10px;
}

/* ---- Skill bar: horizontal weapon + passive row ---- */
.active-action-slot {
  --action-ready: 100%;
  position: relative;
  isolation: isolate;
  min-width: 164px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(113, 215, 255, 0.28);
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.82);
  color: #dff8ff;
  font-family: var(--font-hud);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

.active-action-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--action-ready);
  background: linear-gradient(90deg, rgba(113, 215, 255, 0.2), rgba(113, 215, 255, 0.04));
  z-index: -1;
  transition: width 0.12s linear;
}

.active-action-slot.ready {
  border-color: rgba(113, 215, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(113, 215, 255, 0.12), 0 0 18px rgba(113, 215, 255, 0.18);
}

.active-action-slot.cooldown {
  color: rgba(214, 236, 246, 0.68);
}

.active-action-hotkey {
  color: #71d7ff;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.active-action-name {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.active-action-state {
  font-size: 9px;
  color: rgba(224, 248, 255, 0.82);
}

body.hud-density-focus .hud-detail-toggle,
body.hud-density-focus .hud-detail-drawer,
body.hud-density-focus .passive-slots {
  display: none !important;
}

body.hud-density-focus .hud-context-zone {
  width: min(174px, calc(100vw - 28px));
}

body.hud-density-focus .weapon-slot:not(.active):nth-child(n+4),
body.hud-density-focus .weapon-slot.active:nth-child(n+5) {
  display: none;
}

body.vfx-density-reduced .damage-number {
  opacity: 0.72;
}
.skill-bar {
  position: absolute;
  bottom: 10px;
  left: 14px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-end;
}

/* Override absolute positioning — both slots go horizontal */
.skill-bar .weapon-slots,
.skill-bar .passive-slots {
  position: static;
  flex-direction: row;
  gap: 5px;
}

/* Subtle divider between weapon and passive groups */
.skill-bar .passive-slots {
  padding-left: 5px;
  border-left: 1px solid rgba(0, 229, 255, 0.14);
}

/* ---- Low-HP critical state — HP bar edge pulse ---- */
@keyframes hp-critical-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 34, 68, 0.5); }
  50%       { box-shadow: 0 0 18px rgba(255, 34, 68, 0.9), 0 0 6px rgba(255, 34, 68, 0.4); }
}
.hp-bar.critical .bar-fill {
  animation: hp-critical-pulse 0.7s ease-in-out infinite;
}

/* ---- Responsive: small screens ---- */
@media (max-width: 768px) {
  .hud-context-zone {
    top: 108px;
    width: min(164px, calc(100vw - 24px));
  }
  .skill-bar .weapon-slot,
  .skill-bar .passive-slot {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .skill-bar .skill-slot-manual {
    width: 74px;
    height: 46px;
    padding: 4px 6px;
  }
}
@media (max-width: 520px) {
  .hud-context-zone {
    top: 104px;
    width: min(148px, calc(100vw - 20px));
    gap: 4px;
  }
  .hud-focus-strip .hud-status-card,
  .hud-detail-drawer .hud-status-card,
  .hud-detail-toggle {
    min-height: 22px;
    padding: 0 6px 0 5px;
  }
  .hud-focus-strip .hud-status-tag,
  .hud-detail-drawer .hud-status-tag {
    min-width: 28px;
    font-size: 7px;
  }
  .hud-focus-strip .hud-status-main,
  .hud-detail-drawer .hud-status-main {
    font-size: 9px;
  }
  .hud-focus-strip .hud-status-meta,
  .hud-detail-drawer .hud-status-meta {
    font-size: 8px;
  }
  .hud-detail-toggle-value {
    min-width: 16px;
    height: 16px;
    font-size: 9px;
  }
  .skill-bar .weapon-slot,
  .skill-bar .passive-slot {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .skill-bar .skill-slot-manual {
    width: 66px;
    height: 42px;
    padding: 4px 5px;
  }
  .skill-slot-manual .weapon-slot-label {
    font-size: 10px;
  }
  .skill-slot-manual .weapon-slot-hotkey,
  .skill-slot-manual .weapon-slot-state {
    font-size: 8px;
  }
}
/* Performance debug overlay: toggled with F3, read-only runtime diagnostics. */
.perf-debug-overlay {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 9999;
  display: none;
  min-width: 300px;
  max-width: min(460px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(126, 232, 255, 0.42);
  border-radius: 12px;
  background: rgba(4, 9, 18, 0.86);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
  color: #d8f8ff;
  font: 600 11px/1.45 "Courier New", monospace;
  letter-spacing: 0.02em;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.perf-debug-overlay.active {
  display: block;
}

/* ============================================
   KARRIERE-MODUS
   ============================================ */

/* Karriere-Button im Start-Screen */
.home-mode-career {
  background: linear-gradient(135deg, rgba(200,130,255,0.18), rgba(100,50,200,0.12));
  border-color: rgba(200,130,255,0.4);
}
.home-mode-career:hover {
  background: linear-gradient(135deg, rgba(200,130,255,0.28), rgba(100,50,200,0.22));
  border-color: rgba(200,130,255,0.7);
}

/* Karrierekarte-Button im Game-Over */
.restart-btn-career {
  background: linear-gradient(135deg, rgba(200,130,255,0.2), rgba(100,50,200,0.15));
  border: 1px solid rgba(200,130,255,0.45);
  color: #d8aaff;
}
.restart-btn-career:hover {
  background: linear-gradient(135deg, rgba(200,130,255,0.35), rgba(100,50,200,0.25));
  border-color: rgba(200,130,255,0.8);
}

/* ---- KARRIERE-SCREEN ---- */
.career-screen {
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 40px;
  background: rgba(4, 6, 18, 0.97);
}

.career-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: rgba(6, 10, 28, 0.96);
  border-bottom: 1px solid rgba(200,130,255,0.2);
  backdrop-filter: blur(8px);
}

.career-back-btn {
  padding: 7px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font-hud);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
}
.career-back-btn:hover {
  background: rgba(255,255,255,0.14);
  color: var(--text);
}

.career-header-title {
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #d8aaff;
  text-shadow: 0 0 18px rgba(200,130,255,0.5);
}

.career-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 190px;
}

.career-next-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(200,130,255,0.24), rgba(100,50,200,0.18));
  border: 1px solid rgba(200,130,255,0.48);
  border-radius: 8px;
  color: #e3c4ff;
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.career-next-btn:hover {
  background: linear-gradient(135deg, rgba(200,130,255,0.38), rgba(100,50,200,0.28));
  border-color: rgba(200,130,255,0.78);
  color: #f0dcff;
}

.career-header-gold {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hud);
  font-size: 15px;
  color: var(--gold);
}

.career-gold-icon {
  font-size: 13px;
  opacity: 0.8;
}

/* ---- KARRIERE-MAP ---- */
.career-map {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.career-biome-group {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(var(--biome-color, 100,200,255), 0.18);
  border-radius: 14px;
  overflow: hidden;
}

.career-biome-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.career-biome-icon {
  font-size: 22px;
}

.career-biome-name {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--biome-color, #88ccff);
  text-shadow: 0 0 10px var(--biome-color, #88ccff);
}

.career-nodes-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 18px;
}

.career-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  border: 1px solid transparent;
  text-align: center;
  min-width: 0;
}

.career-node.available {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
}
.career-node.available:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--node-color, #88ccff);
  box-shadow: 0 0 14px rgba(var(--node-color, #88ccff), 0.15);
  transform: translateY(-2px);
}

.career-node.completed {
  background: rgba(0, 200, 100, 0.1);
  border-color: rgba(0, 200, 100, 0.4);
}

.career-node.locked {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.06);
  cursor: default;
  opacity: 0.45;
}

.career-node-icon {
  font-size: 22px;
  line-height: 1;
}
.career-node.completed .career-node-icon {
  color: #00cc66;
}

.career-node-type {
  font-family: var(--font-hud);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--node-color, #88ccff);
  opacity: 0.85;
}

.career-node-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.career-node-dur {
  font-size: 10px;
  color: var(--text-dim);
}

.career-node-medal {
  font-family: var(--font-hud);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.career-node-lock {
  width: 100%;
  font-size: 9px;
  line-height: 1.2;
  color: rgba(255,255,255,0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.career-node-arrow {
  font-size: 18px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  padding: 0 2px;
}

.career-footer {
  text-align: center;
  padding: 16px 20px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.career-progress-text {
  font-family: var(--font-hud);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ---- MISSION-PREVIEW-MODAL ---- */
.mission-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mission-preview-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mission-preview-shell {
  width: min(480px, calc(100vw - 32px));
  background: rgba(6, 10, 28, 0.98);
  border: 1px solid rgba(200,130,255,0.35);
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(200,130,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mission-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mission-preview-type {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid currentColor;
}

.mission-preview-title {
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.05em;
  margin: 0;
}

.mission-preview-objective {
  font-family: var(--font-hud);
  font-size: 12px;
  color: #e3c4ff;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  background: rgba(200,130,255,0.08);
  border: 1px solid rgba(200,130,255,0.22);
  border-radius: 8px;
}

.mission-preview-mechanic {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.4;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border-left: 3px solid rgba(200,130,255,0.5);
}

.mission-preview-stats {
  display: flex;
  gap: 12px;
}

.preview-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  text-align: center;
}

.preview-stat-label {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.preview-stat-val {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.mission-preview-build {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.preview-build-title {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.preview-build-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  line-height: 1.3;
}

.preview-build-row span {
  color: var(--text-dim);
  flex-shrink: 0;
}

.preview-build-row strong {
  color: var(--text);
  text-align: right;
  font-weight: 700;
}

.mission-preview-reward {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 28px;
}

.preview-reward-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  width: 100%;
}

.preview-reward-item {
  padding: 4px 10px;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

.preview-reward-repeat {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-dim);
}

.mission-preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.preview-cancel-btn {
  flex: 1;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s;
}
.preview-cancel-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

.preview-start-btn {
  flex: 2;
  padding: 12px;
  background: linear-gradient(135deg, rgba(200,130,255,0.3), rgba(100,50,200,0.25));
  border: 1px solid rgba(200,130,255,0.5);
  border-radius: 10px;
  color: #e0c0ff;
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.18s;
}
.preview-start-btn:hover {
  background: linear-gradient(135deg, rgba(200,130,255,0.45), rgba(100,50,200,0.35));
  border-color: rgba(200,130,255,0.8);
  box-shadow: 0 0 20px rgba(200,130,255,0.3);
}

/* ---- KARRIERE GAME-OVER SECTION ---- */
.career-gameover-section {
  width: 100%;
  padding: 14px 18px;
  margin: 8px 0 4px;
  background: rgba(200,130,255,0.08);
  border: 1px solid rgba(200,130,255,0.25);
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.career-gameover-title {
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 700;
  color: #d8aaff;
  letter-spacing: 0.06em;
}

.career-gameover-gold {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}

.career-gameover-medal {
  font-family: var(--font-hud);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.career-gameover-next {
  font-family: var(--font-hud);
  font-size: 11px;
  color: #e3c4ff;
  letter-spacing: 0.05em;
  padding: 7px 10px;
  background: rgba(200,130,255,0.09);
  border: 1px solid rgba(200,130,255,0.22);
  border-radius: 8px;
}

.career-gameover-unlocks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.career-gameover-unlocks-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.career-gameover-unlock-item {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  padding: 3px 12px;
  background: rgba(255,215,0,0.08);
  border-radius: 6px;
  border: 1px solid rgba(255,215,0,0.25);
}

.career-gameover-message {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* ============================================
   HERIX TUTORIAL GUIDE v2
   ============================================ */

/* ---- HERIX BALL: Unified Component ---- */
.herix-ball {
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #82e0ff 0%, #0090ee 48%, #003888 100%);
  box-shadow: 0 0 20px rgba(0,160,255,0.5), inset 0 -5px 10px rgba(0,30,100,0.35);
  flex-shrink: 0;
}

.herix-ball-sm { width: 48px;  height: 48px; }
.herix-ball-md { width: 68px;  height: 68px; }
.herix-ball-lg { width: 90px;  height: 90px; }

@keyframes herixFloat {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-6px); }
}
@keyframes herixBounce {
  0%, 100% { transform: translateY(0px) rotate(-4deg); }
  50%       { transform: translateY(-9px) rotate(4deg); }
}

/* Face + eyes use flexbox → no absolute positioning nightmares */
.herix-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 8%;
}

.herix-eye-wrap {
  display: flex;
  gap: 18%;   /* relative to eye-wrap width, kept proportional */
  align-items: center;
}

.herix-ball-sm .herix-eye-wrap { gap: 6px; }
.herix-ball-md .herix-eye-wrap { gap: 9px; }
.herix-ball-lg .herix-eye-wrap { gap: 12px; }

.herix-eye {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,60,0.35);
  position: relative;
  flex-shrink: 0;
}

.herix-ball-sm .herix-eye { width: 10px; height: 12px; }
.herix-ball-md .herix-eye { width: 14px; height: 17px; }
.herix-ball-lg .herix-eye { width: 18px; height: 22px; }

.herix-pupil {
  background: #0a0a2a;
  border-radius: 50%;
  position: absolute;
}

.herix-ball-sm .herix-pupil { width: 5px;  height: 6px;  top: 3px; left: 2px; }
.herix-ball-md .herix-pupil { width: 7px;  height: 9px;  top: 4px; left: 3px; }
.herix-ball-lg .herix-pupil { width: 9px;  height: 11px; top: 5px; left: 4px; }

/* ---- LANGUAGE SELECTOR ---- */
.lang-select-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lang-select-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lang-select-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 24px 36px;
  width: min(560px, calc(100vw - 24px));
}

.lang-herix-wrap {
  animation: herixBounce 2.2s ease-in-out infinite;
}

.lang-title {
  font-family: var(--font-hud);
  font-size: clamp(36px, 8vw, 62px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
  text-shadow: 0 0 24px var(--cyan), 0 0 60px rgba(0,229,255,0.4);
}

.lang-subtitle {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  width: 100%;
  max-height: 55vh;
  overflow-y: auto;
}

.lang-grid[hidden] { display: none; }

.lang-select-dropdown {
  width: min(360px, 100%);
  padding: 13px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,229,255,0.34);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
}

.lang-start-btn {
  width: min(360px, 100%);
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(0,180,255,0.32), rgba(0,80,200,0.28));
  border: 1px solid rgba(0,180,255,0.58);
  border-radius: 10px;
  color: #dff7ff;
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.lang-start-btn:hover {
  border-color: rgba(0,229,255,0.86);
  box-shadow: 0 0 22px rgba(0,180,255,0.28);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
}

.lang-btn:hover {
  background: rgba(0,229,255,0.12);
  border-color: rgba(0,229,255,0.4);
  color: #fff;
}

.lang-flag { font-size: 20px; line-height: 1; }
.lang-name { flex: 1; }

/* ---- TUTORIAL DIALOG CARD ---- */

/* Default: centered full-screen (used in-game) */
.tut-dialog-card {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
}

.tut-dialog-card.active {
  opacity: 1;
  pointer-events: all;
}

/* Bottom-mode: Dialog am unteren Rand → highlight oben sichtbar */
.tut-dialog-card.bottom-mode {
  /* Only gradient at bottom, rest transparent so highlight is visible */
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0.0) 62%);
  backdrop-filter: none;
  justify-content: flex-end;
  padding: 0;
  pointer-events: none;
}

.tut-dialog-card.bottom-mode .tut-dialog-inner,
.tut-dialog-card.bottom-mode .tut-dialog-actions {
  pointer-events: auto;
}

.tut-dialog-card.top-mode {
  background: linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.52) 34%, rgba(0,0,0,0.0) 62%);
  backdrop-filter: none;
  justify-content: flex-start;
  padding: 0;
  pointer-events: none;
}

.tut-dialog-card.top-mode .tut-dialog-inner {
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid rgba(0,180,255,0.3);
  padding: 18px 24px 14px;
  pointer-events: auto;
}

.tut-dialog-card.top-mode .tut-dialog-actions {
  width: 100%;
  max-width: 100%;
  padding: 0 24px 18px;
  margin-top: 0;
  background: rgba(4, 10, 28, 0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  pointer-events: auto;
}

.tut-dialog-card.bottom-mode .tut-dialog-inner {
  width: 100%;
  max-width: 100%;
  border-radius: 18px 18px 0 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid rgba(0,180,255,0.3);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  padding: 20px 24px 16px;
}

.tut-dialog-card.bottom-mode .tut-dialog-actions {
  width: 100%;
  max-width: 100%;
  padding: 0 24px 24px;
  margin-top: 0;
  background: rgba(4, 10, 28, 0.98);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tut-dialog-inner {
  width: min(540px, calc(100vw - 32px));
  background: rgba(4, 10, 28, 0.98);
  border: 1px solid rgba(0,180,255,0.35);
  border-radius: 20px;
  padding: 28px 28px 22px;
  box-shadow: 0 0 40px rgba(0,150,255,0.2), 0 24px 60px rgba(0,0,0,0.6);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.tut-dialog-herix {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  animation: herixFloat 2s ease-in-out infinite;
}

.tut-dialog-speaker {
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #60c8ff;
  text-transform: uppercase;
}

.tut-dialog-body {
  flex: 1;
  padding-top: 4px;
}

.tut-dialog-text {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-line;
}

.tut-dialog-actions {
  width: min(540px, calc(100vw - 32px));
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.tut-dialog-skip-btn {
  padding: 11px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.tut-dialog-skip-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.tut-dialog-next-btn {
  flex: 1;
  padding: 13px 20px;
  background: linear-gradient(135deg, rgba(0,180,255,0.3), rgba(0,80,200,0.25));
  border: 1px solid rgba(0,180,255,0.5);
  border-radius: 10px;
  color: #c8eeff;
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s;
}
.tut-dialog-next-btn:hover {
  background: linear-gradient(135deg, rgba(0,180,255,0.45), rgba(0,80,200,0.35));
  border-color: rgba(0,180,255,0.8);
  box-shadow: 0 0 20px rgba(0,180,255,0.3);
}

/* ---- HERIX CORNER (in-game guide) ---- */
.herix-corner {
  position: fixed;
  bottom: 88px;
  left: 14px;
  z-index: 50;   /* BELOW HUD elements (z-index 10 = HUD, 100 = screens) */
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.herix-corner.active {
  opacity: 1;
  transform: translateY(0);
}
.herix-corner.active .herix-ball {
  animation: herixFloat 2.4s ease-in-out infinite;
}

.herix-corner-bubble {
  max-width: 220px;
  padding: 9px 13px;
  background: rgba(2, 14, 38, 0.93);
  border: 1px solid rgba(0,180,255,0.4);
  border-radius: 10px 10px 10px 3px;
  box-shadow: 0 0 10px rgba(0,130,255,0.18), 0 4px 12px rgba(0,0,0,0.4);
  margin-bottom: 4px;
}

.herix-corner-text {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: #c8eeff;
  line-height: 1.45;
}

/* Tutorial Skip Button (small, in HUD area, low z-index) */
.tutorial-skip-btn {
  position: fixed;
  bottom: 150px;
  left: 14px;
  z-index: 50;
  padding: 5px 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  pointer-events: all;
}
.tutorial-skip-btn:hover {
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

/* ---- SPOTLIGHT HIGHLIGHT for Menu Tour ---- */
/* Element pulsiert mit Cyan-Glow — sichtbar weil Dialog unten, Element oben */
.tut-highlighted {
  position: relative;
  z-index: 500 !important;
  border-radius: 12px;
  animation: tutPulse 1.6s ease-in-out infinite;
  outline: none;
}

@keyframes tutPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(0,229,255,0.75),
                0 0 24px rgba(0,229,255,0.5),
                0 0 48px rgba(0,229,255,0.2);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(0,229,255,0.95),
                0 0 36px rgba(0,229,255,0.7),
                0 0 64px rgba(0,229,255,0.35);
  }
}

/* Start-Screen bleibt beim Menu-Tour sichtbar (bottom-mode lässt oberen Bereich frei) */
/* Die .screen-overlay z-index ist 100, bottom-mode-Dialog ist 350 — */
/* aber da der Dialog transparent oben ist, sieht man den Screen darunter */

/* Mobile adjustments */
@media (max-width: 520px) {
  .tut-dialog-inner   { flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 18px; }
  .tut-dialog-text    { font-size: 13px; }
  .lang-grid          { grid-template-columns: repeat(2, 1fr); }
  .herix-corner       { bottom: 100px; left: 10px; }
  .herix-corner-bubble { max-width: 190px; }
  .tutorial-skip-btn  { bottom: 162px; }
}

/* ============================================
   KARRIERE MISSION COMPLETE SCREEN
   ============================================ */

.career-mission-complete {
  --cmc-biome-color: #00e5ff;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  background: radial-gradient(ellipse at 50% -10%,
    color-mix(in srgb, var(--cmc-biome-color, #00e5ff) 18%, #060a1a) 0%,
    #060a14 55%, #040810 100%);
}

.cmc-biome-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.cmc-type-badge {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.cmc-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cmc-banner { text-align: center; padding-top: 24px; }

.cmc-complete-label {
  font-family: var(--font-hud);
  font-size: clamp(18px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 28px rgba(0,229,255,0.5);
  animation: cmcPulse 2s ease-in-out infinite;
}

@keyframes cmcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.cmc-mission-name {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-dim);
  margin-top: 6px;
}

.cmc-medal {
  font-size: clamp(52px, 14vw, 84px);
  line-height: 1;
  animation: cmcMedalPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cmc-medal-gold   { filter: drop-shadow(0 0 20px rgba(255,215,0,0.55)); }
.cmc-medal-silver { filter: drop-shadow(0 0 16px rgba(180,180,220,0.45)); }
.cmc-medal-bronze { filter: drop-shadow(0 0 12px rgba(180,100,60,0.4));  }

@keyframes cmcMedalPop {
  0%   { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  80%  { transform: scale(1.12) rotate(3deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.cmc-stats {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.cmc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

.cmc-stat-label {
  font-family: var(--font-hud);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.cmc-stat strong {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}

.cmc-section-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  width: 100%;
  max-width: 480px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 6px;
}

.cmc-objectives {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmc-obj {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  opacity: 0.5;
}

.cmc-obj.done {
  opacity: 1;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
}

.cmc-obj-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--text-dim);
}

.cmc-obj.done .cmc-obj-icon { color: #44ff88; }

.cmc-obj-label {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.cmc-obj-badge {
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.cmc-obj-badge.primary { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.cmc-obj-badge.silver  { background: rgba(180,180,220,0.18); color: #c8c8ff; border: 1px solid rgba(180,180,220,0.3); }
.cmc-obj-badge.gold    { background: rgba(255,215,0,0.15); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }

.cmc-rewards { width: 100%; max-width: 480px; text-align: center; }

.cmc-gold-earned {
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255,215,0,0.4);
}

.cmc-gold-bonus {
  font-size: 13px;
  color: rgba(255,215,0,0.7);
  font-weight: 600;
}

.cmc-unlocks {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmc-unlock-title {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.cmc-unlock-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255,215,0,0.12), rgba(255,215,0,0.06));
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  animation: cmcUnlockSlide 0.4s ease both;
}

@keyframes cmcUnlockSlide {
  from { transform: translateX(-12px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.cmc-unlock-item span { font-size: 20px; }

.cmc-actions {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  padding: 14px 20px 24px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.cmc-btn-map {
  flex: 1;
  padding: 14px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  color: var(--text-dim);
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.18s;
}
.cmc-btn-map:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.cmc-btn-next {
  flex: 2;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(0,180,255,0.3), rgba(0,80,200,0.2));
  border: 1px solid rgba(0,180,255,0.5);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s;
}
.cmc-btn-next:hover {
  background: linear-gradient(135deg, rgba(0,180,255,0.45), rgba(0,80,200,0.3));
  box-shadow: 0 0 22px rgba(0,180,255,0.3);
}

/* ============================================
   IN-GAME CAREER HUD STRIP
   ============================================ */

.career-mission-hud {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(4, 10, 28, 0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 11;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  overflow: hidden;
}

.career-hud-type {
  font-family: var(--font-hud);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--career-hud-color, #00e5ff);
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  flex-shrink: 0;
}

.career-hud-objective {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.career-hud-bonus {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,215,0,0.8);
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.career-hud-bonus.bonus-done { color: #44ff88; }

@media (max-width: 520px) {
  .cmc-stats { flex-wrap: wrap; }
  .cmc-stat { min-width: calc(50% - 5px); }
  .career-mission-hud { bottom: 60px; font-size: 11px; }
  .career-hud-bonus { display: none; }
}

/* Mobile: Karriere-Map kompakter */
@media (max-width: 600px) {
  .career-header {
    gap: 10px;
    padding: 12px;
  }
  .career-header-title {
    font-size: 15px;
  }
  .career-header-actions {
    min-width: 0;
    gap: 8px;
  }
  .career-next-btn {
    max-width: 126px;
    padding: 7px 9px;
    font-size: 9px;
  }
  .career-nodes-row {
    padding: 12px;
    gap: 4px;
  }
  .career-node {
    padding: 10px 6px;
  }
  .career-node-label {
    font-size: 9px;
  }
  .career-node-icon {
    font-size: 18px;
  }
  .career-node-lock,
  .career-node-medal {
    font-size: 8px;
  }
  .mission-preview-stats {
    flex-wrap: wrap;
  }
  .preview-stat {
    min-width: calc(50% - 6px);
  }
  .preview-build-row {
    flex-direction: column;
    gap: 2px;
  }
  .preview-build-row strong {
    text-align: left;
  }
}

/* ============================================
   RELIC SYSTEM
   ============================================ */

#relicHud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 175, 0, 0.22);
  margin-left: 4px;
}

#relicHud .hud-label {
  font-family: var(--font-hud, monospace);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: rgba(255, 175, 0, 0.55);
  text-transform: uppercase;
}

#relicSlots {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.relic-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(20, 12, 0, 0.85);
  border: 1px solid var(--relic-color, #ffa500);
  box-shadow: 0 0 8px color-mix(in srgb, var(--relic-color, #ffa500) 30%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: default;
  animation: relicReveal 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes relicReveal {
  from { transform: scale(0.6) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1)   rotate(0deg);  opacity: 1; }
}

.relic-choice-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.relic-choice-title {
  font-family: var(--font-hud, monospace);
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 18px #ffa500, 0 0 40px rgba(255, 165, 0, 0.45);
  animation: levelupPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  margin-bottom: 4px;
}

.relic-choice-sub {
  font-family: var(--font-ui, sans-serif);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim, #8899aa);
  margin-bottom: 24px;
}

.relic-cards-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.relic-card {
  position: relative;
  width: clamp(200px, 28vw, 260px);
  padding: 28px 22px 22px;
  border-radius: 16px;
  background: rgba(20, 10, 0, 0.95);
  border: 1px solid var(--relic-color, #ffa500);
  box-shadow: 0 0 14px color-mix(in srgb, var(--relic-color, #ffa500) 20%, transparent);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  animation: cardSlideIn 0.32s ease both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.relic-card:nth-child(1) { animation-delay: 0.06s; }
.relic-card:nth-child(2) { animation-delay: 0.14s; }

.relic-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 28px color-mix(in srgb, var(--relic-color, #ffa500) 55%, transparent),
              0 8px 32px rgba(0, 0, 0, 0.55);
}

.relic-card:active {
  transform: translateY(-2px) scale(0.99);
}

.relic-icon {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.4));
}

.relic-name {
  font-family: var(--font-hud, monospace);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.relic-desc {
  font-family: var(--font-ui, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim, #8899aa);
  max-width: 220px;
}

.relic-pick-label {
  margin-top: 6px;
  font-family: var(--font-hud, monospace);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 175, 0, 0.55);
}

@media (max-width: 768px) {
  .relic-cards-grid { gap: 12px; }
  .relic-card { width: clamp(180px, 42vw, 230px); padding: 22px 16px 18px; }
}

@media (max-width: 520px) {
  .relic-card { width: 85vw; }
  .relic-cards-grid { flex-direction: column; align-items: center; }
}
