body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", system-ui, sans-serif;
  overflow-x: hidden;
  background: radial-gradient(ellipse 120% 80% at 50% 20%, #1a0a35 0%, #0a0612 55%, #050208 100%);
}

canvas {
  position: absolute;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.12),
    0 0 60px rgba(0, 160, 255, 0.18),
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.ctn {
  position: relative;
  width: 360px;
  height: 640px;
  border-radius: 14px;
  padding: 3px;
  background: linear-gradient(145deg, rgba(80, 200, 255, 0.35), rgba(180, 80, 255, 0.15), rgba(0, 200, 200, 0.25));
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

.ctn-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  overflow: hidden;
  background: #06020c;
}

#scoreboard {
  position: absolute;
  top: 36px;
  left: 0;
  width: 360px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: rgba(160, 220, 255, 0.55);
  pointer-events: none;
  z-index: 2;
}

#scoreboard .score-num {
  display: block;
  margin-top: 6px;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #b8f8ff;
  text-shadow:
    0 0 20px rgba(0, 240, 255, 0.5),
    0 0 40px rgba(100, 200, 255, 0.25);
  transition: transform 0.12s ease;
}

#scoreboard.pop .score-num {
  transform: scale(1.12);
  color: #ffffff;
}

#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  height: 640px;
  pointer-events: none;
  z-index: 3;
}

.game-title {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 16px;
}

.game-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.35em;
  background: linear-gradient(90deg, #8aefff, #c8a8ff, #8aefff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(100, 200, 255, 0.25));
}

.game-title .sub {
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(180, 210, 255, 0.45);
}

.tagline {
  position: absolute;
  top: 168px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.6;
  color: rgba(180, 230, 255, 0.7);
  margin: 0;
  padding: 0 28px;
}

#gameover-screen {
  visibility: hidden;
  position: absolute;
  width: 360px;
  height: 640px;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse 80% 50% at 50% 45%, rgba(10, 5, 30, 0.75) 0%, rgba(5, 2, 12, 0.92) 100%);
}

#gameover-screen.visible {
  pointer-events: auto;
}

#gameover {
  width: 300px;
  max-width: 90%;
  background: linear-gradient(160deg, rgba(35, 20, 65, 0.95) 0%, rgba(15, 8, 35, 0.98) 100%);
  color: #f0f4ff;
  padding: 22px 24px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: auto;
  margin-top: 220px;
  border: 1px solid rgba(120, 200, 255, 0.35);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(100, 150, 255, 0.15);
}

#gameover .go-sub {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(200, 220, 255, 0.45);
}

#replay {
  width: 200px;
  background: linear-gradient(180deg, rgba(0, 200, 255, 0.2) 0%, rgba(0, 120, 180, 0.12) 100%);
  color: #a8f0ff;
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  transition: background 0.25s, color 0.25s, transform 0.15s;
  margin: 48px auto;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.08);
}

#replay:hover {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.3) 0%, rgba(0, 160, 220, 0.2) 100%);
  color: #fff;
  transform: translateY(-1px);
}

#ctrl-ctn {
  position: absolute;
  top: 360px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 0.55s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
}

.ctrl-btn {
  min-width: 140px;
  background: rgba(18, 12, 40, 0.92);
  color: #b0e8ff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 6px;
  letter-spacing: 0.12em;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
