/* NEONSTRIKE - Cyberpunk UI Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Share Tech Mono', monospace;
  color: #e0e0ff;
  cursor: crosshair;
}

#game-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#ui-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10;
  pointer-events: none;
}

#ui-container > * {
  pointer-events: auto;
}

/* Screens */
.ui-screen {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10,10,30,0.95) 0%, rgba(5,5,15,0.98) 100%);
}

/* Main Menu */
.menu-title-group { text-align: center; margin-bottom: 48px; }

.game-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #e0e0ff;
  text-shadow: 0 0 20px rgba(0,255,255,0.5), 0 0 60px rgba(0,255,255,0.2);
}

.title-accent {
  color: #00ffff;
  text-shadow: 0 0 30px rgba(0,255,255,0.8), 0 0 80px rgba(0,255,255,0.3);
}

.game-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  letter-spacing: 12px;
  color: #ff00ff;
  margin-top: 8px;
  text-shadow: 0 0 15px rgba(255,0,255,0.5);
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
}

.menu-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 14px 32px;
  border: 1px solid rgba(0,255,255,0.3);
  background: rgba(0,255,255,0.05);
  color: #aaccff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

.menu-btn:hover {
  background: rgba(0,255,255,0.15);
  border-color: rgba(0,255,255,0.6);
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0,255,255,0.5);
}

.menu-btn.primary {
  background: rgba(0,255,255,0.12);
  border-color: #00ffff;
  color: #00ffff;
}

.menu-btn.primary:hover {
  background: rgba(0,255,255,0.25);
  box-shadow: 0 0 20px rgba(0,255,255,0.3), inset 0 0 20px rgba(0,255,255,0.1);
}

.menu-footer {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.2);
}

/* Game Setup */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #00ffff;
  margin-bottom: 40px;
  text-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.setup-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 400px;
  margin-bottom: 40px;
}

.setup-group label {
  display: block;
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}

.option-row {
  display: flex;
  gap: 8px;
}

.opt-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
}

.opt-btn:hover {
  border-color: rgba(0,255,255,0.4);
  color: #aaddff;
}

.opt-btn.selected {
  border-color: #00ffff;
  background: rgba(0,255,255,0.1);
  color: #00ffff;
  text-shadow: 0 0 8px rgba(0,255,255,0.4);
}

/* Custom difficulty mixer */
#custom-diff-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  margin-top: 4px;
}
.custom-diff-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.cdiff-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  min-width: 80px;
  text-align: right;
}
.custom-diff-row .option-row {
  flex: 1;
}
.custom-diff-row .opt-btn {
  padding: 6px 12px;
  font-size: 11px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00ffff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,255,255,0.5);
}

.slider-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  color: #00ffff;
  min-width: 30px;
  text-align: center;
}

.setup-actions {
  display: flex;
  gap: 12px;
}

/* Loading */
.loading-screen { gap: 20px; }

.loading-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  letter-spacing: 6px;
  color: #00ffff;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-bar {
  width: 300px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.loading-fill {
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  animation: loadSlide 1.2s ease-in-out infinite;
}

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

@keyframes loadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* HUD */
.hud {
  width: 100%; height: 100%;
  pointer-events: none;
  position: relative;
}

.hud-top-left {
  position: absolute;
  top: 16px; left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-bar {
  width: 200px;
  height: 18px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.hp-bar .bar-fill {
  background: linear-gradient(90deg, #ff3366, #ff0044);
}

.shield-bar .bar-fill {
  background: linear-gradient(90deg, #0088ff, #00ccff);
}

.bar-label {
  position: absolute;
  top: 0; left: 6px;
  line-height: 18px;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

.hud-level {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  color: #00ffcc;
  letter-spacing: 2px;
}

.hud-top-center {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.match-timer {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.hud-top-right {
  position: absolute;
  top: 16px; right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Stat Cards ── */
.hud-stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  background: rgba(8, 8, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid currentColor;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  min-width: 120px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hud-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.hud-stat-icon svg {
  opacity: 0.85;
}

.hud-stat-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hud-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.hud-stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

/* ── Per-stat theming ── */
.hud-stat-kills {
  color: #ff00ff;
  border-left-color: #ff00ff;
  box-shadow: inset 0 0 20px rgba(255, 0, 255, 0.06), 0 0 12px rgba(255, 0, 255, 0.08);
}
.hud-stat-kills .hud-stat-icon { background: rgba(255, 0, 255, 0.1); }
.hud-stat-kills .hud-stat-value {
  color: #ff44ff;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.6), 0 0 25px rgba(255, 0, 255, 0.2);
}

.hud-stat-dmg {
  color: #ff6644;
  border-left-color: #ff6644;
  box-shadow: inset 0 0 20px rgba(255, 102, 68, 0.06), 0 0 12px rgba(255, 102, 68, 0.08);
}
.hud-stat-dmg .hud-stat-icon { background: rgba(255, 102, 68, 0.1); }
.hud-stat-dmg .hud-stat-value {
  color: #ff8866;
  text-shadow: 0 0 10px rgba(255, 102, 68, 0.6), 0 0 25px rgba(255, 102, 68, 0.2);
}

.hud-stat-coins {
  color: #ffcc00;
  border-left-color: #ffcc00;
  box-shadow: inset 0 0 20px rgba(255, 204, 0, 0.06), 0 0 12px rgba(255, 204, 0, 0.08);
}
.hud-stat-coins .hud-stat-icon { background: rgba(255, 204, 0, 0.1); }
.hud-stat-coins .hud-stat-value {
  color: #ffdd44;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.6), 0 0 25px rgba(255, 204, 0, 0.2);
}

.hud-stat-xp {
  color: #44ffaa;
  border-left-color: #44ffaa;
  box-shadow: inset 0 0 20px rgba(68, 255, 170, 0.06), 0 0 12px rgba(68, 255, 170, 0.08);
}
.hud-stat-xp .hud-stat-icon { background: rgba(68, 255, 170, 0.1); }
.hud-stat-xp .hud-stat-value {
  color: #66ffbb;
  text-shadow: 0 0 10px rgba(68, 255, 170, 0.6), 0 0 25px rgba(68, 255, 170, 0.2);
}

/* ── Punch animation on value change ── */
@keyframes statPunch {
  0% { transform: scale(1); filter: brightness(1); }
  15% { transform: scale(1.08); filter: brightness(1.6); }
  30% { transform: scale(0.97); filter: brightness(1.2); }
  50% { transform: scale(1.02); filter: brightness(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}

.hud-stat-punch {
  animation: statPunch 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hud-stat-punch .hud-stat-value {
  animation: statValueFlash 0.4s ease forwards;
}

@keyframes statValueFlash {
  0% { filter: brightness(1); }
  20% { filter: brightness(2.5) drop-shadow(0 0 6px currentColor); }
  100% { filter: brightness(1); }
}

/* Coin/XP popup on kill */
.coin-popup {
  position: absolute;
  top: 60px;
  right: 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.coin-popup-show {
  opacity: 1;
  transform: translateY(0);
}
.coin-popup-fade {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.5s ease, transform 0.5s ease !important;
}
.coin-popup-coins {
  color: #ffcc00;
  font-weight: bold;
}
.coin-popup-xp {
  color: #44ffaa;
  margin-left: 8px;
}

.hud-bottom-center {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.weapon-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,255,0.2);
}

.weapon-name {
  font-size: 12px;
  letter-spacing: 2px;
  color: #aaddff;
}

.weapon-tier {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: #00ffff;
  padding: 2px 8px;
  border: 1px solid rgba(0,255,255,0.3);
}

.hud-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: rgba(0,255,255,0.6);
  text-shadow: 0 0 8px rgba(0,255,255,0.3);
  pointer-events: none;
}

.hud-minimap {
  position: absolute;
  bottom: 28px;
  right: 16px;
  width: 144px;
  height: 144px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,255,255,0.2);
}

#minimap-canvas {
  width: 100%;
  height: 100%;
}

/* End Screen (legacy) */
.end-screen { gap: 24px; }

.end-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #00ffff;
  text-shadow: 0 0 30px rgba(0,255,255,0.5);
}

.end-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
  margin: 20px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  letter-spacing: 1px;
}

.stat-row span:last-child {
  color: #00ffff;
  font-family: 'Orbitron', sans-serif;
}

/* ── Phase 6.2: Full End Screen ───────────────────────── */
.end-screen-62 {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(5, 5, 20, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 30px 20px 60px;
  z-index: 100;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,255,0.3) transparent;
}

/* ── Rank Header ── */
.rank-header {
  text-align: center;
  padding: 20px 40px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.4);
  border-radius: 4px;
  min-width: 400px;
}

.rank-big-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: 8px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.rank-subtitle {
  font-size: 14px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}

.rank-score {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.7);
}

/* Rank color variants */
.rank-1st {
  border-color: rgba(0,255,255,0.5);
  box-shadow: 0 0 40px rgba(0,255,255,0.15), inset 0 0 40px rgba(0,255,255,0.05);
}
.rank-1st .rank-big-text {
  color: #00ffff;
  text-shadow: 0 0 30px rgba(0,255,255,0.6), 0 0 60px rgba(0,255,255,0.3);
}
.rank-1st .rank-score { color: #00ffff; }

.rank-2nd {
  border-color: rgba(200,200,255,0.3);
  box-shadow: 0 0 30px rgba(200,200,255,0.1);
}
.rank-2nd .rank-big-text {
  color: #c8c8ff;
  text-shadow: 0 0 20px rgba(200,200,255,0.4);
}

.rank-3rd {
  border-color: rgba(255,170,50,0.3);
  box-shadow: 0 0 25px rgba(255,170,50,0.1);
}
.rank-3rd .rank-big-text {
  color: #ffaa32;
  text-shadow: 0 0 20px rgba(255,170,50,0.4);
}

.rank-other .rank-big-text {
  color: rgba(255,255,255,0.6);
  text-shadow: 0 0 10px rgba(255,255,255,0.2);
  font-size: 40px;
}

/* ── Section labels ── */
.section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
  text-align: center;
}

/* ── Leaderboard ── */
.lb-section {
  width: 100%;
  max-width: 750px;
}

.lb-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  letter-spacing: 1px;
}

.lb-table thead th {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
}

.lb-table thead th:nth-child(2) { text-align: left; }

.lb-table td {
  padding: 7px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.lb-table td:nth-child(2) { text-align: left; }

.lb-row { background: rgba(255,255,255,0.02); }
.lb-row:hover { background: rgba(255,255,255,0.05); }

.lb-player {
  background: rgba(0,255,255,0.08) !important;
  border-left: 3px solid #00ffff;
}
.lb-player td { color: #00ffff; }

.lb-top3 { background: rgba(255,255,255,0.04); }

.lb-rank-1 .lb-rank { color: #00ffff; font-weight: 700; }
.lb-rank-2 .lb-rank { color: #c8c8ff; font-weight: 700; }
.lb-rank-3 .lb-rank { color: #ffaa32; font-weight: 700; }

.lb-rank {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  min-width: 40px;
}

.lb-name {
  font-weight: 700;
  letter-spacing: 2px;
}

.lb-score {
  font-family: 'Orbitron', sans-serif;
  color: #00ffff;
}

/* ── Bottom row: Advanced + Radar side by side ── */
.end-bottom-row {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 750px;
  align-items: flex-start;
}

@media (max-width: 700px) {
  .end-bottom-row { flex-direction: column; align-items: center; }
}

/* ── Advanced Stats ── */
.adv-section {
  flex: 1;
  min-width: 280px;
}

.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.adv-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.adv-label { color: rgba(255,255,255,0.5); }
.adv-val {
  color: #00ffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
}

/* ── Radar Chart ── */
.radar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 280px;
}

#radar-chart-canvas {
  display: block;
}

.radar-legend {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-player { background: rgba(0,255,255,0.8); }
.legend-avg { background: rgba(255,255,255,0.25); }

/* Return button in end screen */
.end-screen-62 .menu-btn.primary {
  margin-top: 10px;
}

.placeholder-text {
  color: rgba(255,255,255,0.3);
  margin-bottom: 24px;
  letter-spacing: 2px;
}

/* ── Customization Screen ──────────────────────────────── */
.customize-screen {
  overflow-y: auto;
  padding: 40px 0;
}

.customize-scroll {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 480px;
  max-width: 92vw;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 8px;
}

.customize-scroll::-webkit-scrollbar { width: 4px; }
.customize-scroll::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.2); border-radius: 2px; }

.customize-section {
  border: 1px solid rgba(0,255,255,0.1);
  padding: 16px 20px;
  background: rgba(0,255,255,0.02);
}

.customize-section label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.customize-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-card, .acc-card {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 1px;
  text-align: center;
  min-width: 80px;
}

.style-card:hover, .acc-card:hover {
  border-color: rgba(0,255,255,0.4);
  color: #aaddff;
  background: rgba(0,255,255,0.06);
}

.style-card.selected, .acc-card.selected {
  border-color: #00ffff;
  background: rgba(0,255,255,0.12);
  color: #00ffff;
  text-shadow: 0 0 8px rgba(0,255,255,0.4);
  box-shadow: 0 0 12px rgba(0,255,255,0.15), inset 0 0 12px rgba(0,255,255,0.05);
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.color-swatch:hover {
  border-color: rgba(0,255,255,0.5);
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0,255,255,0.5), 0 0 20px rgba(0,255,255,0.2);
  transform: scale(1.2);
}

/* Dash Indicator */
.hud-dash {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #44ff88;
  margin-top: 4px;
}

/* ── XP Bar (bottom, full-width RPG style) ──────────────── */
.hud-xp-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.xp-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.65);
  border-top: 1px solid rgba(68, 255, 170, 0.15);
}

.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00cc66, #44ffaa, #00ffcc);
  box-shadow: 0 0 8px rgba(68, 255, 170, 0.4), 0 0 20px rgba(68, 255, 170, 0.15);
  transition: width 0.4s ease;
}

.xp-bar-label {
  position: relative;
  z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(68, 255, 170, 0.8);
  text-shadow: 0 0 6px rgba(68, 255, 170, 0.3), 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* ── Level-Up Popup (top banner, MLBB kill notification style) ── */
.level-up-popup {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #44ffaa;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,40,30,0.85) 15%, rgba(0,50,35,0.9) 50%, rgba(0,40,30,0.85) 85%, rgba(0,0,0,0) 100%);
  padding: 8px 40px;
  border-top: 1px solid rgba(68,255,170,0.4);
  border-bottom: 1px solid rgba(68,255,170,0.4);
  text-shadow: 0 0 12px rgba(68, 255, 170, 0.6), 0 0 30px rgba(68, 255, 170, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
}
.level-up-popup .level-up-num {
  color: #00ffcc;
  margin-left: 8px;
}
.level-up-popup.level-up-show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.level-up-popup.level-up-fade {
  opacity: 0 !important;
  transform: translateX(-50%) scale(1) translateY(-8px) !important;
  transition: opacity 0.6s ease, transform 0.6s ease !important;
}

/* Controls Hint */
.hud-bottom-left {
  position: absolute;
  bottom: 30px;
  left: 16px;
}

.controls-hint {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
}

/* ── 3.3: Loot Box Interaction Prompt ─────────────────── */
.hud-interact-prompt {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 6px;
  padding: 10px 24px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: #eee;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  animation: interact-prompt-in 0.2s ease-out;
}

@keyframes interact-prompt-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Graphics Settings Screen ──────────────────────────── */
.settings-screen {
  overflow-y: auto;
  padding: 32px 0;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 440px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.settings-panel::-webkit-scrollbar {
  width: 4px;
}
.settings-panel::-webkit-scrollbar-thumb {
  background: rgba(0,255,255,0.2);
  border-radius: 2px;
}

.settings-section {
  border: 1px solid rgba(0,255,255,0.1);
  padding: 16px 20px;
  background: rgba(0,255,255,0.02);
}

.settings-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  color: #00ffff;
  margin-bottom: 16px;
  text-shadow: 0 0 8px rgba(0,255,255,0.3);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 16px;
}

.setting-row label {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  min-width: 140px;
}

.setting-val {
  color: #00ffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  margin-left: 6px;
}

.setting-row .slider-row {
  flex: 1;
  min-width: 120px;
}

.setting-row .option-row {
  display: flex;
  gap: 4px;
  flex: 1;
}

.setting-row .opt-btn {
  font-size: 10px;
  padding: 6px 10px;
  letter-spacing: 1px;
}

/* Toggle Switch */
.toggle-switch {
  width: 44px;
  height: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch .toggle-knob {
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.2s ease;
}

.toggle-switch.active {
  background: rgba(0,255,255,0.15);
  border-color: #00ffff;
}

.toggle-switch.active .toggle-knob {
  left: 24px;
  background: #00ffff;
  box-shadow: 0 0 8px rgba(0,255,255,0.5);
}

/* ── ESC / Pause Menu Overlay ──────────────────────────── */
.pause-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 20, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}

.pause-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  padding: 36px 40px;
  background: rgba(10, 10, 30, 0.85);
  border: 1px solid rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.05), inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.pause-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #00ffff;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
  margin-bottom: 24px;
}

.pause-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  padding: 12px 32px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

.pause-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.4);
  color: #00ffff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.pause-btn.resume {
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.08);
  color: #00ffff;
}

.pause-btn.resume:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.pause-btn.exit-btn {
  border-color: rgba(255, 50, 80, 0.3);
  color: rgba(255, 50, 80, 0.6);
}

.pause-btn.exit-btn:hover {
  background: rgba(255, 50, 80, 0.1);
  border-color: rgba(255, 50, 80, 0.6);
  color: #ff3250;
  text-shadow: 0 0 8px rgba(255, 50, 80, 0.4);
}

.pause-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 0;
}

/* Restart sub-options */
.restart-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.15s ease;
}

.restart-sub.open {
  max-height: 120px;
  opacity: 1;
}

.restart-sub .pause-btn {
  font-size: 10px;
  padding: 10px 24px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Death Overlay ──────────────────────────────────────── */
.death-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 0, 0, 0.55);
  pointer-events: none;
  animation: deathFadeIn 0.4s ease-out;
}

@keyframes deathFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.death-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #ff2244;
  text-shadow: 0 0 30px rgba(255, 34, 68, 0.6), 0 0 80px rgba(255, 34, 68, 0.2);
  margin-bottom: 12px;
}

.death-killer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 16px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.death-countdown {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00ffff;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

/* ── Kill Feed ──────────────────────────────────────────── */
.kill-feed {
  position: absolute;
  top: 210px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  z-index: 30;
}

.kill-feed-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.55);
  border-left: 2px solid #ff00ff;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  animation: killFeedSlide 0.25s ease-out;
  transition: opacity 0.4s ease;
}

.kill-feed-entry .kf-killer {
  color: #00ffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
}

.kill-feed-entry .kf-icon {
  color: #ff00ff;
  font-size: 10px;
}

.kill-feed-entry .kf-victim {
  color: #ff6666;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
}

.kill-feed-entry.kf-player-kill {
  border-left-color: #00ffff;
  background: rgba(0, 255, 255, 0.08);
}

.kill-feed-entry.kf-player-death {
  border-left-color: #ff2244;
  background: rgba(255, 34, 68, 0.08);
}

@keyframes killFeedSlide {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Kill Notification (center screen) ──────────────────── */
.kill-notification {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 50;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.kill-notification.kill-notif-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: killNotifEntrance 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.kill-notification.kill-notif-hide {
  animation: killNotifExit 0.5s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes killNotifEntrance {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8);
    filter: blur(8px) brightness(3);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.95);
    filter: blur(0px) brightness(1.5);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.03);
    filter: blur(0px) brightness(1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0px) brightness(1);
  }
}

@keyframes killNotifExit {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.85);
    filter: blur(4px);
  }
}

.kill-notif-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.kill-notif-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #00ffff;
  text-shadow:
    0 0 20px rgba(0, 255, 255, 0.7),
    0 0 60px rgba(0, 255, 255, 0.3),
    0 0 100px rgba(0, 255, 255, 0.1);
  white-space: nowrap;
}

.kill-notif-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 255, 0.6) 50%, transparent 100%);
  animation: killNotifLineExpand 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes killNotifLineExpand {
  from { width: 0; opacity: 0; }
  to { width: 120px; opacity: 1; }
}

/* ── Low HP Overlay (Apex-style vignette) ───────────────── */
.low-hp-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(ellipse at center,
    transparent 40%,
    rgba(180, 0, 0, 0.15) 60%,
    rgba(140, 0, 0, 0.45) 80%,
    rgba(100, 0, 0, 0.7) 100%
  );
}

.low-hp-overlay.low-hp-active {
  animation: lowHpPulse 1.2s ease-in-out infinite;
}

@keyframes lowHpPulse {
  0%, 100% {
    background: radial-gradient(ellipse at center,
      transparent 40%,
      rgba(180, 0, 0, 0.12) 60%,
      rgba(140, 0, 0, 0.35) 80%,
      rgba(100, 0, 0, 0.6) 100%
    );
  }
  50% {
    background: radial-gradient(ellipse at center,
      transparent 30%,
      rgba(200, 0, 0, 0.2) 55%,
      rgba(160, 0, 0, 0.55) 75%,
      rgba(120, 0, 0, 0.85) 100%
    );
  }
}

/* ── 3.5a: Shop Overlay ──────────────────────────────────────────── */
.shop-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 20, 0.55);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.shop-panel {
  background: rgba(10, 10, 30, 0.92);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 8px;
  padding: 20px 24px;
  min-width: 620px;
  max-width: 750px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.08), inset 0 0 60px rgba(0, 255, 255, 0.03);
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
}

.shop-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  letter-spacing: 3px;
}

.shop-coins {
  font-size: 16px;
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.shop-close-hint {
  font-size: 11px;
  color: #888;
}

.shop-columns {
  display: flex;
  gap: 16px;
}

.shop-col {
  flex: 1;
  min-width: 180px;
}

.shop-col-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: rgba(255, 255, 255, 0.02);
}

.shop-item:hover:not(.shop-disabled) {
  background: rgba(0, 255, 255, 0.08);
  border-color: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.1);
}

.shop-item.shop-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.shop-item-name {
  font-size: 12px;
  font-weight: 600;
}

.shop-item-price {
  font-size: 11px;
  color: #ffcc00;
}

.shop-status {
  font-size: 11px;
  color: #aaa;
  line-height: 1.6;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.shop-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 10px;
  color: #ff6644;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.shop-feedback {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  animation: shopFeedbackPulse 0.3s ease;
}

@keyframes shopFeedbackPulse {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════
   3.5b: NEON SHOP — Full Visual Overhaul
   All classes use shop-v2- prefix to avoid conflicts with 3.5a
   ══════════════════════════════════════════════════════════════════ */

/* ── Overlay & Panel ── */
.shop-v2-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 15, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  animation: shop-v2-fadeIn 150ms ease-out;
}

@keyframes shop-v2-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.shop-v2-panel {
  background: rgba(8, 8, 24, 0.94);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 6px;
  padding: 20px 24px;
  width: 920px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 40px rgba(0, 255, 255, 0.06),
    0 0 120px rgba(0, 255, 255, 0.03),
    inset 0 0 60px rgba(0, 0, 0, 0.4);
}

/* ── Header ── */
.shop-v2-header {
  display: flex;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.12);
  gap: 16px;
}

.shop-v2-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #00ffff;
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.2);
  flex-shrink: 0;
}

.shop-v2-header-coins {
  margin-left: auto;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
  letter-spacing: 2px;
}

.shop-v2-close-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.shop-v2-coin-icon {
  color: #ffcc00;
  font-size: 0.9em;
}

/* ── Columns ── */
.shop-v2-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.shop-v2-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shop-v2-col-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.shop-v2-col-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.shop-v2-col-scroll::-webkit-scrollbar { width: 3px; }
.shop-v2-col-scroll::-webkit-scrollbar-thumb { background: rgba(0, 255, 255, 0.15); border-radius: 2px; }

/* ── Card Base ── */
.shop-v2-card {
  position: relative;
  display: flex;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: all 200ms ease;
  overflow: hidden;
  animation: shop-v2-cardIn 200ms ease-out backwards;
  animation-delay: calc(var(--card-idx, 0) * 40ms);
}

@keyframes shop-v2-cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.shop-v2-card:hover:not(.shop-v2-card-disabled) {
  background: rgba(var(--tier-r, 0), var(--tier-g, 255), var(--tier-b, 255), 0.06);
  border-color: var(--tier-color, rgba(0, 255, 255, 0.3));
  box-shadow:
    0 0 12px color-mix(in srgb, var(--tier-color, #00ffff) 30%, transparent),
    0 0 30px color-mix(in srgb, var(--tier-color, #00ffff) 10%, transparent),
    inset 0 0 20px rgba(0, 0, 0, 0.2);
  transform: translateX(2px);
}

/* Neon border stripe on left */
.shop-v2-card-border {
  width: 3px;
  flex-shrink: 0;
  background: var(--tier-color, #00ffff);
  border-radius: 4px 0 0 4px;
  transition: box-shadow 200ms ease, width 200ms ease;
}

.shop-v2-card:hover:not(.shop-v2-card-disabled) .shop-v2-card-border {
  width: 4px;
  box-shadow: 0 0 8px var(--tier-color, #00ffff), 0 0 16px var(--tier-color, #00ffff);
}

.shop-v2-card-body {
  flex: 1;
  padding: 8px 10px;
  min-width: 0;
  position: relative;
}

/* Scanline pseudo-element */
.shop-v2-scanline {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 2px,
    rgba(255, 255, 255, 0.015) 4px
  );
  z-index: 1;
  border-radius: 4px;
}

/* Disabled / dim states */
.shop-v2-card-disabled {
  cursor: default;
  pointer-events: none;
}

.shop-v2-dim {
  opacity: 0.35;
}

/* Flash on purchase */
.shop-v2-card-flash {
  animation: shop-v2-flash 250ms ease-out;
}

@keyframes shop-v2-flash {
  0% { background: rgba(68, 255, 136, 0.3); }
  100% { background: rgba(255, 255, 255, 0.025); }
}

/* ── Card Header & Name ── */
.shop-v2-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.shop-v2-wname {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #dde0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-v2-tier-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 2px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* ── Stats Row ── */
.shop-v2-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.shop-v2-stat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.shop-v2-stat em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.75);
  margin-left: 2px;
}

/* ── Special Badge ── */
.shop-v2-special-row {
  margin-bottom: 4px;
}

.shop-v2-special-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ff00ff;
  padding: 1px 6px;
  border: 1px solid rgba(255, 0, 255, 0.35);
  border-radius: 2px;
  background: rgba(255, 0, 255, 0.08);
  text-shadow: 0 0 6px rgba(255, 0, 255, 0.4);
}

/* ── Card Footer & Price ── */
.shop-v2-card-footer {
  display: flex;
  justify-content: flex-end;
}

.shop-v2-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffcc00;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255, 204, 0, 0.3);
}

/* ── Equipped / Locked Badges ── */
.shop-v2-badge {
  position: absolute;
  top: 6px; right: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 2;
}

.shop-v2-badge-equipped {
  color: #44ff88;
  background: rgba(68, 255, 136, 0.12);
  border: 1px solid rgba(68, 255, 136, 0.35);
  text-shadow: 0 0 6px rgba(68, 255, 136, 0.4);
}

.shop-v2-badge-locked {
  color: #ff6644;
  background: rgba(255, 102, 68, 0.12);
  border: 1px solid rgba(255, 102, 68, 0.35);
  text-shadow: 0 0 6px rgba(255, 102, 68, 0.4);
}

/* ── Hover Compare Tooltip ── */
.shop-v2-compare {
  margin-top: 6px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 3px;
  animation: shop-v2-cmpIn 150ms ease-out;
}

@keyframes shop-v2-cmpIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.shop-v2-cmp-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 7px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 3px;
}

.shop-v2-cmp-row {
  display: flex;
  gap: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

.shop-v2-cmp-better { color: #44ff88; font-weight: bold; }
.shop-v2-cmp-worse { color: #ff4444; font-weight: bold; }
.shop-v2-cmp-neutral { color: #888; }

/* ── Sell Card ── */
.shop-v2-card-sell {
  border-color: rgba(255, 68, 68, 0.15);
  background: rgba(255, 50, 50, 0.04);
}

.shop-v2-card-sell:hover {
  background: rgba(255, 50, 50, 0.1) !important;
  border-color: rgba(255, 68, 68, 0.4) !important;
}

/* ── Shield Icon ── */
.shop-v2-shield-icon {
  color: #44aaff;
  font-size: 10px;
  margin-right: 4px;
}

/* ── Player Status Card ── */
.shop-v2-card-status {
  cursor: default;
  margin-top: 8px;
}

.shop-v2-status-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shop-v2-status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.shop-v2-status-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 2px;
}

.shop-v2-status-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
}

/* ── Perks Placeholder ── */
.shop-v2-perks-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0.4;
}

.shop-v2-lock-icon {
  font-size: 28px;
  filter: grayscale(1);
}

.shop-v2-coming-soon {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #aaa;
}

.shop-v2-perks-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #666;
  text-align: center;
  letter-spacing: 1px;
}

/* ── Footer ── */
.shop-v2-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #ff6644;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Feedback ── */
.shop-v2-feedback {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 8px;
  animation: shopFeedbackPulse 0.3s ease;
}

/* ── 4.1: Perk Cards ── */
.shop-v2-perk-slots {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #888;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-v2-card-perk .shop-v2-card-body {
  padding: 8px 10px;
}

.shop-v2-perk-category {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.7;
}

.shop-v2-perk-desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: #aaa;
  letter-spacing: 0.5px;
  margin-top: 4px;
  line-height: 1.3;
}

.shop-v2-perk-dots {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.shop-v2-perk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--dot-color, #888);
  background: transparent;
  transition: background 0.2s ease;
}

.shop-v2-perk-dot.filled {
  background: var(--dot-color, #888);
  box-shadow: 0 0 4px var(--dot-color, #888);
}

.shop-v2-card-perk-owned {
  border-left: 2px solid var(--tier-color, #888);
}

/* ── Perk Row (card + sell button side by side) ── */
.shop-v2-perk-row {
  display: flex;
  gap: 4px;
  animation: shopCardSlideIn 0.3s ease backwards;
  animation-delay: calc(var(--card-idx, 0) * 0.04s);
}

.shop-v2-perk-row .shop-v2-card-perk {
  animation: none;
}

.shop-v2-card-perk-sell {
  width: 52px;
  min-width: 52px;
  position: relative;
  border: 1px solid rgba(255, 68, 68, 0.15);
  border-radius: 4px;
  background: rgba(255, 50, 50, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  overflow: hidden;
}

.shop-v2-card-perk-sell .shop-v2-card-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
}

.shop-v2-card-perk-sell .shop-v2-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px;
}

.shop-v2-card-perk-sell:hover {
  background: rgba(255, 50, 50, 0.12);
  border-color: rgba(255, 68, 68, 0.4);
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.15);
}

.shop-v2-perk-sell-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #ff6644;
  letter-spacing: 2px;
}

.shop-v2-perk-sell-price {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: #44ff88;
  white-space: nowrap;
}

.shop-v2-badge-perk-owned {
  position: absolute;
  top: 4px;
  left: 10px;
  right: auto;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 2px 5px;
  border: 1px solid var(--tier-color, #44ff88);
  color: var(--tier-color, #44ff88);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.5);
}

/* Push generic badges (MAX, NO SLOT) down on perk cards so they don't overlap rarity tag */
.shop-v2-card-perk .shop-v2-badge {
  top: 4px;
  right: auto;
  left: 10px;
}

.shop-v2-upgrade-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: #ffcc44;
  letter-spacing: 1px;
  margin-left: 4px;
  border: 1px solid #ffcc44;
  padding: 1px 4px;
  border-radius: 2px;
}

/* ── NPC Debug Panel in Shop ── */
.shop-v2-debug-section {
  margin-top: 10px;
  border-top: 1px solid rgba(255,0,255,0.2);
  padding-top: 8px;
}
.shop-v2-debug-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ff44ff;
  text-shadow: 0 0 8px rgba(255,68,255,0.4);
  margin-bottom: 6px;
}
.shop-v2-debug-npc {
  background: rgba(255,0,255,0.04);
  border: 1px solid rgba(255,0,255,0.12);
  border-radius: 3px;
  padding: 6px 8px;
  margin-bottom: 5px;
}
.shop-v2-debug-npc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.shop-v2-debug-npc-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ff88ff;
}
.shop-v2-debug-npc-diff {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.15);
  color: #aaa;
}
.shop-v2-debug-npc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}
.shop-v2-debug-stat {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}
.shop-v2-debug-stat em {
  font-style: normal;
  color: rgba(255,255,255,0.8);
  margin-left: 2px;
}
.shop-v2-debug-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
.shop-v2-debug-perk-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 7px;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid;
  background: rgba(0,0,0,0.3);
}
.shop-v2-debug-no-perks {
  font-family: 'Share Tech Mono', monospace;
  font-size: 7px;
  color: #555;
  font-style: italic;
  letter-spacing: 0.5px;
}
