/* Orbitron is self-hosted (fonts/fonts.css, linked from index.html) instead of Google Fonts. */

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #05031a;
  color: #e8f6ff;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hidden { display: none !important; }

.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  padding: 16px;
  z-index: 10;
}

.logo {
  width: min(640px, 90vw);
  max-height: 48vh;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(40, 180, 255, .45));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.blink {
  font-size: 18px; letter-spacing: 4px;
  color: #7fe3ff;
  text-shadow: 0 0 12px #1fb8ff;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.menu { display: flex; flex-direction: column; gap: 14px; align-items: center; }

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 4px;
  min-width: 260px;
  padding: 14px 28px;
  color: #eaf8ff;
  background: linear-gradient(180deg, rgba(40, 70, 160, .85), rgba(18, 22, 80, .9));
  border: 2px solid #3fc8ff;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(63, 200, 255, .35), inset 0 0 12px rgba(63, 200, 255, .2);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover, .btn:focus-visible {
  outline: none;
  transform: scale(1.05);
  background: linear-gradient(180deg, rgba(70, 110, 220, .95), rgba(60, 20, 140, .95));
  box-shadow: 0 0 26px rgba(63, 200, 255, .8), inset 0 0 14px rgba(170, 90, 255, .4);
}

.hiscore { font-size: 14px; letter-spacing: 3px; color: #9fb4ff; }
.hiscore span { color: #fff; }

.panel {
  width: min(520px, 100%);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
  background: rgba(10, 12, 50, .82);
  border: 2px solid rgba(63, 200, 255, .6);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(63, 200, 255, .25), 0 0 80px rgba(150, 60, 255, .2);
  backdrop-filter: blur(4px);
}
.panel h2 {
  font-size: 32px; font-weight: 900; letter-spacing: 6px;
  background: linear-gradient(180deg, #ffffff, #8fd8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(63, 200, 255, .6));
}

.row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.2fr 48px;
  align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: 1px;
}
.row .val { text-align: right; color: #7fe3ff; }
.row:has(.seg) { grid-template-columns: 1fr auto; }

input[type=range] { width: 100%; accent-color: #3fc8ff; cursor: pointer; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: #3fc8ff; cursor: pointer; justify-self: start; }

.seg { display: flex; border: 1px solid #3fc8ff; border-radius: 8px; overflow: hidden; }
.seg button {
  font-family: inherit; font-size: 11px; letter-spacing: 1px;
  padding: 8px 10px;
  background: transparent; color: #bfe9ff;
  border: none; cursor: pointer;
}
.seg button + button { border-left: 1px solid rgba(63, 200, 255, .5); }
.seg button.active { background: #3fc8ff; color: #05031a; font-weight: 700; }

.controls {
  width: 100%;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px; line-height: 1.7;
  color: #b8c8ff;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .25);
  border-radius: 8px;
}
.controls b { color: #7fe3ff; display: inline-block; min-width: 52px; }

.final { font-size: 24px; letter-spacing: 3px; }
.final span { color: #7fe3ff; }
.final.small { font-size: 14px; color: #ffd36b; min-height: 18px; }

/* HUD */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 18px;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 0 8px rgba(63, 200, 255, .8);
}
.hud-label { font-size: 11px; letter-spacing: 3px; color: #7fe3ff; }
.hud-value { font-size: 26px; font-weight: 900; }
.hud-right { text-align: right; }
.hud-lives { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.hud-lives img { width: 26px; height: auto; filter: drop-shadow(0 0 4px #3fc8ff); }
.hud-power {
  margin-top: 6px;
  font-size: 13px; letter-spacing: 3px; color: #d3a6ff;
  text-shadow: 0 0 10px #a060ff;
}
