* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1e293b, #020617);
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  color: #e2e8f0;
}

.wrap {
  text-align: center;
}

h1 {
  margin: 0 0 12px;
  letter-spacing: 1px;
  font-size: 28px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hud {
  display: flex;
  justify-content: space-between;
  width: 560px;
  margin: 0 auto 10px;
  font-size: 18px;
  font-weight: 600;
}

.stage {
  position: relative;
  width: 560px;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid #1e293b;
}

canvas {
  display: block;
  background: #0f172a;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
}

.overlay.hidden {
  display: none;
}

.overlay h2 {
  margin: 0;
  font-size: 26px;
}

.overlay p {
  margin: 0;
  max-width: 380px;
  color: #94a3b8;
}

#startBtn {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #00d4ff, #0070ff);
  color: #000;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

#startBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.6);
}

.hint {
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
}

.name-input-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.player-name-input {
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #0ea5e9;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  outline: none;
  transition: all 0.2s ease;
}

.player-name-input:focus {
  background: rgba(15, 23, 42, 1);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.player-name-input::placeholder {
  color: #64748b;
}

.submit-score-btn {
  padding: 10px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.submit-score-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}
