:root {
  --neon-cyan: #16f2ff;
  --neon-magenta: #ff3df0;
  --neon-green: #4dffb0;
  --neon-yellow: #ffe14d;
  --bg-0: #01020a;
  --glass: rgba(10, 16, 40, 0.55);
  --glass-brd: rgba(80, 200, 255, 0.35);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: #eaf6ff;
  font-family: "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#game-container canvas { display: block; }

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(22, 242, 255, 0.6);
}

.hud-item {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  padding: 6px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 70px;
}

.hud-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  opacity: 0.85;
}

.hud-item span:last-child {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

#hud-lives { color: var(--neon-magenta); text-shadow: 0 0 10px var(--neon-magenta); }

.hud-sound {
  pointer-events: auto;
  margin-left: auto;
  cursor: pointer;
  font-size: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.hud-sound:hover { transform: scale(1.08); box-shadow: 0 0 16px rgba(22,242,255,.5); }

/* ---------- Overlay screens ---------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.screen {
  pointer-events: auto;
  text-align: center;
  padding: 46px 54px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 60px rgba(22, 242, 255, 0.18), inset 0 0 30px rgba(255, 61, 240, 0.06);
  animation: pop 0.35s ease;
}

.screen.hidden { display: none; }

@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 12px var(--neon-cyan), 0 0 28px var(--neon-magenta);
}
.title.small { font-size: 40px; }
.title.danger { color: #fff; text-shadow: 0 0 12px var(--neon-magenta), 0 0 30px #ff2a2a; }
.title span {
  display: inline-block;
  margin: 0 10px;
  color: var(--neon-magenta);
  text-shadow: 0 0 14px var(--neon-magenta);
}

.subtitle {
  margin-top: 16px;
  font-size: 16px;
  color: #bfe9ff;
  opacity: 0.9;
}

.btn {
  margin-top: 26px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #012;
  padding: 14px 34px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-green));
  box-shadow: 0 0 24px rgba(22, 242, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 34px rgba(77, 255, 176, 0.8); }
.btn:active { transform: scale(0.98); }

.controls {
  margin-top: 30px;
  font-size: 14px;
  color: #a9d8ff;
  line-height: 1.9;
}
.controls b { color: var(--neon-yellow); }

@media (max-width: 600px) {
  .title { font-size: 38px; }
  .title.small { font-size: 28px; }
  .screen { padding: 32px 26px; }
}
