/* VOID BREAKER — DARK palette for DAJAI PLAY.
   Original game (all canvas-drawn). No third-party CSS, fonts, or art.
   bg #06060a · surface #0c0c12 · accent/red #E0264A · gold #e8c87a · border #1a1a24 */

:root {
  --bg: #0a0908;
  --surface: #14110f;
  --border: #221d1a;
  --red: #FF2D55;
  --gold: #ffd400;
  --ink: #f4f1ea;
  --muted: #9a96a6;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ---- HUD ---- */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 10px calc(14px + env(safe-area-inset-left));
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(10,9,8,0.9), rgba(10,9,8,0));
  pointer-events: none;
}
#hud .stat b { color: var(--gold); font-weight: 600; }
#hud .stat span { color: var(--ink); }
#hud .grow { flex: 1; }
#btn-mute {
  pointer-events: auto;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  width: 38px; height: 32px;
  background: var(--surface);
  color: var(--gold);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
#btn-mute:hover { border-color: var(--gold); }
#btn-mute:active { background: var(--red); border-color: var(--red); }

/* ---- canvas ---- */
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
}

/* ---- touch controls ---- */
#touch {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
html.is-touch #touch { display: block; }

#touch .pad {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  pointer-events: none;
}
#touch .pad.left { left: calc(18px + env(safe-area-inset-left)); }
#touch .pad.right { right: calc(18px + env(safe-area-inset-right)); flex-direction: row-reverse; }

#touch button {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20, 17, 15, 0.82);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: background 0.08s, box-shadow 0.08s, border-color 0.08s;
}
#touch button.active,
#touch button:active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 18px rgba(255, 45, 85, 0.6);
}
#touch .fire {
  width: 78px; height: 78px; font-size: 16px;
  color: var(--red);
  border-color: rgba(255, 45, 85, 0.5);
}
#touch .fire.active { color: #fff; }
#touch .hyper { font-size: 12px; color: var(--gold); }

/* ---- start hint (mobile) ---- */
#btn-start {
  display: none;
  position: absolute;
  left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: auto;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  padding: 13px 30px;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(255, 45, 85, 0.45);
  animation: startPulse 1.8s ease-in-out infinite;
}
@keyframes startPulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(255, 45, 85, 0.35); }
  50% { box-shadow: 0 6px 30px rgba(255, 45, 85, 0.7); }
}
html.is-touch #btn-start { display: block; }
