/**
 * BEATLANE II: OVERDRIVE — Master AAA Cyber-Telemetry Design System
 * Follows ui-ux-pro-max & Golden Rules:
 * - Semantic theme tokens (--v2-primary, --v2-secondary, --v2-bg-deep)
 * - Minimum 44x44px touch targets
 * - High-contrast dark mode glassmorphism with 85-92% scrim legibility
 * - Zero layout-shifting transforms on button press
 */

:root {
  --v2-primary: #00f3ff;
  --v2-secondary: #ff2a85;
  --v2-gold: #ffb800;
  --v2-emerald: #00ff9d;
  --v2-crimson: #ff1e42;
  --v2-bg-deep: #050714;
  --v2-surface: rgba(10, 15, 36, 0.86);
  --v2-surface-strong: rgba(8, 12, 30, 0.94);
  --v2-border: rgba(0, 243, 255, 0.28);
  --v2-text: #f8fafc;
  --v2-text-muted: #94a3b8;
  --v2-hud-scale: 1;
  --font-display: 'Orbitron', system-ui, -apple-system, sans-serif;
  --font-body: 'Rajdhani', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--v2-bg-deep);
  color: var(--v2-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#horizon-canvas {
  z-index: 1;
  pointer-events: none;
}

#stage-canvas {
  z-index: 2;
}

.hidden {
  display: none !important;
}

#damage-flash {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background: radial-gradient(circle, transparent 45%, rgba(255, 30, 66, 0.55) 100%);
  opacity: 0;
  transition: opacity 150ms ease;
}

#damage-flash.active {
  opacity: 1;
}

/* ==========================================
   CINEMA OPTICS, 21:9 LETTERBOX & COMMS HUD
   ========================================== */
.v2-cinema-optics {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 55%, rgba(2, 4, 14, 0.52) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.016) 0px,
      rgba(255, 255, 255, 0.016) 1px,
      transparent 1px,
      transparent 3px
    );
}

.v2-cinematic-layer {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.v2-cinema-bar {
  width: 100%;
  height: 7.5vh;
  background: rgba(3, 5, 14, 0.96);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.v2-cinema-bar-top {
  border-bottom: 1px solid rgba(0, 243, 255, 0.38);
  transform: translateY(-102%);
}

.v2-cinema-bar-bot {
  border-top: 1px solid rgba(0, 243, 255, 0.38);
  transform: translateY(102%);
}

.v2-cinematic-layer.active .v2-cinema-bar-top,
.v2-cinematic-layer.active .v2-cinema-bar-bot {
  transform: translateY(0%);
}

.v2-cinema-banner {
  margin-top: 13vh;
  margin-bottom: auto;
  padding: 14px 36px;
  min-width: min(640px, 92vw);
  text-align: center;
  background: linear-gradient(
    90deg,
    rgba(4, 7, 20, 0.1) 0%,
    rgba(4, 7, 20, 0.92) 18%,
    rgba(4, 7, 20, 0.92) 82%,
    rgba(4, 7, 20, 0.1) 100%
  );
  border-top: 2px solid var(--cinema-accent, var(--v2-primary));
  border-bottom: 2px solid var(--cinema-accent, var(--v2-primary));
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.75);
  animation: v2CinemaSlideIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes v2CinemaSlideIn {
  from {
    opacity: 0;
    transform: scaleX(0.85);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.v2-cinema-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--cinema-accent, var(--v2-primary));
}

.v2-cinema-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-shadow: 0 0 22px var(--cinema-accent, var(--v2-primary));
  margin: 2px 0;
}

.v2-cinema-sub {
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Holographic Cockpit Comms Transmission */
.v2-comms-box {
  position: fixed;
  top: 84px;
  left: 20px;
  z-index: 42;
  max-width: min(460px, 90vw);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(6, 10, 26, 0.92);
  border: 1px solid var(--comms-color, var(--v2-primary));
  border-left: 4px solid var(--comms-color, var(--v2-primary));
  border-radius: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  animation: v2CommsIn 260ms ease-out;
}

@keyframes v2CommsIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.v2-comms-avatar {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--comms-color, var(--v2-primary));
  border-radius: 8px;
}

.v2-comms-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.v2-comms-header strong {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--comms-color, var(--v2-primary));
}

.v2-comms-header span {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--v2-text-muted);
}

.v2-comms-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.3;
}

.v2-hud-layer.v2-hud-minimal {
  opacity: 0.08;
  transition: opacity 250ms ease;
}

/* ==========================================
   COMMAND DECK (MAIN MENU)
   ========================================== */
.v2-screen-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 16px) 24px env(safe-area-inset-bottom, 16px);
  pointer-events: none;
}

.v2-topbar,
.v2-glass-card,
.v2-launch-row,
.v2-bottom-dock {
  pointer-events: auto;
}

.v2-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.v2-brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v2-brand-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.v2-brand-title span {
  color: var(--v2-primary);
}

.v2-brand-sub {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--v2-text-muted);
  font-weight: 700;
}

.v2-pilot-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.v2-rank-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--v2-primary);
  background: rgba(15, 23, 42, 0.85);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
}

.v2-level-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-level-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--v2-primary);
}

.v2-level-track {
  width: 110px;
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.v2-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--v2-primary), var(--v2-secondary));
}

.v2-currency-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-currency-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
}

.v2-icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--v2-border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--v2-text);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.v2-icon-btn:hover {
  background: rgba(0, 243, 255, 0.16);
  border-color: var(--v2-primary);
}

/* ==========================================
   HERO 3-COLUMN STAGE
   ========================================== */
.v2-hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr 350px;
  gap: 20px;
  align-items: center;
  margin: auto 0;
}

.v2-glass-card {
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.v2-card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--v2-primary);
  margin-bottom: 12px;
}

.v2-loadout-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.v2-ship-preview-box {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 243, 255, 0.14), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--v2-border);
  border-radius: 12px;
}

.v2-loadout-meta h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.v2-role-tag {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--v2-text-muted);
  font-weight: 600;
}

.v2-ult-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--v2-gold);
  background: rgba(15, 23, 42, 0.85);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.v2-stat-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.v2-stat-mini-grid > div {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.v2-stat-mini-grid span {
  font-size: 0.72rem;
  color: var(--v2-text-muted);
  font-weight: 700;
}

.v2-stat-mini-grid strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #ffffff;
}

/* Center CTA Banner */
.v2-center-stage-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  min-height: 360px;
}

.v2-stage-banner {
  background: rgba(6, 10, 26, 0.82);
  border: 1px solid var(--v2-border);
  border-radius: 14px;
  padding: 16px 24px;
  backdrop-filter: blur(10px);
  max-width: 560px;
}

.v2-sector-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--v2-primary);
}

.v2-stage-headline {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  margin: 4px 0 8px;
  text-shadow: 0 0 18px rgba(0, 243, 255, 0.35);
}

.v2-stage-mechanic {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.v2-stage-meta-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.v2-stage-meta-pills span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.8rem;
  font-weight: 700;
}

.v2-diff-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.v2-diff-pill {
  min-height: 36px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--diff-col, var(--v2-primary));
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.v2-diff-pill.active {
  background: var(--diff-col, var(--v2-primary));
  color: #040814;
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.35);
}

.v2-launch-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

/* Arcade Mode List */
.v2-arcade-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2-arcade-btn {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  color: var(--v2-text);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.v2-arcade-btn:hover {
  background: rgba(0, 243, 255, 0.14);
  border-color: var(--v2-primary);
}

.v2-arcade-btn strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.84rem;
}

.v2-arcade-btn span {
  font-size: 0.78rem;
  color: var(--v2-text-muted);
}

/* ==========================================
   BOTTOM DOCK
   ========================================== */
.v2-bottom-dock {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.v2-dock-btn {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-border);
  border-radius: 10px;
  color: var(--v2-text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.v2-dock-btn:hover {
  background: rgba(0, 243, 255, 0.18);
  border-color: var(--v2-primary);
}

.v2-badge {
  position: absolute;
  top: -6px;
  right: 10px;
  background: var(--v2-secondary);
  color: #ffffff;
  font-style: normal;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ==========================================
   BUTTONS
   ========================================== */
.v2-btn {
  min-height: 44px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 150ms ease, background 150ms ease, border-color 150ms ease;
}

.v2-btn-sm {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 0.76rem;
}

.v2-w-full {
  width: 100%;
}

.v2-btn-primary {
  background: linear-gradient(135deg, var(--v2-primary), #0284c7);
  color: #040814;
  border-color: #ffffff;
}

.v2-btn-launch {
  font-size: 1.05rem;
  padding: 14px 28px;
  box-shadow: 0 0 26px rgba(0, 243, 255, 0.45);
}

.v2-btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--v2-text);
  border-color: var(--v2-border);
}

.v2-btn-gold {
  background: linear-gradient(135deg, #ffb800, #d97706);
  color: #090602;
}

.v2-btn-equipped {
  background: rgba(0, 255, 157, 0.18);
  color: var(--v2-emerald);
  border-color: var(--v2-emerald);
}

.v2-btn-danger {
  background: rgba(255, 30, 66, 0.2);
  color: #fda4af;
  border-color: var(--v2-crimson);
}

.v2-btn-disabled {
  background: rgba(30, 41, 59, 0.65);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.3);
  cursor: not-allowed;
}

/* ==========================================
   MODAL OVERLAYS
   ========================================== */
.v2-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(4, 6, 18, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
}

.v2-modal-shell {
  width: min(1260px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.v2-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.v2-modal-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.v2-modal-header p {
  color: var(--v2-text-muted);
  font-size: 0.92rem;
}

.v2-tab-pills {
  display: flex;
  gap: 8px;
}

.v2-tab-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: var(--v2-text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.v2-tab-btn.active {
  background: rgba(0, 243, 255, 0.2);
  color: #ffffff;
  border-color: var(--v2-primary);
}

/* Grids & Cards inside Modals */
.v2-stage-grid,
.v2-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.v2-stage-card,
.v2-item-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.v2-stage-card.unlocked {
  border-color: var(--stage-accent, var(--v2-primary));
}

.v2-item-card.equipped {
  border-color: var(--v2-emerald);
  box-shadow: inset 0 0 18px rgba(0, 255, 157, 0.12);
}

.v2-stage-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v2-sector-pill {
  font-family: var(--font-display);
  font-size: 0.68rem;
  color: var(--v2-primary);
  font-weight: 800;
}

.v2-mechanic-box {
  background: rgba(6, 10, 26, 0.75);
  border-left: 3px solid var(--stage-accent, var(--v2-primary));
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.v2-stage-stats-row,
.v2-ship-stats-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: 0.78rem;
  color: var(--v2-text-muted);
}

.v2-mutator-bar {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
}

.v2-mutator-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--v2-gold);
  margin-bottom: 10px;
}

.v2-mutator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.v2-mutator-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(6, 10, 26, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--v2-text);
  text-align: left;
  cursor: pointer;
}

.v2-mutator-chip.active {
  border-color: var(--v2-gold);
  background: rgba(255, 184, 0, 0.15);
}

.v2-mutator-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
}

.v2-mutator-chip span {
  font-size: 0.74rem;
  color: var(--v2-text-muted);
}

/* Neural Matrix Skill Tree */
.v2-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-matrix-branch {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--branch-color);
  border-radius: 12px;
  padding: 14px;
}

.v2-branch-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--branch-color);
  margin-bottom: 10px;
}

.v2-matrix-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
}

.v2-matrix-connector {
  width: 24px;
  align-self: center;
  height: 3px;
  background: var(--branch-color);
  opacity: 0.45;
  flex-shrink: 0;
}

.v2-skill-node {
  flex: 1;
  min-width: 195px;
  background: rgba(6, 10, 26, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.v2-skill-node.active,
.v2-skill-node.maxed {
  border-color: var(--branch-color);
}

.v2-skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
}

.v2-skill-node h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.v2-skill-node p {
  font-size: 0.78rem;
  color: var(--v2-text-muted);
}

/* Cosmetics, Pips & Progress Bars */
.v2-pip-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--v2-text-muted);
}

.v2-pip {
  width: 12px;
  height: 6px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.25);
}

.v2-pip.filled {
  background: var(--v2-primary);
}

.v2-prog-bar {
  position: relative;
  height: 20px;
  background: rgba(6, 10, 26, 0.9);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.v2-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--v2-primary), var(--v2-emerald));
}

.v2-prog-bar span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
}

.v2-streak-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid var(--v2-gold);
  border-radius: 12px;
}

.v2-streak-banner strong {
  display: block;
  font-family: var(--font-display);
  color: var(--v2-gold);
}

.v2-cosmetic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.v2-cosmetic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

.v2-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Telemetry & Settings Columns */
.v2-telemetry-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.v2-setting-row,
.v2-keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.v2-setting-row select,
.v2-setting-row input[type='range'] {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid var(--v2-border);
  padding: 6px 10px;
  border-radius: 6px;
}

.v2-mt {
  margin-top: 18px;
}

.v2-heatmap-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.v2-heat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.v2-heat-bar {
  width: 100%;
  height: 70px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.v2-heat-bar > div {
  width: 100%;
  background: linear-gradient(180deg, var(--v2-crimson), var(--v2-gold));
}

/* ==========================================
   IN-GAME HUD LAYER
   ========================================== */
.v2-hud-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 14px) 20px env(safe-area-inset-bottom, 14px);
  pointer-events: none;
  zoom: var(--v2-hud-scale, 1);
}

.v2-hud-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: start;
  gap: 16px;
}

.v2-hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v2-hud-pause-btn {
  pointer-events: auto;
  min-height: 44px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-border);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.v2-hud-hp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--v2-surface-strong);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.v2-hud-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.v2-stage-prog-track {
  width: 100%;
  max-width: 380px;
  height: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.v2-stage-prog-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--v2-primary), var(--v2-emerald));
}

.v2-hud-letters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.v2-letter-slot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(8, 12, 30, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(148, 163, 184, 0.45);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
}

.v2-letter-slot.lit {
  background: linear-gradient(135deg, #ffd700, #f59e0b);
  border-color: #ffffff;
  color: #050714;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.65);
}

.v2-boss-hud {
  width: 100%;
  max-width: 380px;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-crimson);
  border-radius: 8px;
  padding: 6px 10px;
}

.v2-boss-name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fda4af;
  text-align: center;
  margin-bottom: 4px;
}

.v2-boss-sh-track,
.v2-boss-hp-track {
  height: 6px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
}

.v2-boss-sh-fill {
  height: 100%;
  background: #00f3ff;
}

.v2-boss-hp-fill {
  height: 100%;
  background: #ff1e42;
}

.v2-hud-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.v2-hud-score {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 243, 255, 0.5);
}

.v2-hud-combo {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--v2-primary);
}

.v2-hud-combo.fever {
  color: var(--v2-gold);
}

.v2-hud-judgment {
  font-family: var(--font-display);
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Bottom Tactical HUD Dock */
.v2-hud-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.v2-od-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--v2-surface-strong);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--v2-border);
}

.v2-od-track {
  width: 180px;
  height: 10px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.v2-od-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--v2-primary), var(--v2-gold));
}

.v2-ult-trigger-btn {
  pointer-events: auto;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.v2-ult-trigger-btn.ready {
  background: linear-gradient(135deg, var(--v2-gold), #f97316);
  color: #050714;
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.65);
}

.v2-touch-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.v2-ctrl-btn {
  pointer-events: auto;
  min-height: 46px;
  min-width: 110px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 243, 255, 0.32);
  background: rgba(8, 12, 30, 0.82);
  color: #e2e8f0;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.v2-ctrl-btn:active {
  background: rgba(0, 243, 255, 0.28);
}

/* Pause & Result Dialogs */
.v2-dialog-card {
  width: min(540px, 100%);
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v2-rank-giant {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: var(--v2-gold);
  text-shadow: 0 0 28px rgba(255, 184, 0, 0.55);
}

.v2-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.text-cyan { color: var(--v2-primary); }
.text-crimson { color: var(--v2-crimson); }
.text-gold { color: var(--v2-gold); }
.text-magenta { color: var(--v2-secondary); }

/* Toast Notifications */
.v2-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.v2-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--v2-surface-strong);
  border: 1px solid var(--v2-primary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 240ms ease;
}

.v2-toast-error {
  border-color: var(--v2-crimson);
  color: #fda4af;
}

.v2-toast.fade-out {
  opacity: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .v2-hero-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
    max-height: 70vh;
    pointer-events: auto;
  }
  .v2-center-stage-cta {
    min-height: auto;
    gap: 14px;
    order: -1;
  }
  .v2-bottom-dock {
    grid-template-columns: repeat(3, 1fr);
  }
  .v2-telemetry-cols {
    grid-template-columns: 1fr;
  }
}
