/* BLAZE RUNNER - dark arcade theme, Blaze design system. */
:root {
  --bg: #050508;
  --panel: #0d0d12;
  --yellow: #faf000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.08);
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(rgba(250, 240, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 240, 0, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  overflow: hidden;
  touch-action: none;
}

/* CRT scanlines overlay */
.scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 30;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  mix-blend-mode: multiply;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.logo {
  opacity: 0.9;
}
.mute {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 38px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
}
.mute:hover {
  border-color: var(--yellow);
}

#game {
  display: block;
  width: 100%;
  aspect-ratio: 960 / 360;
  image-rendering: auto;
  z-index: 5;
}

.accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--yellow);
  z-index: 20;
}

/* ---- Overlay screens ---- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 60px;
  background: radial-gradient(circle at 50% 40%, rgba(13, 13, 18, 0.82), rgba(5, 5, 8, 0.96));
  overflow-y: auto;
}
.screen.hidden {
  display: none;
}
/* Game-over: fit on ONE page (no scroll). The inner block is scaled down by JS
   if it would overflow, so everything is always visible without scrolling. */
#screen-over {
  justify-content: flex-start;
  overflow: hidden;
  padding: 24px;
  /* solid, so the frozen game never bleeds through - reads as its own screen */
  background:
    linear-gradient(rgba(250, 240, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 240, 0, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, #0d0d12, #050508 70%);
  background-size: 64px 64px, 64px 64px, 100% 100%;
}
.over-inner {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}
/* two centered columns: left = everything + Play Again, right = share */
.over-cols {
  display: flex;
  gap: 32px;
  width: 100%;
  align-items: center;
  justify-content: center;
}
.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.col-main {
  flex: 1 1 440px;
  max-width: 460px;
  gap: 14px;
}
.col-share {
  flex: 0 1 380px;
  max-width: 380px;
  gap: 14px;
}
.col-main > .panel,
.col-main > .dodged-wrap,
.col-main > .killed,
.col-main > .btn-primary,
.col-share > .sharecard {
  width: 100%;
}
/* centered header hierarchy: eyebrow -> big score -> line */
.over-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.share-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill {
  display: inline-block;
  background: var(--yellow);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid #000;
  margin-bottom: 18px;
}
.pill.high {
  background: #3fb950;
  color: #041006;
}
.pill.high:empty {
  display: none;
}

h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(56px, 12vw, 128px);
  line-height: 0.9;
  letter-spacing: 0.02em;
}
h1 + .subtitle {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: clamp(11px, 2vw, 15px);
  text-transform: uppercase;
  margin-top: 6px;
}
.pitch {
  color: var(--muted);
  max-width: 520px;
  margin: 18px auto 6px;
  font-size: 15px;
  line-height: 1.5;
}
.controls {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 12px;
}
.controls b {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  margin-right: 6px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}

/* buttons */
.btn {
  display: inline-block;
  cursor: pointer;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--yellow);
  color: #000;
  border: 1.5px solid #000;
  padding: 14px 42px;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.btn-primary:hover {
  background: #fff400;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  font-size: 13px;
}
.btn-ghost:hover {
  border-color: var(--yellow);
}

/* game over */
.bigscore {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 11vw, 104px);
  line-height: 0.82;
  color: var(--yellow);
  letter-spacing: 0.01em;
}
.scoreline {
  font-size: 15px;
  margin-top: 4px;
}
.dodged {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
/* Recap of the exact payment problem that ended the run + the Blaze fix. */
.killed {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
}
.killed:empty {
  display: none;
}
.killed b {
  color: #ff5f56;
}
.killed .fix {
  color: var(--yellow);
  font-weight: 600;
}

/* D: "problems you dodged" recap chips */
.dodged-wrap {
  width: 100%;
  margin: 0;
}
.dodged-wrap.hidden {
  display: none;
}
.dodged-wrap h4 {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}
.dodged-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dodged-list .chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
}
.dodged-list .prob {
  color: #ff5f56;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 95, 86, 0.6);
}
.dodged-list .prob::before {
  content: '✓ ';
  color: #3fb950;
  text-decoration: none;
}
.dodged-list .fixv {
  color: var(--yellow);
  font-weight: 600;
}

/* B: email-first CTA */
.cta {
  text-align: center;
}
.panel.cta h3 {
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.cta .leadrow {
  margin-top: 12px;
  align-items: stretch;
}
.cta .btn-primary {
  white-space: nowrap;
  padding: 12px 20px;
  font-size: 14px;
}
.leadrow input {
  padding: 12px 14px;
}
.luc-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.luc-link:hover {
  color: var(--yellow);
}

.panels {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  width: 100%;
  max-width: 720px;
  flex-wrap: wrap;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
}
.panel h3 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.leadrow {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.leadrow input {
  flex: 1;
  min-width: 0;
  background: #000;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.leadrow input:focus {
  outline: none;
  border-color: var(--yellow);
}
.cta .cta-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.cta .btn-primary {
  padding: 11px 18px;
  font-size: 14px;
}
.msg {
  font-size: 12px;
  margin-top: 8px;
  min-height: 16px;
  color: var(--yellow);
}

.sharecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.sharecard img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.sharebtns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.sharebtns .btn-ghost {
  padding: 10px 16px;
  font-size: 13px;
}

@media (max-width: 620px) {
  .over-cols {
    flex-direction: column;
    gap: 18px;
  }
  .controls {
    font-size: 11px;
  }
}
