* { margin: 0; padding: 0; box-sizing: border-box; }
body { overflow: hidden; background: #000010; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #eee; }
canvas { display: block; }

/* Back link */
.back-to-hub {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: rgba(0,0,0,0.6); color: #88ccff; padding: 6px 14px; border-radius: 6px;
  text-decoration: none; font-size: 13px; backdrop-filter: blur(4px);
  border: 1px solid rgba(136,204,255,0.2);
  transition: background 0.2s;
}
.back-to-hub:hover { background: rgba(136,204,255,0.15); }

/* Screens */
.screen { position: fixed; inset: 0; z-index: 50; display: none; }
.screen.active { display: flex; }
.overlay { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(0,0,10,0.85); }
.overlay:not(.hidden) { display: flex; }
.hidden { display: none !important; }

/* Title */
.menu-overlay {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(20,30,80,0.9) 0%, rgba(0,0,10,0.95) 70%);
}
.game-title {
  font-size: clamp(48px, 8vw, 90px); font-weight: 900;
  background: linear-gradient(135deg, #00ccff, #6644ff, #ff44aa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none; margin-bottom: 8px; letter-spacing: 2px;
}
.subtitle { color: #88aacc; font-size: 18px; margin-bottom: 30px; letter-spacing: 4px; text-transform: uppercase; }
.controls-hint { color: #556677; font-size: 12px; margin-top: 20px; }

/* Buttons */
.btn-primary {
  padding: 14px 48px; font-size: 18px; font-weight: 700; color: #fff; border: none; border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, #0088ff, #6644ff);
  box-shadow: 0 4px 24px rgba(0,136,255,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 6px 32px rgba(0,136,255,0.5); }
.btn-secondary {
  display: inline-block; margin-top: 12px; padding: 10px 24px; font-size: 14px; color: #88aacc;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(136,170,204,0.2); border-radius: 6px;
  cursor: pointer; transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* HUD */
.hud-top {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; gap: 24px; background: rgba(0,0,20,0.7); padding: 8px 24px; border-radius: 8px;
  backdrop-filter: blur(6px); border: 1px solid rgba(136,204,255,0.15);
}
.hud-stat { display: flex; align-items: center; gap: 6px; }
.hud-icon { font-size: 18px; }
.hud-value { font-size: 18px; font-weight: 700; color: #fff; min-width: 40px; }

/* Wave Banner */
.wave-banner {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 45;
  font-size: 42px; font-weight: 900; color: #fff;
  text-shadow: 0 0 20px rgba(0,136,255,0.8), 0 0 60px rgba(0,136,255,0.4);
  animation: bannerPulse 0.6s ease-out;
  pointer-events: none;
}
@keyframes bannerPulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Powerup indicator */
.powerup-indicator {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: rgba(0,0,20,0.7); padding: 8px 20px; border-radius: 8px;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,100,0.3);
  text-align: center; min-width: 160px;
}
.powerup-name { font-size: 14px; font-weight: 700; color: #ffdd44; text-transform: uppercase; letter-spacing: 1px; }
.powerup-bar-bg { width: 120px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 6px; }
.powerup-bar { height: 100%; background: linear-gradient(90deg, #ffdd44, #ff8800); border-radius: 2px; width: 100%; transition: width 0.1s; }

/* Boss HP */
.boss-hp {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,20,0.7); padding: 8px 20px; border-radius: 8px;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,50,50,0.3);
}
.boss-label { font-size: 14px; font-weight: 900; color: #ff4444; letter-spacing: 2px; }
.boss-bar-bg { width: 200px; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; }
.boss-bar { height: 100%; background: linear-gradient(90deg, #ff2222, #ff6644); border-radius: 4px; width: 100%; transition: width 0.15s; }

/* Result screens */
.result-box {
  text-align: center; padding: 40px 50px; border-radius: 16px;
  background: rgba(10,10,40,0.9); border: 1px solid rgba(136,204,255,0.2);
  backdrop-filter: blur(10px);
}
.result-title { font-size: 48px; font-weight: 900; margin-bottom: 12px; }
.win-title { color: #44ddff; text-shadow: 0 0 30px rgba(68,221,255,0.5); }
.lose-title { color: #ff4466; text-shadow: 0 0 30px rgba(255,68,102,0.5); }
.result-sub { color: #99aabb; font-size: 18px; margin-bottom: 24px; }
