:root {
  --bg: #0d1726;
  --card: #15253a;
  --card-2: #1c3049;
  --line: #2a3f5a;
  --teal: #27d7c8;
  --blue: #3d8bff;
  --blue-2: #2a6fe0;
  --gold: #ffc83d;
  --text: #eef4ff;
  --muted: #8ea3bf;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 15% -10%, rgba(61, 139, 255, 0.18), transparent 70%),
    radial-gradient(700px 500px at 100% 20%, rgba(39, 215, 200, 0.10), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
h1, h2, h3, p { margin: 0; }

/* Header: sticky, not fixed */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 23, 38, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top__in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--gold); }
.top__link {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.top__link:hover { border-color: var(--teal); }

/* Layout */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 20px;
}
.col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .page { grid-template-columns: 1.1fr 1fr; gap: 28px; padding-top: 28px; }
  .col--side { position: sticky; top: 76px; }
}

/* Train scene */
.scene {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(26% 34% at 72% 30%, rgba(255, 214, 120, 0.85), rgba(255, 170, 80, 0) 70%),
    radial-gradient(1.5px 1.5px at 12% 14%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 8%, #fff, transparent),
    radial-gradient(1px 1px at 46% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 10%, #fff, transparent),
    radial-gradient(1px 1px at 60% 6%, #fff, transparent),
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    linear-gradient(180deg, #1b1446 0%, #4b2a7a 34%, #c4507c 62%, #f39a4a 82%, #f7c46a 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(13, 23, 38, 0.75));
  pointer-events: none;
}
.scene__poster,
.scene__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scene__poster { object-fit: cover; transition: opacity 0.4s; }
.scene.is-live .scene__poster { opacity: 0; }
.scene__power {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(13, 23, 38, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 599px) {
  .scene__power { left: 8px; bottom: 8px; gap: 8px; padding: 5px 9px; font-size: 10px; }
  .scene__power .power i { width: 12px; height: 6px; }
}
.power { display: flex; gap: 4px; }
.quiz__power {
  margin: -6px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.power i {
  width: 18px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s, box-shadow 0.3s;
}
.power i.is-on { background: var(--gold); box-shadow: 0 0 8px rgba(255, 200, 61, 0.8); }
.power i.is-max { background: #ff7a2f; box-shadow: 0 0 10px rgba(255, 122, 47, 0.9); }

/* Intro */
.intro h1 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
}
.intro h1 span { color: var(--gold); }
.intro p { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (min-width: 900px) { .intro h1 { font-size: 40px; } }

/* Bonus banner (as in the reference) */
.bonus__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 14px 18px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #1d3a5c 0%, #172b44 55%, #12324a 100%);
  box-shadow: inset 0 0 0 1px rgba(63, 240, 222, 0.25);
}
.bonus__kicker {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bonus__big {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
}
.bonus__fs {
  margin-top: 2px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}
.bonus__gift { width: 118px; flex: 0 0 auto; }
@media (max-width: 380px) {
  .bonus__big { font-size: 22px; }
  .bonus__fs { font-size: 19px; }
  .bonus__gift { width: 92px; }
}

.cta {
  display: block;
  margin-top: 12px;
  padding: 17px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #4f9bff, var(--blue-2));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(61, 139, 255, 0.35);
  transition: filter 0.15s, box-shadow 0.15s;
}
.cta:hover { filter: brightness(1.1); box-shadow: 0 10px 30px rgba(61, 139, 255, 0.55); }

/* Quiz */
.quiz {
  padding: 20px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.quiz__head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.quiz__title { font-size: 20px; font-weight: 800; }
.quiz__pct {
  padding: 2px 9px;
  border-radius: 999px;
  background: #3b3fd8;
  font-size: 12px;
  font-weight: 800;
}
.quiz__sub { margin-top: 4px; color: var(--muted); font-size: 14px; text-align: center; }

.stepper {
  list-style: none;
  margin: 18px auto 20px;
  padding: 0;
  max-width: 340px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.stepper::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 2px;
  background: var(--line);
}
.stepper li { position: relative; }
.stepper span {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card-2);
  box-shadow: 0 0 0 4px var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: background 0.3s, color 0.3s;
}
.stepper span img { width: 20px; height: 19px; }
.stepper li.is-active span { background: var(--blue); color: #fff; }
.stepper li.is-done span { background: var(--teal); color: #08303a; }

.step h3, .done h3 { font-size: 18px; text-align: center; }
.answers {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.answers--list { grid-template-columns: 1fr; }
.answers button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.answers button img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; }
.answers button:hover { border-color: var(--teal); background: #22395a; }
.answers button:active { transform: scale(0.98); }
.step:not([hidden]) { animation: stepIn 0.35s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Final gift screen */
.done { text-align: center; animation: stepIn 0.35s ease-out; }
.gift { display: block; width: 150px; height: auto; margin: 0 auto 6px; overflow: visible; }
.gift__lid { transform-box: fill-box; transform-origin: 0% 100%; animation: lidOpen 1.4s 0.3s cubic-bezier(.3, 1.6, .5, 1) both; }
.gift__body { transform-box: fill-box; transform-origin: 50% 100%; animation: giftShake 0.6s ease-in-out 2; }
.gift__burst { transform-box: fill-box; transform-origin: center; animation: burst 2.4s 0.5s ease-in-out infinite; opacity: 0; }
.gift__coins { animation: coinsUp 1s 0.7s ease-out both; }
@keyframes lidOpen { 0% { transform: none; } 100% { transform: translate(-6px, -18px) rotate(-22deg); } }
@keyframes giftShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes burst { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes coinsUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(-14px); } }

.done__offer { margin-top: 10px; color: var(--gold); font-size: 22px; line-height: 1.2; font-weight: 900; text-transform: uppercase; }
.done__offer b { color: #fff; }
.done__note { margin-top: 8px; color: var(--muted); font-size: 14px; }
.done__btn {
  width: 100%;
  margin-top: 16px;
  padding: 17px 24px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffd96b, #f2a91d);
  color: #2b1a00;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.55); } 50% { box-shadow: 0 0 0 10px rgba(255, 200, 61, 0); } }

/* Features */
.features { display: grid; gap: 10px; }
.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(21, 37, 58, 0.7);
}
.feature img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; }
.feature b { display: block; font-size: 15px; text-transform: uppercase; }
.feature span { color: var(--muted); font-size: 14px; }

/* Footer */
.bottom {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 20px 16px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.bottom a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .step:not([hidden]), .done, .gift__lid, .gift__body, .gift__burst, .gift__coins, .done__btn { animation: none; }
}
