/* NEBULA STRIKE — neon UI */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04040e;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: #cfe9ff; user-select: none; }

#game-wrap { position: fixed; inset: 0; }
#game { width: 100%; height: 100%; display: block; }

/* ---------- FX layer ---------- */
#fx-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.popup {
  position: absolute; transform: translate(-50%, -50%);
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0,0,0,.9), 0 0 14px currentColor;
  pointer-events: none; white-space: nowrap; z-index: 6;
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#hud-left { position: absolute; top: 18px; left: 22px; }
.hud-label { font-size: 11px; letter-spacing: 3px; color: #5a7fa8; }
#score { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: #e8f6ff;
  text-shadow: 0 0 12px rgba(120,200,255,.8), 0 0 30px rgba(60,140,255,.4); font-variant-numeric: tabular-nums; }
#combo { margin-top: 4px; font-size: 15px; font-weight: 800; color: #ffd733;
  text-shadow: 0 0 10px rgba(255,215,51,.9); }
#combo.pulse { animation: comboPulse .3s ease; }
@keyframes comboPulse { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }

#hud-right { position: absolute; top: 18px; right: 22px; text-align: right; }
#wave { font-size: 20px; font-weight: 800; letter-spacing: 3px; color: #8ff;
  text-shadow: 0 0 10px rgba(120,255,255,.7); }
#enemies { font-size: 12px; letter-spacing: 2px; color: #5a7fa8; margin-top: 3px; }
#fps { font-size: 11px; color: #3d5a80; margin-top: 6px; letter-spacing: 1px; }

#hud-bottom { position: absolute; bottom: 20px; left: 22px; width: 300px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.bar-label { font-size: 10px; letter-spacing: 2px; color: #5a7fa8; width: 34px; }
.bar { flex: 1; height: 12px; background: rgba(10,20,40,.75); border: 1px solid rgba(90,160,255,.25);
  border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; width: 100%; border-radius: 5px; transition: width .15s ease;
  box-shadow: 0 0 10px currentColor; }
#hp-fill { background: #3dff8b; color: #3dff8b; }
#shield-fill { background: #3399ff; color: #3399ff; }
.bar-num { font-size: 12px; font-weight: 700; width: 28px; color: #9be8ff; }

/* boss bar */
#bossbar-wrap { position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  width: min(560px, 80vw); z-index: 12; text-align: center; pointer-events: none; }
#boss-name { font-size: 13px; font-weight: 800; letter-spacing: 3px; color: #ff4d6d;
  text-shadow: 0 0 12px rgba(255,77,109,.9); margin-bottom: 5px; }
.bar.boss { height: 10px; border-color: rgba(255,77,109,.5); }
#boss-fill { background: linear-gradient(90deg,#ff2bd6,#ff4d6d); color: #ff4d6d; }

/* ---------- banner ---------- */
#banner { position: absolute; top: 38%; left: 50%; transform: translate(-50%,-50%);
  text-align: center; pointer-events: none; z-index: 20; opacity: 0; width: 100%; }
.banner-main { font-size: 52px; font-weight: 900; letter-spacing: 6px; text-shadow: 0 0 24px currentColor, 0 0 60px currentColor; }
.banner-sub { margin-top: 8px; font-size: 17px; letter-spacing: 4px; color: #cfe9ff;
  text-shadow: 0 0 14px rgba(0,0,0,.9); }
@keyframes bannerFade { 0% { opacity: 0; transform: translate(-50%,-50%) scale(1.25); }
  12% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(.95); } }

/* ---------- vignette / scanlines ---------- */
#vignette { position: absolute; inset: 0; pointer-events: none; z-index: 8;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,10,.55) 100%); }
#scanlines { position: absolute; inset: 0; pointer-events: none; z-index: 9; opacity: .05;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.4) 0 1px, transparent 1px 3px); }

/* ---------- overlays ---------- */
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(2,4,12,.55); backdrop-filter: blur(3px); z-index: 30; }
.menu-box { text-align: center; padding: 34px 44px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(14,24,48,.92), rgba(6,10,26,.95));
  border: 1px solid rgba(90,160,255,.3); box-shadow: 0 0 40px rgba(40,100,255,.25), inset 0 0 60px rgba(20,50,120,.15);
  max-width: 92vw; max-height: 92vh; overflow-y: auto; }
.menu-box.small { padding: 26px 34px; }

.logo-main { font-size: 52px; font-weight: 900; letter-spacing: 8px; color: #e8f6ff;
  text-shadow: 0 0 18px rgba(120,200,255,.9), 0 0 50px rgba(60,140,255,.5); }
.logo-main span { color: #ff2bd6; text-shadow: 0 0 18px rgba(255,43,214,.9), 0 0 50px rgba(255,43,214,.5); }
.logo-sub { margin-top: 6px; font-size: 13px; letter-spacing: 9px; color: #5a7fa8; }
.logo { margin-bottom: 26px; }

.menu-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.btn { padding: 12px 26px; font-size: 15px; font-weight: 700; letter-spacing: 2px; cursor: pointer;
  color: #cfe9ff; background: rgba(20,40,80,.5); border: 1px solid rgba(90,160,255,.35);
  border-radius: 8px; transition: all .15s ease; font-family: inherit; }
.btn:hover { background: rgba(40,90,180,.45); border-color: #6fc3ff; box-shadow: 0 0 16px rgba(80,180,255,.4); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(90deg,#0a3a6e,#12508f); border-color: #4db8ff;
  color: #eaf7ff; text-shadow: 0 0 8px rgba(120,200,255,.7); }
.btn-primary:hover { background: linear-gradient(90deg,#0f4a8a,#1a6ab8); box-shadow: 0 0 24px rgba(80,180,255,.6); }
.menu-foot { margin-top: 22px; font-size: 11px; letter-spacing: 2px; color: #3d5a80; }

.pause-title { font-size: 26px; font-weight: 900; letter-spacing: 6px; color: #8ff;
  text-shadow: 0 0 16px rgba(120,255,255,.8); margin-bottom: 18px; }

.go-title { font-size: 34px; font-weight: 900; letter-spacing: 5px; color: #ff4d6d;
  text-shadow: 0 0 18px rgba(255,77,109,.9); margin-bottom: 16px; }
.go-stats { margin: 14px 0; }
.go-row { display: flex; justify-content: space-between; gap: 60px; padding: 5px 0;
  font-size: 14px; letter-spacing: 1px; color: #7fa3c8; border-bottom: 1px solid rgba(90,160,255,.12); }
.go-row b { color: #e8f6ff; font-size: 16px; }

#hs-save-row { display: flex; gap: 8px; margin: 14px 0 6px; justify-content: center; }
#name-input { padding: 10px 14px; font-size: 15px; font-weight: 700; letter-spacing: 3px; text-align: center;
  background: rgba(8,16,36,.9); color: #8ff; border: 1px solid rgba(90,160,255,.4); border-radius: 8px;
  outline: none; width: 210px; font-family: inherit; text-transform: uppercase; }
#name-input:focus { border-color: #4db8ff; box-shadow: 0 0 14px rgba(80,180,255,.4); }

.hs-list { margin: 12px 0; max-height: 220px; overflow-y: auto; text-align: left; }
.hs-empty { text-align: center; color: #5a7fa8; font-size: 13px; letter-spacing: 2px; padding: 18px 0; }
.hs-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 14px;
  border-bottom: 1px solid rgba(90,160,255,.1); }
.hs-rank { width: 22px; font-weight: 900; color: #5a7fa8; }
.hs-name { flex: 1; font-weight: 700; letter-spacing: 2px; color: #cfe9ff; }
.hs-wave { width: 44px; text-align: right; color: #5a7fa8; font-size: 12px; }
.hs-score { width: 90px; text-align: right; font-weight: 800; color: #ffd733; font-variant-numeric: tabular-nums; }
.hs-top .hs-rank { color: #ffd733; }
.hs-top .hs-name { color: #ffd733; text-shadow: 0 0 10px rgba(255,215,51,.6); }

.help-grid { margin: 8px 0 14px; }
.help-row { display: flex; justify-content: space-between; gap: 30px; padding: 7px 4px;
  font-size: 14px; border-bottom: 1px solid rgba(90,160,255,.12); }
.help-row b { color: #8ff; letter-spacing: 2px; }
.help-row span { color: #7fa3c8; }
.help-note { font-size: 12.5px; line-height: 1.6; color: #7fa3c8; margin: 12px 0; letter-spacing: .4px; }

/* scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(90,160,255,.3); border-radius: 3px; }

@media (max-width: 700px) {
  .logo-main { font-size: 34px; letter-spacing: 4px; }
  #score { font-size: 26px; }
  .banner-main { font-size: 34px; letter-spacing: 3px; }
  #hud-bottom { width: 200px; }
}
