/* Global Styles and Variables */
:root {
  --neon-pink: #ff007f;
  --neon-cyan: #00f0ff;
  --neon-green: #39ff14;
  --neon-yellow: #ffea00;
  --neon-red: #ff3333;
  --bg-dark: #04040c;
  --panel-bg: rgba(6, 6, 20, 0.75);
  --panel-border: rgba(0, 240, 255, 0.25);
}

html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Outfit", sans-serif;
  background: linear-gradient(135deg, #050512, #0c0d24, #04040c);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
canvas {
  display: block;
  background: #0a0a0a;
}
/* Main Menu Overlay */

/* Old Shop Redundancy Cleared */

/* Banner notifications (replaces overlays) */
#notificationBanner {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(10, 10, 22, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-left: 4px solid var(--neon-cyan);
  border-radius: 3px;
  padding: 14px 28px;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  z-index: 1005;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
  width: 480px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

#notificationBanner.active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

#notificationBanner.warning {
  border-color: rgba(255, 51, 51, 0.3);
  border-left-color: var(--neon-red);
  color: var(--neon-red);
}

#notificationBanner.phase1 {
  border-color: rgba(255, 0, 127, 0.3);
  border-left-color: var(--neon-pink);
  color: var(--neon-pink);
}

#notificationBanner.phase2 {
  border-color: rgba(0, 240, 255, 0.3);
  border-left-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

#notificationBanner.phase3 {
  border-color: rgba(255, 234, 0, 0.3);
  border-left-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

#notificationBanner.lifesaver {
  border-color: rgba(255, 0, 127, 0.3);
  border-left-color: var(--neon-pink);
  color: #fff;
}

#notificationBanner.primaryAim {
  border-color: rgba(0, 240, 255, 0.3);
  border-left-color: var(--neon-cyan);
  color: #fff;
}
/* Game Over Overlay */
#gameOverOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
#finalScore {
  white-space: pre-line;
  text-align: center;
  line-height: 1.8;
}
#playAgainButton {
  padding: 15px 30px;
  font-size: 24px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: #fff;
  margin-bottom: 20px;
  transition: background 0.3s;
}
#playAgainButton:hover {
  background: rgba(255, 255, 255, 0.4);
}
#mainMenuButton {
  padding: 15px 30px;
  font-size: 24px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: #fff;
  margin-bottom: 20px;
  transition: background 0.3s;
}
#mainMenuButton:hover {
  background: rgba(255, 255, 255, 0.4);
}
/* Mute Button as Unicode Icon (inside the guide only) */
/* Uses “🔊” for unmuted and “🔇” for muted */
#muteButton {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 35;
}
/* Blinking Circles */
#blinkingCircles {
  display: flex;
  justify-content: center;
  align-items: center;
}
.blinkingCircle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  margin: 0 5px;
  animation: blinkCircle 1.5s infinite;
}
.blinkingCircle:nth-child(2) {
  animation-delay: 0.3s;
}
.blinkingCircle:nth-child(3) {
  animation-delay: 0.6s;
}
@keyframes blinkCircle {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
/* Mobile Joystick: default 150x150, hidden on PC; reduced by 30% on mobile */
#joystickContainer {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 15;
  display: block;
  touch-action: none;
}
@media (min-width: 769px) {
  #joystickContainer {
    display: none;
  }
}
#joystickKnob {
  position: absolute;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  touch-action: none;
}
@media (max-width: 768px) {
  #joystickContainer {
    width: 105px;
    height: 105px;
    bottom: 20px;
    left: 20px;
  }
  #joystickKnob {
    width: 35px;
    height: 35px;
  }
}
/* Mobile Attack Buttons – renamed to S, P, R */
#attackButtons {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 15;
}
#attackButtons button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(3px);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
#attackButtons button:hover {
  background: rgba(255, 255, 255, 0.4);
}
@media (min-width: 769px) {
  #attackButtons {
    display: none;
  }
}
/* Mobile Rotation Buttons */
#rotationButtons {
  position: absolute;
  bottom: 20px;
  right: 90px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 15;
}
#rotationButtons button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(3px);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
#rotationButtons button:hover {
  background: rgba(255, 255, 255, 0.4);
}
@media (min-width: 769px) {
  #rotationButtons {
    display: none;
  }
}

/* ==========================================================================
   GUIDE OVERLAY & UI ELEMENTS
   ========================================================================== */

#guideButton {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  cursor: pointer;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--neon-cyan);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 25;
  display: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#guideButton:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.counterText {
  font-size: 14px;
}

/* ==========================================================================
   MAIN MENU & DASHBOARD STYLES
   ========================================================================== */

#mainMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
  box-sizing: border-box;
  overflow: hidden;
  background: #04040a;
}

#mainMenu.hidden {
  display: none;
}

/* Base grid layout for the tactical dashboard */
.menu-dashboard {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 30px;
  max-width: 960px;
  width: 100%;
  z-index: 10;
  box-sizing: border-box;
}

.dash-panel {
  position: relative;
  background: rgba(10, 10, 22, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 45px 40px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-panel:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 240, 255, 0.05);
}

.brand-panel {
  border-color: rgba(255, 0, 127, 0.2);
}

.brand-panel:hover {
  border-color: rgba(255, 0, 127, 0.35);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 0, 127, 0.05);
}

.status-panel {
  justify-content: space-between;
}

/* Corner HUD accents (clean, no expansion, static size) */
.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  pointer-events: none;
}

.hud-corner.top-left {
  top: -1px;
  left: -1px;
  border-top-color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
}

.hud-corner.top-right {
  top: -1px;
  right: -1px;
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-cyan);
}

.hud-corner.bottom-left {
  bottom: -1px;
  left: -1px;
  border-bottom-color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
}

.hud-corner.bottom-right {
  bottom: -1px;
  right: -1px;
  border-bottom-color: var(--neon-cyan);
  border-right-color: var(--neon-cyan);
}

.brand-panel .hud-corner {
  border-color: transparent;
}
.brand-panel .hud-corner.top-left {
  border-top-color: var(--neon-pink);
  border-left-color: var(--neon-pink);
}
.brand-panel .hud-corner.top-right {
  border-top-color: var(--neon-pink);
  border-right-color: var(--neon-pink);
}
.brand-panel .hud-corner.bottom-left {
  border-bottom-color: var(--neon-pink);
  border-left-color: var(--neon-pink);
}
.brand-panel .hud-corner.bottom-right {
  border-bottom-color: var(--neon-pink);
  border-right-color: var(--neon-pink);
}

/* Header Typography */
.brand-header {
  text-align: left;
  margin-bottom: 40px;
}

.game-title {
  font-family: "Orbitron", sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
}

.game-subtitle {
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  color: var(--neon-cyan);
  margin: 0;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Audio Link Section */
.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

/* High Score HUD */
.high-score-hud {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 234, 0, 0.15);
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

.hud-tag {
  font-size: 9px;
  font-family: "Orbitron", sans-serif;
  color: rgba(255, 234, 0, 0.5);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.high-score-display {
  font-size: 16px;
  font-family: "Orbitron", sans-serif;
  color: var(--neon-yellow);
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

/* System Diagnostic Info */
.system-diagnostic {
  margin-top: auto;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
}

.diag-title {
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.diag-row {
  font-family: monospace;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.diag-row .label {
  color: rgba(255, 255, 255, 0.4);
}

.diag-row .val {
  font-weight: 700;
}

.diag-row .val.green {
  color: var(--neon-green);
}

.diag-row .val.cyan {
  color: var(--neon-cyan);
}

.diag-row .val.dim {
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   NAVIGATION BUTTONS (Crisp, snappy, no AI slop translateY or scanlines)
   ========================================================================== */

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

.menu-btn {
  position: relative;
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out, color 0.1s ease-out;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.btn-icon {
  margin-right: 8px;
  font-size: 1em;
  display: flex;
  align-items: center;
}

.btn-icon svg {
  display: block;
}

.menu-btn:hover {
  border-color: var(--neon-cyan);
  background-color: var(--neon-cyan);
  color: #000000;
}

/* Hero Play Button */
.play-btn {
  color: var(--neon-pink);
  border-color: rgba(255, 0, 127, 0.35);
  background: rgba(255, 0, 127, 0.03);
}

.play-btn:hover {
  border-color: var(--neon-pink);
  background-color: var(--neon-pink);
  color: #000000;
}

/* Audio Toggle Button */
.music-toggle {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: var(--neon-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease-out;
}

.music-toggle:hover {
  background-color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #000000;
}

/* ==========================================================================
   OVERLAY MENUS (Shop, About, Guide)
   ========================================================================== */

.overlay-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 8, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1010;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.overlay-menu.active {
  display: flex;
}

.close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease-out;
  z-index: 1020;
}

.close-btn:hover {
  background-color: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #000000;
}

/* SHOP OVERLAY */
.shop-container {
  position: relative;
  background: rgba(10, 10, 22, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 40px;
  max-width: 780px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.shop-title {
  font-family: "Orbitron", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 25px 0;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.shop-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 20px 15px;
  cursor: pointer;
  transition: all 0.1s ease-out;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.shop-item:hover {
  background: rgba(0, 240, 255, 0.04);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.shop-item.selected {
  border-color: var(--neon-pink);
  background: rgba(255, 0, 127, 0.06);
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.15);
}

.shop-item-preview {
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-bottom: 12px;
  position: relative;
}

.shop-item-preview::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.neon-preview::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 38px;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 50%;
}

.plasma-preview::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 38px;
  border: 1.5px solid var(--neon-pink);
  border-radius: 50%;
}

.celestial-preview::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 38px;
  border: 1.5px solid var(--neon-yellow);
  border-radius: 50%;
}

.shop-item-name {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.shop-item-desc {
  font-size: 11px;
  color: #888899;
  margin: 0;
}

/* ABOUT OVERLAY */
.about-container {
  position: relative;
  background: rgba(10, 10, 22, 0.9);
  border: 1px solid rgba(255, 0, 127, 0.15);
  border-radius: 6px;
  padding: 40px;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.about-title {
  font-family: "Orbitron", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 25px 0;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.about-content {
  color: #ccc;
  text-align: left;
}

.about-section {
  margin-bottom: 25px;
}

.about-section h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  color: var(--neon-cyan);
  margin: 0 0 8px 0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.about-section p {
  line-height: 1.6;
  font-size: 13.5px;
  margin: 6px 0;
  color: #a0a0b8;
}

.developer-section {
  background: rgba(0, 0, 0, 0.3);
  border-left: 2px solid var(--neon-pink);
  padding: 16px 20px;
  border-radius: 0 4px 4px 0;
}

.dev-info p {
  margin: 6px 0;
  font-size: 13.5px;
}

.dev-info strong {
  color: var(--neon-pink);
  font-family: "Orbitron", sans-serif;
  font-weight: 500;
}

.dev-quote {
  font-style: italic;
  color: var(--neon-yellow);
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   GAME GUIDE OVERLAY (Snappy controls, clean columns)
   ========================================================================== */

#guideOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1010;
  color: #fff;
}

.guide-container {
  position: relative;
  background: rgba(10, 10, 22, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.guide-title {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 20px 0;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.guide-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.guide-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  position: relative;
  bottom: -1px;
}

.guide-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}

.guide-tab.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.guide-tab.abort-tab {
  color: rgba(255, 51, 51, 0.5) !important;
}

.guide-tab.abort-tab:hover {
  color: rgba(255, 51, 51, 0.9) !important;
}

.guide-tab.abort-tab.active {
  color: var(--neon-red) !important;
  border-bottom-color: var(--neon-red) !important;
}

.guide-tab-content {
  display: none;
  width: 100%;
}

.guide-tab-content.active {
  display: block;
}

.manual-scroll-area {
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 8px;
}

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

.manual-item {
  display: flex;
  gap: 15px;
  margin-bottom: 18px;
  text-align: left;
}

.manual-item .step-num {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  color: var(--neon-pink);
  font-weight: 700;
  line-height: 1.5;
}

.manual-item strong {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #ffffff;
}

.manual-item p {
  margin: 4px 0 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #a0a0b8;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: left;
}

.control-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 15px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-key {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.control-desc {
  font-size: 11px;
  color: #888899;
}

.abort-panel {
  padding: 30px 10px;
  text-align: center;
}

.abort-panel p {
  font-size: 13px;
  color: #a0a0b8;
  margin-bottom: 20px;
}

.guide-tab.abort-tab {
  color: var(--neon-red) !important;
}

.guide-tab.abort-tab.active {
  color: var(--neon-red) !important;
  border-bottom-color: var(--neon-red);
}

#closeGuide {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease-out;
  z-index: 1020;
}

#closeGuide:hover {
  background-color: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #000000;
}

#muteButton {
  position: absolute;
  top: 25px;
  left: 25px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--neon-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease-out;
  z-index: 1020;
}

#muteButton:hover {
  background-color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #000000;
}

/* ==========================================================================
   GAME OVER HUD OVERLAY
   ========================================================================== */

#gameOverOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 1, 1, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1010;
  padding: 20px;
  box-sizing: border-box;
}

.game-over-container {
  position: relative;
  background: rgba(16, 5, 5, 0.9);
  border: 1px solid rgba(255, 51, 51, 0.2);
  border-radius: 6px;
  padding: 45px 35px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  text-align: center;
  z-index: 1020;
  box-sizing: border-box;
}

.game-over-title {
  font-family: "Orbitron", sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--neon-red);
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
}

.game-over-divider {
  width: 40px;
  height: 1px;
  background: var(--neon-red);
  margin: 15px auto 25px auto;
}

#finalScore {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  color: #fff;
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.45);
  padding: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stats-diagnostic-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

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

.diagnostic-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.diagnostic-label {
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #888899;
  letter-spacing: 1.5px;
}

.diagnostic-value {
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.diagnostic-value.var-cyan {
  color: var(--neon-cyan);
}

.diagnostic-value.var-pink {
  color: var(--neon-pink);
}

.game-over-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.game-over-buttons button {
  padding: 13px 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease-out;
  width: 100%;
  text-transform: uppercase;
  box-sizing: border-box;
}

#playAgainButton {
  background: rgba(255, 51, 51, 0.03);
  border: 1px solid rgba(255, 51, 51, 0.35);
  color: var(--neon-red);
}

#playAgainButton:hover {
  background-color: var(--neon-red);
  border-color: var(--neon-red);
  color: #000000;
}

#mainMenuButton {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
}

#mainMenuButton:hover {
  border-color: #fff;
  background-color: #fff;
  color: #000000;
}

/* ==========================================================================
   UTILITY & SWAP STYLES
   ========================================================================== */

/* Abort Session (End Game) Button */
.end-game-btn {
  background: rgba(255, 51, 51, 0.03);
  color: var(--neon-red);
  border: 1px solid rgba(255, 51, 51, 0.35);
  padding: 12px 25px;
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.1s ease-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.end-game-btn:hover {
  background-color: var(--neon-red);
  border-color: var(--neon-red);
  color: #000000;
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.2);
}

/* SVG Swapping rules */
.music-toggle svg,
#muteButton svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  display: block;
}

/* Hide volume-off by default */
.music-toggle .volume-off,
#muteButton .volume-off {
  display: none !important;
}

/* Hide volume-on and show volume-off when muted */
.music-toggle.muted .volume-on,
#muteButton.muted .volume-on {
  display: none !important;
}

.music-toggle.muted .volume-off,
#muteButton.muted .volume-off {
  display: block !important;
}

/* Audio Prompt Overlay */
.prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 3, 8, 0.96);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200; /* Above all other overlays */
  color: #fff;
  padding: 20px;
  box-sizing: border-box;
}

.prompt-container {
  position: relative;
  background: rgba(10, 10, 22, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  text-align: center;
  box-sizing: border-box;
}

.prompt-title {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 12px 0;
  letter-spacing: 1.5px;
}

.prompt-desc {
  font-size: 12px;
  color: #888899;
  line-height: 1.6;
  margin-bottom: 25px;
}

.prompt-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
}

.prompt-btn {
  flex: 1;
  padding: 13px 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease-out;
  text-transform: uppercase;
  box-sizing: border-box;
}

.prompt-btn.confirm {
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
}

.prompt-btn.confirm:hover {
  background-color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #000000;
}

.prompt-btn.cancel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #aaa;
}

.prompt-btn.cancel:hover {
  border-color: #fff;
  background-color: #fff;
  color: #000000;
}
