:root {
  --bg: #0b0f1a;
  --panel: rgba(10, 14, 24, 0.88);
  --accent: #4ff2c8;
  --text: #e6f1ff;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #0b111a;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  overflow: hidden;
}

#game {
  width: 100%;
  height: 100%;
  display: block;
}

#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  width: 320px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  pointer-events: auto;
}

#menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#menu h1 {
  margin: 0 0 16px 0;
  font-weight: 600;
  letter-spacing: 1px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

input, select {
  margin-top: 6px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

button {
  background: var(--accent);
  color: #0a0c12;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 18px rgba(79, 242, 200, 0.35);
  filter: brightness(1.05);
}

button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(79, 242, 200, 0.25);
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.hint {
  margin: 14px 0 0 0;
  font-size: 12px;
  color: rgba(230,241,255,0.7);
}

#hud {
  position: absolute;
  right: 30px;
  top: 20px;
  width: 220px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  color: #e6eefc;
}

#deathScreen {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 320px;
}

#deathScreen h2 {
  margin: 0 0 10px 0;
  font-size: 28px;
  color: #ff4d4d;
}


.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#leaderboard {
  font-size: 13px;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lb-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lb-entry {
  margin: 2px 0;
  letter-spacing: 0.3px;
  display: grid;
  grid-template-columns: 44px 1fr 64px;
  align-items: center;
  gap: 8px;
}

.lb-rank {
  display: inline-block;
  font-weight: 700;
}

.lb-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-empty {
  opacity: 0.7;
}

@media (max-width: 700px) {
  #menu, #hud {
    width: 90%;
    left: 5%;
    right: 5%;
  }
}
