/* === LANDER GAME === */

    #hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5em;
  font-size: 1.1em;
    }

    #gameArea {
  position: relative;
  width: 98%;
  max-width: 600px;
  height: 480px;
  margin: 1em auto;
  margin-bottom: 8px;
  border: 4px solid currentColor;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 18px,
      rgba(0,0,0,0.05) 19px
    );
  overflow: hidden;
    }

/* === LANDER === */
/* === LANDER STRUCTURE === */

#lander {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 42px; /* taller overall */
}

/* Nose cone */
#lander .nose {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid currentColor;
}

/* Cockpit / command module */
#lander .cockpit {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 9px;
  background-color: currentColor;
}

/* Main body */
#lander .body {
  position: absolute;
  top: 14px;
  left: 0;
  width: 24px;
  height: 18px;
  background-color: currentColor;
}

/* Landing legs */
#lander .leg {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 8px;
  background-color: currentColor;
}

#lander .leg.left {
  left: -4px;
}

#lander .leg.right {
  right: -4px;
}

/* === BLOCKY THRUSTER (2x SCALE) === */

#lander .thruster {
  position: absolute;
  bottom: -28px; /* push it down to match new size */
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

/* Shared flame row style */
#lander .flame {
  height: 8px;              /* doubled */
  background-color: orange;
  margin: 2px auto;         /* doubled spacing */
}

/* Pixel staircase (2x width) */
#lander .row-1 {
  width: 8px;
}

#lander .row-2 {
  width: 16px;
  background-color: #cc6600;
}

#lander .row-3 {
  width: 24px;
  background-color: #993300;
}

#lander .flame {
  box-shadow: 0 0 4px rgba(255,140,0,0.6);
}

body.dark-mode #lander .flame {
  box-shadow: 0 0 6px rgba(51,255,51,0.6);
}


/* Dark mode variant */
body.dark-mode #lander .row-1 {
  background-color: #33ff33;
}

body.dark-mode #lander .row-2 {
  background-color: #22cc22;
}

body.dark-mode #lander .row-3 {
  background-color: #118811;
}

/* === DARK MODE TWEAKS === */
    body.dark-mode #gameArea {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 18px,
      rgba(0,255,0,0.15) 19px
    );
    }

  

    .level {
  text-align: center;
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 10px;
    }
    
    /* === GROUND === */

#ground {
  position: absolute;
  bottom: 0px;
  width: 100%;
  height: 8px;
  background-color: currentColor;
}

#startPrompt {
  position: absolute;
  top: 45%;
  width: 100%;
  text-align: center;
  font-size: 1em;
  opacity: 0.7;
  /*pointer-events: none;*/
}

body.dark-mode #startPrompt {
  color: #33ff33;
}


/* === FUEL METER === */

#fuelWrapper {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#fuelBar {
  width: 95%;
  height: 10px;
  border: 2px solid currentColor;
  background-color: transparent;
}

#fuelFill {
  height: 100%;
  width: 100%;
  background-color: #ffcc00;
}

/* Dark mode fuel */
body.dark-mode #fuelFill {
  background-color: #33ff33;
}

/* === CRASH WRECKAGE === */

#crater {
  position: absolute;
  bottom: 8px; /* sits on ground */
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 10px;
  background-color: currentColor;
  display: none;
}

/* jagged top edge illusion */
#crater::before,
#crater::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 6px;
  height: 4px;
  background-color: currentColor;
}

#crater::before {
  left: 6px;
}

#crater::after {
  right: 6px;
}

/* === MESSAGE OVERLAY === */

#messageOverlay {
  position: absolute;
  inset: 0;
  top:40%;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.8em;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.85);
  color: #003366;
  z-index: 10;
}

body.dark-mode #messageOverlay {
  background-color: rgba(0, 0, 0, 0.85);
  color: #33ff33;
}

.flash {
  animation: flash 0.25s steps(1) infinite;
}

@keyframes flash {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

#globalBest {
  text-align: center;
  font-weight: bold;
  cursor: pointer;
}

