:root {
  color-scheme: dark;
  --bg: #12151a;
  --panel: #1a2027;
  --panel-2: #242b33;
  --ink: #f5f7f8;
  --muted: #a9b5bb;
  --line: #34414c;
  --red: #f25f5c;
  --blue: #49a7ff;
  --green: #45d483;
  --gold: #ffd166;
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 0 14px 28px;
}

a {
  color: inherit;
}

.pr-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 7px 12px;
  background: #211619;
  border-bottom: 1px solid #503239;
  color: #e3c7c9;
  font-size: 0.75rem;
  text-align: center;
}

.app {
  width: min(100%, 840px);
  padding-top: 44px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 35rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hub-link,
button,
.support-strip a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0 16px;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}

.scoreboard div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.scoreboard span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.scoreboard strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(73, 167, 255, 0.16), transparent 38%),
    linear-gradient(225deg, rgba(69, 212, 131, 0.13), transparent 42%),
    var(--panel-2);
  box-shadow: 0 18px 40px var(--shadow);
  touch-action: pan-y;
}

.timer-bar {
  overflow: hidden;
  height: 12px;
  border: 1px solid #52616d;
  border-radius: 999px;
  background: #11181d;
}

.timer-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
  transform-origin: left center;
}

.lane-signs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0 10px;
}

.lane-signs span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.ng-sign {
  background: rgba(242, 95, 92, 0.14);
  color: #ffb4b3;
}

.ok-sign {
  background: rgba(69, 212, 131, 0.14);
  color: #baf5d2;
}

.card {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 12px;
  margin: 0;
  padding: 22px;
  border: 1px solid #57646e;
  border-radius: 8px;
  background: #141b22;
  transition: transform 140ms ease, border-color 140ms ease;
}

.stage.correct .card {
  border-color: var(--green);
  transform: translateX(10px);
}

.stage.wrong .card {
  border-color: var(--red);
  transform: translateX(-10px);
}

.tag {
  width: fit-content;
  min-width: 92px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #202b34;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.feedback {
  min-height: 42px;
  margin: 14px 0 0;
  color: #dce6ea;
  font-weight: 800;
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

button {
  padding: 0 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  border-color: #d93f3f;
  background: var(--red);
  color: white;
}

.answer {
  min-height: 58px;
  font-size: 1.1rem;
}

.answer.no {
  border-color: #bd4a48;
  background: #3a1e22;
  color: #ffd2d1;
}

.answer.yes {
  border-color: #2fbd76;
  background: #123322;
  color: #c4f7dc;
}

.support-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.support-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #f3f8fa;
}

.result {
  position: fixed;
  inset: auto 14px 18px;
  z-index: 6;
  max-width: 520px;
  margin: auto;
  padding: 18px;
  border: 1px solid #52646e;
  border-radius: 8px;
  background: #10171d;
  box-shadow: 0 22px 60px rgba(0,0,0,0.5);
  text-align: center;
}

.result-label {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.result strong {
  display: block;
  font-size: 3rem;
}

.result p:last-of-type {
  margin: 8px 0 16px;
  color: var(--muted);
}

.result button {
  min-width: 120px;
  margin: 4px;
}

@media (max-width: 720px) {
  body {
    padding-inline: 10px;
  }

  .hero {
    align-items: start;
  }

  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage {
    min-height: 400px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .app {
    padding-top: 56px;
  }

  h1 {
    font-size: 2.18rem;
  }

  .hero {
    display: block;
  }

  .hub-link {
    margin-top: 10px;
  }

  .card {
    min-height: 210px;
    padding: 18px;
  }

  .controls,
  .support-strip {
    grid-template-columns: 1fr;
  }
}
