:root {
  --bg: #070712;
  --panel: #14182f;
  --line: #3d4875;
  --ink: #eef2ff;
  --cyan: #5ef6ff;
  --amber: #ffd866;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, #2a3566 0%, transparent 44%),
    radial-gradient(circle at 85% 8%, #5a2b66 0%, transparent 45%),
    var(--bg);
}

.app {
  width: min(1080px, 94vw);
  margin: 1.1rem auto 2rem;
}

h1 {
  margin: 0;
  color: var(--cyan);
  text-shadow: 0 0 20px #5ef6ff54;
}

header p {
  margin: 0.45rem 0 0.9rem;
  opacity: 0.9;
}

.hud,
.controls,
.stage-wrap {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(180deg, #171b36, #0e1124);
  box-shadow: 0 12px 30px #0008, inset 0 0 0 1px #0004;
}

.hud {
  padding: 0.68rem 0.72rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}

.hud .label {
  display: block;
  font-size: 0.73rem;
  opacity: 0.72;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
}

.controls {
  margin-top: 0.8rem;
  padding: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

button {
  border: 1px solid #55639b;
  border-radius: 8px;
  background: #151a34;
  color: var(--ink);
  font: inherit;
  padding: 0.46rem 0.68rem;
  cursor: pointer;
}

button:hover {
  border-color: #a2b5ff;
}

button.primary {
  border-color: #8df8ff;
  box-shadow: 0 0 14px #5ef6ff3d;
}

#status {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--amber);
  flex: 1;
}

.stage-wrap {
  margin-top: 0.8rem;
  position: relative;
  overflow: hidden;
}

#game {
  width: 100%;
  height: auto;
  display: block;
  background: #04050d;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  mix-blend-mode: soft-light;
}
