@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #fff;
}

#game-container { width: 100%; height: 100%; }
canvas { display: block; }

/* ── Vignette ─────────────────────────────────────────────── */
.vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 4;
  background: radial-gradient(
    ellipse at center,
    transparent 45%,
    rgba(0,0,0,0.32) 72%,
    rgba(0,0,0,0.72) 100%
  );
}

/* ── Police siren flash ───────────────────────────────────── */
.siren-overlay {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 3;
  opacity: 0;
  transition: opacity 0.18s;
}
.siren-overlay.active {
  opacity: 1;
  animation: siren 0.55s infinite;
}
@keyframes siren {
  0%,  49.9% { background: radial-gradient(ellipse 35% 90% at 0% 50%,   rgba(255,20,20,0.2)  0%, transparent 100%); }
  50%, 100%  { background: radial-gradient(ellipse 35% 90% at 100% 50%, rgba(30,80,255,0.18) 0%, transparent 100%); }
}

/* ── Shared label style ───────────────────────────────────── */
.hud-eyebrow {
  display: block;
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.38em;
  color: rgba(255,255,255,0.35);
}

/* ── Score – top-left floating ────────────────────────────── */
.hud-score {
  position: fixed; top: 22px; left: 24px;
  z-index: 5; pointer-events: none;
  line-height: 1;
}
.hud-eyebrow { margin-bottom: 3px; }
.hud-score__num {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.4rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
  line-height: 1;
}

/* ── Buttons – top-right ──────────────────────────────────── */
.hud-actions {
  position: fixed; top: 20px; right: 20px;
  z-index: 5;
  display: flex; gap: 8px;
}
.hud-btn {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  font-family: inherit;
  outline: none;
}
.hud-btn:hover  { background: rgba(255,255,255,0.14); color: #fff; }
.hud-btn:active { transform: scale(0.88); }

/* ── Speed – bottom-left ──────────────────────────────────── */
.hud-speed {
  position: fixed; bottom: 28px; left: 26px;
  z-index: 5; pointer-events: none;
}
.hud-speed__num {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
  line-height: 1;
  margin-bottom: 3px;
}

/* ── Wanted stars – bottom-right ─────────────────────────── */
.wanted-level {
  position: fixed; bottom: 28px; right: 26px;
  z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
  opacity: 0;
  transition: opacity 0.2s;
}
.wanted-level.visible { opacity: 1; }

.wanted-stars { display: flex; gap: 6px; }
.wanted-star {
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(255,255,255,0.12);
  transition: color 0.18s, filter 0.25s;
}
.wanted-star.active {
  color: #ff3232;
  filter: drop-shadow(0 0 7px rgba(255,40,40,0.95));
}

/* ── Game Over ────────────────────────────────────────────── */
.gameover {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(55,0,0,0.7);
  backdrop-filter: blur(3px);
  transition: opacity 0.4s ease;
}
.gameover.hidden { opacity: 0; pointer-events: none; }

.gameover__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 12vw, 9rem);
  letter-spacing: 0.22em;
  color: #fff;
  line-height: 1;
  text-shadow:
    0 0 60px rgba(255,30,30,0.55),
    0 4px 30px rgba(0,0,0,0.8);
  margin-bottom: 14px;
}
.gameover__score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  letter-spacing: 0.05em;
  color: #ffd447;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,200,50,0.45);
}
.gameover__score-sub {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-top: 5px;
  margin-bottom: 36px;
}
.gameover__btn {
  background: #fff;
  color: #1c0000;
  border: none;
  border-radius: 7px;
  padding: 12px 46px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.gameover__btn:hover  { filter: brightness(0.88); }
.gameover__btn:active { transform: scale(0.95); }

/* ── Splash / Instruction screen ─────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 12;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.88);
  transition: opacity 0.3s ease;
  padding: 24px;
  text-align: center;
}
.splash.hidden { opacity: 0; pointer-events: none; }

.splash__eyebrow {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 6px;
}
.splash__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  letter-spacing: 0.16em;
  color: #fff;
  line-height: 1;
  margin-bottom: 14px;
  text-shadow: 0 2px 30px rgba(255,255,255,0.1);
}
.splash__sub {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  max-width: 380px;
  margin-bottom: 40px;
}

.splash__controls {
  display: flex;
  gap: 0;
  margin-bottom: 44px;
  text-align: left;
  flex-wrap: wrap;
  justify-content: center;
}
.splash__col { min-width: 170px; padding: 0 32px; }
.splash__rule {
  width: 1px;
  background: rgba(255,255,255,0.08);
  align-self: stretch;
  flex-shrink: 0;
}
.splash__col-label {
  font-size: 0.54rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: rgba(255,255,255,0.28);
  margin-bottom: 14px;
}
.splash__controls ul {
  list-style: none;
  padding: 0; margin: 0;
  line-height: 2.1;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}
.splash__controls li::before {
  content: "–";
  color: #ffd447;
  margin-right: 10px;
}
kbd {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 7px;
  font-family: inherit;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;
}

.splash__btn {
  background: #ffd447;
  color: #0a0600;
  border: none;
  border-radius: 8px;
  padding: 14px 56px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.35em;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.splash__btn:hover  { filter: brightness(1.1); }
.splash__btn:active { transform: scale(0.96); }

@media (max-width: 560px) {
  .splash__rule { display: none; }
  .splash__col  { padding: 0 16px; }
}
