:root {
  --bg-void: #0a0e14;
  --bg-panel: #10151ecc;
  --accent: #5ec8ff;
  --accent-2: #7dff8a;
  --text-main: #e8f1f7;
  --text-dim: #7c8a9a;
  --danger: #ff5e5e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-void);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
}

#game {
  position: absolute;
  top: 0; left: 0;
  display: block;
  background: var(--bg-void);
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #131a24 0%, #05070a 100%);
  z-index: 10;
}

.overlay.hidden { display: none; }

.panel {
  text-align: center;
  padding: 40px 48px;
  border: 1px solid #ffffff14;
  border-radius: 18px;
  background: var(--bg-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 60px #5ec8ff22;
  max-width: 420px;
  width: 90%;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  letter-spacing: 1px;
  margin: 0 0 10px;
  color: var(--text-main);
}
h1 span {
  display: block;
  font-size: 20px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 4px;
}
.deadTitle { color: var(--danger); font-size: 24px; }

.tagline {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.finalScore {
  font-size: 18px;
  color: var(--accent-2);
  margin: -8px 0 18px;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ffffff22;
  background: #0d1117;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
}
input:focus { border-color: var(--accent); }

button {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05070a;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px #5ec8ff33; }
button:active { transform: translateY(0); }

.hint {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hint b { color: var(--text-main); }

#hud { position: absolute; inset: 0; pointer-events: none; }
#hud.hidden { display: none; }

.hudBox {
  position: absolute;
  background: var(--bg-panel);
  border: 1px solid #ffffff14;
  border-radius: 12px;
  padding: 10px 16px;
  backdrop-filter: blur(6px);
}

#score {
  top: 16px;
  left: 16px;
  font-size: 15px;
  font-weight: 600;
}
#score span { color: var(--accent-2); }

#leaderboard {
  top: 16px;
  right: 16px;
  min-width: 170px;
}
.lbTitle {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
#lbList {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#lbList li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
#lbList li span:last-child { color: var(--accent); }
