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

:root {
  --neon: #00e5ff;
  --hot: #ff3b3b;
  --core: #ffd23b;
  --bg: #05070f;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: #cfefff;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}

#wrap { position: fixed; inset: 0; }

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, #0b1226 0%, #05070f 70%, #02030a 100%);
}

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-shadow: 0 0 8px rgba(0,0,0,.9);
}

.hud-top { display: flex; gap: 22px; flex-wrap: wrap; }

.bar-block { width: 230px; max-width: 32vw; }
.label {
  font-size: 11px; letter-spacing: 3px; opacity: .8;
  display: block; margin-bottom: 4px;
}
.bar {
  height: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(0,0,0,.6);
}
.fill { height: 100%; width: 100%; transition: width .12s linear; }
.fill.hp   { background: linear-gradient(90deg,#00ffa3,#00e5ff); box-shadow:0 0 12px var(--neon); }
.fill.core { background: linear-gradient(90deg,#ff9d00,#ffd23b); box-shadow:0 0 12px var(--core); }
.fill.heat { background: linear-gradient(90deg,#ff7b00,#ff3b3b); box-shadow:0 0 12px var(--hot); }

.hud-stats { display: flex; gap: 34px; align-items: flex-end; }
.stat { text-align: left; }
.stat span {
  font-size: 30px; font-weight: 800; letter-spacing: 1px;
  color: #fff; text-shadow: 0 0 14px var(--neon);
  font-variant-numeric: tabular-nums;
}
.stat small { display: block; font-size: 10px; letter-spacing: 3px; opacity: .65; }

/* ---------- Overlays ---------- */
.overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(5,7,15,.72), rgba(2,3,10,.94));
  backdrop-filter: blur(2px);
  padding: 24px;
}
.overlay h1 {
  font-size: clamp(46px, 9vw, 120px);
  letter-spacing: 14px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 24px var(--neon), 0 0 60px rgba(0,229,255,.5);
}
.overlay .tag { font-size: 17px; line-height: 1.5; opacity: .9; max-width: 640px; }
.overlay .hint { font-size: 13px; opacity: .6; max-width: 560px; }
.controls {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px; line-height: 1.4; opacity: .92;
  background: rgba(0,229,255,.05);
  border: 1px solid rgba(0,229,255,.18);
  border-radius: 10px;
  padding: 16px 22px;
}
.controls b { color: var(--neon); letter-spacing: 1px; }

button {
  margin-top: 8px;
  padding: 14px 46px;
  font-size: 18px; letter-spacing: 4px; font-weight: 800;
  color: #02131a;
  background: linear-gradient(90deg, #00ffa3, #00e5ff);
  border: none; border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(0,229,255,.6);
  transition: transform .08s ease, box-shadow .2s ease;
}
button:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(0,229,255,.9); }
button:active { transform: scale(.98); }
