* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: Verdana, sans-serif;
  overflow: hidden;
}

#game-canvas {
  display: block;
  margin: 0 auto;
  background: radial-gradient(circle at top, #020b1a 0%, #000 60%);
  cursor: none;
}

/* HUD */

.hud {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 4px 16px;
  color: #00e6ff;
  font-size: 14px;
  text-shadow: 0 0 6px #00e6ff;
  pointer-events: none;
}

.hud-left {
  display: flex;
  gap: 16px;
}

.hud-item {
  display: flex;
  gap: 4px;
}

.hud-label {
  opacity: 0.8;
}

.hud-value {
  font-weight: bold;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-powerups-label {
  font-size: 12px;
  opacity: 0.8;
}

.hud-powerups {
  display: flex;
  gap: 6px;
}

.hud-powerup {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 230, 255, 0.7);
  border: 1px solid rgba(0, 230, 255, 0.9);
  opacity: 0.25;
}

.hud-powerup.active {
  opacity: 1;
}

.hud-powerup-life {
  background: radial-gradient(circle, #ff4d4d 0%, #660000 70%);
}

.hud-powerup-shield {
  background: radial-gradient(circle, #4dffff 0%, #004d66 70%);
}

.hud-powerup-fire {
  background: radial-gradient(circle, #ffcc33 0%, #663300 70%);
}

.hud-powerup-hut {
  background: radial-gradient(circle, #99ff66 0%, #225500 70%);
}

/* PRELOADER */

.preloader {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #00111f 0%, #000 70%);
  display: flex;
  flex-direction: column;
  color: #00ccff;
  z-index: 1000;
}

.preloader-header {
  padding: 10px 16px;
}

.preloader-logo-bar {
  height: 56px;
  border-bottom: 1px solid rgba(0, 204, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, rgba(0, 40, 80, 0.8), rgba(0, 10, 20, 0.9), rgba(0, 40, 80, 0.8));
  box-shadow: 0 0 18px rgba(0, 204, 255, 0.6);
}

.preloader-logo {
  height: 40px;
  filter: drop-shadow(0 0 10px #00ccff);
}

.preloader-orbit-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.preloader-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 204, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.8);
  animation: preloader-spin 12s linear infinite;
}

.preloader-ring.r1 {
  width: 420px;
  height: 420px;
  animation-duration: 18s;
  opacity: 0.25;
}

.preloader-ring.r2 {
  width: 300px;
  height: 300px;
  animation-duration: 12s;
  opacity: 0.4;
}

.preloader-ring.r3 {
  width: 180px;
  height: 180px;
  animation-duration: 8s;
  opacity: 0.7;
}

@keyframes preloader-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.preloader-core {
  position: relative;
  max-width: 720px;
  padding: 18px 24px;
  background: rgba(0, 10, 24, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(0, 204, 255, 0.6);
  box-shadow: 0 0 24px rgba(0, 204, 255, 0.7);
}

.preloader-title {
  font-size: 20px;
  text-align: center;
  margin-bottom: 4px;
  text-shadow: 0 0 10px #00ccff;
}

.preloader-subtitle {
  font-size: 16px;
  text-align: center;
  margin-bottom: 12px;
  color: #88e6ff;
}

.preloader-story {
  font-size: 13px;
  line-height: 1.4;
  color: #ccefff;
  margin-bottom: 12px;
}

.preloader-story p {
  margin-bottom: 4px;
}

.preloader-controls {
  font-size: 13px;
  margin-bottom: 10px;
}

.preloader-controls h3 {
  font-size: 14px;
  margin-bottom: 4px;
  color: #00e6ff;
}

.preloader-controls ul {
  list-style: none;
  padding-left: 0;
}

.preloader-controls li {
  margin-bottom: 2px;
}

.preloader-hint {
  text-align: center;
  font-size: 12px;
  color: #88e6ff;
  opacity: 0.8;
  margin-top: 4px;
}

/* OVERLAY MESSAGE (neon box) */

#overlay-message {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500;
}

.overlay-box {
  padding: 14px 28px;
  border: 2px solid #00ccff;
  background: rgba(0, 20, 40, 0.85);
  box-shadow: 0 0 20px #00ccff, inset 0 0 20px #00ccff;
  border-radius: 8px;
  font-family: Verdana, sans-serif;
  font-size: 22px;
  color: #00ccff;
  text-shadow: 0 0 10px #00ccff;
  animation: overlay-pop 0.25s ease-out;
}

@keyframes overlay-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* WAVE PREVIEW */

.wave-preview {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 400;
}

.wave-preview-box {
  padding: 16px 26px;
  border-radius: 10px;
  border: 2px solid #00ff99;
  background: rgba(0, 24, 16, 0.9);
  box-shadow: 0 0 20px #00ff99, inset 0 0 20px #00ff99;
  color: #ccffdd;
  font-size: 14px;
}

.wave-preview-title {
  font-size: 18px;
  margin-bottom: 6px;
  text-align: center;
  color: #00ff99;
  text-shadow: 0 0 10px #00ff99;
}

.wave-preview-content {
  font-size: 13px;
}

/* BOSS INTRO */

.boss-intro {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 450;
}

.boss-intro-box {
  padding: 18px 32px;
  border-radius: 12px;
  border: 2px solid #ff4444;
  background: rgba(32, 0, 0, 0.9);
  box-shadow: 0 0 24px #ff4444, inset 0 0 24px #ff4444;
  color: #ffdddd;
  text-align: center;
}

.boss-intro-title {
  font-size: 22px;
  margin-bottom: 6px;
  text-shadow: 0 0 12px #ff4444;
}

.boss-intro-subtitle {
  font-size: 14px;
}

/* GAME OVER ZOOM (class used by JS if needed) */

.game-over-zoom {
  animation: game-over-zoom 1s ease-out forwards;
}

@keyframes game-over-zoom {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0; }
}


#overlay-mothership {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,20,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.6s ease-out;
    pointer-events: none;
}

#overlay-mothership .overlay-box {
    font-size: 48px;
    color: #00eaff;
    text-shadow: 0 0 12px #00eaff, 0 0 24px #0088aa;
    padding: 20px 40px;
    border: 2px solid #00eaff;
    border-radius: 10px;
    background: rgba(0, 10, 30, 0.6);
    box-shadow: 0 0 20px #00eaff inset, 0 0 30px #00eaff;
}

#overlay-mothership.visible {
    opacity: 1;
}

.hidden {
    display: none;
}



#welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,20,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease-out;
    z-index: 9999;
}

.welcome-visible {
    opacity: 1;
}

.welcome-hidden {
    opacity: 0;
}

.welcome-box {
    font-family: Verdana, sans-serif;
    font-size: 42px;
    color: #00eaff;
    text-shadow: 0 0 12px #00eaff, 0 0 24px #0088aa;
    padding: 20px 40px;
    border: 2px solid #00eaff;
    border-radius: 10px;
    background: rgba(0, 10, 30, 0.6);
    box-shadow: 0 0 20px #00eaff inset, 0 0 30px #00eaff;
    animation: welcome-pop 0.6s ease-out forwards;
}

@keyframes welcome-pop {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
#welcome-overlay {
    z-index: 999999; /* force on top */
}
