:root {
  /* Layout: Vollbild-Spielfläche; HUD in den Ecken, Titel- und Game-Over-Tafel mittig darüber */
  --bg: #07010f;
  --ink: #f4eaff;
  --dim: #b79fd6;
  --cyan: #40f0ff;
  --pink: #ff2bd6;
  --sun: #ffd84d;
  --warn: #ff3355;
  --display: "Audiowide", "Trebuchet MS", sans-serif;
  --mono: "Share Tech Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 var(--mono);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
canvas#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.hud {
  position: fixed;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(64, 240, 255, 0.7);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.hud small {
  display: block;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-shadow: none;
}
.hud b {
  font: 400 26px var(--display);
  color: var(--cyan);
}
#hScore {
  left: 18px;
  top: 14px;
}
#hShield {
  right: 18px;
  top: 14px;
  text-align: right;
}
#hShield b {
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255, 43, 214, 0.8);
  letter-spacing: 0.12em;
}
#hSpeed {
  left: 18px;
  bottom: 14px;
}
#hCombo {
  right: 18px;
  bottom: 14px;
  text-align: right;
}
#hCombo b {
  color: var(--sun);
  text-shadow: 0 0 8px rgba(255, 216, 77, 0.7);
}
#msg {
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  font: 400 20px var(--display);
  color: var(--sun);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}
#flash {
  position: fixed;
  inset: 0;
  background: var(--warn);
  opacity: 0;
  pointer-events: none;
}
.card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px;
}
h1 {
  font: 400 clamp(34px, 8vw, 68px)/1 var(--display);
  margin: 0;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    0 0 12px var(--pink),
    0 0 42px var(--pink),
    0 3px 0 #7a0f8c;
  text-wrap: balance;
}
h1 span {
  color: var(--cyan);
  text-shadow:
    0 0 12px var(--cyan),
    0 0 42px var(--cyan),
    0 3px 0 #0b6a80;
}
h2 {
  font: 400 34px/1 var(--display);
  margin: 0;
  color: var(--warn);
  text-shadow: 0 0 18px var(--warn);
}
.card p {
  margin: 0;
  color: var(--dim);
  text-shadow:
    0 0 6px #000,
    0 0 2px #000;
}
.card .big {
  font: 400 22px var(--display);
  color: var(--ink);
}
.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
button {
  font: 400 15px var(--display);
  letter-spacing: 0.08em;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1.5px solid var(--cyan);
  background: rgba(7, 1, 15, 0.72);
  color: var(--cyan);
  cursor: pointer;
  text-transform: uppercase;
}
button:hover {
  background: rgba(64, 240, 255, 0.16);
}
button.go {
  border-color: var(--pink);
  background: var(--pink);
  color: #19001a;
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.6);
}
button.go:hover {
  filter: brightness(1.15);
}
button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.keys {
  font-size: 12.5px;
  background: rgba(7, 1, 15, 0.6);
  border: 1px solid rgba(183, 159, 214, 0.25);
  border-radius: 4px;
  padding: 8px 12px;
}
.keys kbd {
  font: inherit;
  color: var(--ink);
}
#title {
  top: 5%;
  transform: translateX(-50%);
}
#title .keys {
  position: fixed;
  left: 50%;
  bottom: calc(-95vh + 100% + 18px);
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
}
#sound {
  position: fixed;
  right: 18px;
  top: 64px;
  padding: 7px 12px;
  font-size: 11px;
}
[hidden] {
  display: none !important;
}
#err {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--dim);
}
@media (max-width: 600px) {
  .hud b {
    font-size: 19px;
  }
}
.back {
  position: fixed;
  z-index: 20;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font:
    500 12px system-ui,
    sans-serif;
  color: #f3effc;
  background: rgba(10, 8, 22, 0.78);
  border: 1px solid rgba(190, 170, 255, 0.35);
  border-radius: 99px;
  padding: 7px 13px;
  text-decoration: none;
  white-space: nowrap;
}
.back:hover {
  border-color: #fff;
}
.back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
