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

body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

body.cursor-hidden,
body.cursor-hidden * {
  cursor: none !important;
}

/* ── Screens ── */
.screen {
  display: none;
  width: 100vw;
  height: 100vh;
}
.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.screen.overlay {
  position: fixed;
  top: 0; left: 0;
  background: transparent;
  z-index: 100;
}

/* ─────────────────────────────────────────────
   SPLASH SCREEN
───────────────────────────────────────────── */
#loading-screen {
  background: #000;
  cursor: none;
}

#loading-text {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 6px;
  color: #aaa;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
}

#intro-screen {
  background: #000;
  cursor: pointer;
  position: relative;
}

#intro-click {
  font-size: 0.85rem;
  letter-spacing: 5px;
  color: #f0c040;
  text-transform: uppercase;
  animation: splashClickPulse 1.2s ease-in-out infinite;
  z-index: 1;
}

#intro-video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#splash-screen {
  background: #000;
  cursor: none;
}

#splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: splashFadeIn 0.8s ease-out 0.3s both;
}

#splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#splash-logo-img {
  width: clamp(260px, 38vw, 520px);
  filter: drop-shadow(0 0 28px rgba(240,192,64,0.55))
          drop-shadow(0 0 60px rgba(240,192,64,0.25));
  animation: splashLogoPulse 2s ease-in-out infinite;
}

#splash-tagline {
  font-size: 0.9rem;
  letter-spacing: 6px;
  color: #666;
  text-transform: lowercase;
  font-style: italic;
}

#splash-click {
  margin-top: 32px;
  font-size: 0.85rem;
  letter-spacing: 5px;
  color: #f0c040;
  text-transform: uppercase;
  opacity: 0;
  animation: splashClickPulse 1.2s ease-in-out 1.2s infinite;
  cursor: pointer;
}

@keyframes splashClickPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1.0; }
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes splashFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}
@keyframes splashLogoPulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(240,192,64,0.45))
                     drop-shadow(0 0 50px rgba(240,192,64,0.20)); }
  50%       { filter: drop-shadow(0 0 36px rgba(240,192,64,0.80))
                     drop-shadow(0 0 80px rgba(240,192,64,0.40)); }
}

/* ─────────────────────────────────────────────
   MENU SCREEN - Industrial Lunar Interface
   SPACEJAY-134: Lava rock surfaces with emissive cracks
───────────────────────────────────────────── */
#menu-screen {
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.4) 0%, transparent 15%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.3) 0%, transparent 12%),
    radial-gradient(circle at 40% 80%, rgba(0, 0, 0, 0.35) 0%, transparent 10%),
    linear-gradient(135deg, #05070A 0%, #0a0a0a 50%, #05070A 100%);
  gap: 16px;
  position: relative;
  overflow: hidden;
}

/* Logo above the game title - Industrial treatment */
#menu-logo {
  width: clamp(136px, 18.7vw, 255px);
  opacity: 0.85;
  filter: 
    drop-shadow(0 0 15px rgba(0, 212, 255, 0.3))
    drop-shadow(0 0 30px rgba(0, 212, 255, 0.15));
  margin-bottom: -4px;
}

#menu-screen h1 {
  font-size: 2.975rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #8A8F96;
  text-shadow: 
    0 0 20px rgba(0, 212, 255, 0.4),
    0 0 40px rgba(0, 212, 255, 0.2),
    0 4px 0 #1A1C20,
    0 8px 0 #05070A;
  position: relative;
}

.subtitle {
  color: #5C626B;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000;
}

/* Copyright line at the very bottom of the menu */
#menu-copyright {
  position: absolute;
  bottom: 18px;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #333;
  text-transform: uppercase;
}

.menu-options {
  display: flex;
  gap: 30px;
  font-size: 0.765rem;
  color: #8A8F96;
}
.menu-options label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.menu-options select {
  background-image: 
    linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.2) 100%),
    url('assets/menus/LavaBackground3.jpg');
  background-size: cover;
  background-position: center;
  background-color: #1A1C20;
  color: #fff;
  border: 2px solid #3A3E45;
  border-radius: 4px;
  padding: 6.8px 13.6px;
  font-size: 0.765rem;
  cursor: pointer;
  box-shadow: 
    inset 2px 2px 4px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(0, 212, 255, 0.1);
  transition: all 0.2s;
}
.menu-options select:hover {
  border-color: #00D4FF;
  box-shadow: 
    inset 2px 2px 4px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(0, 212, 255, 0.3);
}

/* ── Buttons - Now handled in src/ui/mainMenu.css ── */
/* Button styling moved to src/ui/mainMenu.css for SPACEJAY-148 */

/* ── Game Screen ── */
#game-screen {
  position: relative;
  background: #000;
  justify-content: flex-start;
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* ── HUD ── */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 100%);
  z-index: 10;
  pointer-events: none;
}
#hud-left, #hud-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: #eee;
  text-shadow: 0 1px 4px #000;
}
#hud-left div, #hud-right div {
  background: rgba(0,0,0,0.45);
  padding: 4px 12px;
  border-radius: 6px;
}
#hud-left span, #hud-right span {
  color: #f0c040;
  font-weight: bold;
}
#hud-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
#hud-msg {
  font-size: 1.4rem;
  font-weight: bold;
  color: #f0c040;
  letter-spacing: 4px;
  text-shadow: 0 0 16px #f0c04099;
  text-align: center;
  min-height: 2rem;
}

#controls-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #555;
  letter-spacing: 1px;
  pointer-events: none;
}

#version-badge {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.85rem;
  color: #aaa;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
  pointer-events: none;
}

/* SPACEJAY-164: Test Mode Indicator */
#test-mode-indicator {
  position: fixed;
  bottom: 10px;
  left: 14px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #FF0000;
  font-family: 'Courier New', monospace;
  pointer-events: none;
  z-index: 10000;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Modal - Now handled in src/ui/modals.css ── */
/* Modal styling moved to src/ui/modals.css for SPACEJAY-148 Phase 3 */

/* ── Name entry, Feedback, Controls - Now handled in src/ui/modals.css ── */
/* Styling moved to src/ui/modals.css for SPACEJAY-148 Phase 3 */

/* ── SPACEJAY-200: Gamepad Toggle Switch ── */

.toggle-switch input:checked + .toggle-slider {
  background: #44cc88;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}


/* ── SPACEJAY-200: Gamepad Pause Menu Focus ── */
.gamepad-focus {
  color: #00D4FF !important;
  text-shadow: 
    0 0 15px rgba(0, 212, 255, 1),
    0 0 30px rgba(0, 212, 255, 0.6),
    2px 2px 4px rgba(0, 0, 0, 0.8) !important;
  transform: translateY(-2px);
}
.gamepad-focus::after {
  opacity: 1 !important;
}
