:root {
  color-scheme: dark;
  --bg: #0e0b1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f6f2ff;
  --muted: #a8a1c4;
  --accent: #ff6b2c;
  --accent-2: #8b5cf6;
  --accent-text: #1a0a00;
  --hot: linear-gradient(135deg, #ff9a3c 0%, #ff4f6d 100%);
  --good: #3ee08f;
  --good-bg: rgba(62, 224, 143, 0.13);
  --bad: #ff5470;
  --bad-bg: rgba(255, 84, 112, 0.13);
  --gold: #ffd166;
  --radius: 20px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
/* Glow layer pinned to the screen, so long pages don't show its edge. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(55vmax 45vmax at 100% 100%, rgba(255, 107, 44, 0.22), transparent 60%);
}
a { color: var(--accent); }

/* ---------- header & footer ---------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px 14px;
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.orb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 14px 2px rgba(255, 107, 44, 0.75);
  display: inline-block;
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  50% { box-shadow: 0 0 22px 6px rgba(255, 79, 109, 0.85); transform: scale(1.12); }
}
header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.92rem;
  font-weight: 500;
}
header.site nav a:hover { color: var(--text); }

main {
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 32px;
}
footer.site {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 28px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
footer.site a { color: var(--muted); margin: 0 6px; text-decoration: none; }
footer.site a:hover { color: var(--text); }

/* ---------- building blocks ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pop-in { animation: popIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
}

h1, h2 { font-family: var(--display); letter-spacing: -0.02em; }
h1 { font-size: 2rem; line-height: 1.08; margin: 0 0 10px; font-weight: 800; }
h2 { font-size: 1.25rem; margin: 0 0 10px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

button, .btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 14px;
  padding: 15px 16px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: transform 0.08s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
button:hover:not(:disabled), .btn:hover { border-color: rgba(255, 255, 255, 0.28); }
button:active:not(:disabled), .btn:active { transform: scale(0.97); }
button:disabled { cursor: default; }
.btn-primary, button.primary {
  background: var(--hot);
  border: 0;
  color: var(--accent-text);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 8px 28px -8px rgba(255, 79, 109, 0.7);
}
.btn-primary:hover, button.primary:hover:not(:disabled) { box-shadow: 0 10px 34px -6px rgba(255, 79, 109, 0.9); }
.stack > * + * { margin-top: 10px; }
.center { text-align: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ---------- intro ---------- */

.hero { text-align: center; padding: 30px 22px 24px; }
.hero h1 { font-size: 2.6rem; margin-top: 14px; }
.hero h1 em {
  font-style: normal;
  background: var(--hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-chips { display: flex; justify-content: center; margin: 22px 0 6px; }
.hero-chips .chip { margin: 0 -6px; width: 64px; height: 64px; font-size: 1.5rem; }
.hero-chips .chip:nth-child(1) { transform: rotate(-12deg) translateY(6px); }
.hero-chips .chip:nth-child(2) { z-index: 1; }
.hero-chips .chip:nth-child(3) { transform: rotate(12deg) translateY(6px); }

.steps { list-style: none; padding: 0; margin: 18px 0 22px; text-align: left; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.steps li + li { border-top: 1px solid var(--border); }
.steps .ico {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--surface-strong);
}
.steps b { color: var(--text); }
.steps span { color: var(--muted); font-size: 0.95rem; }

.streak-pill { color: var(--gold); border-color: rgba(255, 209, 102, 0.35); }

/* ---------- in-game ---------- */

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 12px;
}
.bank {
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.bank small { font-family: var(--body); font-size: 0.85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.bank.up { color: var(--good); }
.bank.down { color: var(--bad); }
.progress { display: flex; gap: 6px; margin-bottom: 16px; }
.progress i {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--surface-strong);
  transition: background 0.3s;
}
.progress i.good { background: var(--good); box-shadow: 0 0 10px rgba(62, 224, 143, 0.5); }
.progress i.bad { background: var(--bad); }
.progress i.now { background: var(--hot); box-shadow: 0 0 12px rgba(255, 107, 44, 0.6); }

.cat {
  --c: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c);
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  margin-bottom: 12px;
}
.cat .e { font-size: 1rem; }
.cat-big { text-align: center; padding: 8px 0 4px; }
.cat-big .e { font-size: 3.2rem; display: block; line-height: 1.1; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4)); }
.cat-big h2 { font-size: 1.6rem; margin: 10px 0 4px; }

.double {
  display: block;
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px dashed rgba(255, 209, 102, 0.5);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 14px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.6; } }

/* Poker-chip bets */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.chip-btn {
  background: none;
  border: 0;
  padding: 6px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.chip-btn:hover:not(:disabled) .chip { transform: translateY(-4px) rotate(-6deg); }
.chip {
  --c: #2dd4bf;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle, var(--c) 0 52%, transparent 53%),
    repeating-conic-gradient(var(--c) 0 15deg, #fff 15deg 30deg);
  box-shadow:
    inset 0 0 0 5px var(--c),
    inset 0 0 0 7px rgba(255, 255, 255, 0.35),
    0 10px 24px -8px color-mix(in srgb, var(--c) 80%, transparent);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.chip.cautious { --c: #14b8a6; }
.chip.confident { --c: #8b5cf6; }
.chip.allin { --c: #ff4f6d; animation: hotChip 1.6s ease-in-out infinite; }
@keyframes hotChip {
  50% { box-shadow: inset 0 0 0 5px var(--c), inset 0 0 0 7px rgba(255, 255, 255, 0.35), 0 0 28px 4px rgba(255, 79, 109, 0.6); }
}
.chip-btn strong { font-size: 0.95rem; }
.chip-btn .muted { font-size: 0.78rem; margin-top: -6px; }

.question {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.bet-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.secs { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.timer {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-strong);
  overflow: hidden;
  margin-bottom: 18px;
}
.timer i { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--good); }

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-weight: 600;
}
.option kbd {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 700 0.8rem var(--body);
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}
.option:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.option.correct { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.option.correct kbd { background: var(--good); color: #062a17; border-color: var(--good); }
.option.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.option.wrong kbd { background: var(--bad); color: #2a0610; border-color: var(--bad); }
.option.dim { opacity: 0.45; }

.result-line { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 14px; }
.delta {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  animation: deltaPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5) both;
}
@keyframes deltaPop { from { transform: scale(0.4); opacity: 0; } }
.delta.good { color: var(--good); text-shadow: 0 0 24px rgba(62, 224, 143, 0.5); }
.delta.bad { color: var(--bad); }

.shake { animation: shake 0.45s; }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

/* Confetti */
.confetti {
  position: fixed;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 50;
  animation: confetti 1.1s cubic-bezier(0.15, 0.6, 0.4, 1) forwards;
}
@keyframes confetti {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--r));
    opacity: 0;
  }
}

/* ---------- results ---------- */

.score-card { text-align: center; padding: 30px 22px; position: relative; overflow: hidden; }
.score-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 80%;
  background: radial-gradient(closest-side, rgba(255, 107, 44, 0.35), transparent);
  pointer-events: none;
}
.score-big {
  position: relative;
  font-family: var(--display);
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 14px 0 6px;
  font-variant-numeric: tabular-nums;
}
.rank {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--hot);
  color: var(--accent-text);
  margin: 6px 0 4px;
}
.share-preview {
  position: relative;
  font-size: clamp(0.85rem, 4vw, 1.2rem);
  letter-spacing: 0;
  white-space: nowrap;
  margin: 18px 0;
}
.recap { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.recap td { padding: 10px 4px; border-top: 1px solid var(--border); vertical-align: top; }
.recap tr:first-child td { border-top: 0; }
.recap td:first-child { width: 28px; font-size: 1.1rem; }
.recap td:last-child { text-align: right; font-weight: 800; white-space: nowrap; font-family: var(--display); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats div { background: var(--surface-strong); border-radius: 14px; padding: 12px 4px; }
.stats b { display: block; font-family: var(--display); font-size: 1.5rem; }
.stats span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- content pages ---------- */

.page h1 { margin-top: 8px; }
.page h2 { margin-top: 26px; }
.page .card h2:first-child { margin-top: 0; }
.page p, .page li { color: #d9d4ec; }
.price { font-family: var(--display); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; }
.price .small { font-family: var(--body); font-size: 0.85rem; font-weight: 500; letter-spacing: 0; }
.plans { display: grid; gap: 16px; }
@media (min-width: 520px) { .plans { grid-template-columns: 1fr 1fr; } }
.plans ul { padding-left: 20px; }
.plans .card:last-child { border-color: rgba(255, 107, 44, 0.45); box-shadow: 0 0 40px -12px rgba(255, 79, 109, 0.5); }

input[type="email"] {
  font: inherit;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}
input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Hunch the mascot ---------- */

.hud-left { display: flex; align-items: center; gap: 10px; }
.mascot {
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
}
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot .m-body,
.mascot .m-eyes,
.mascot .m-shadow,
.mascot .m-flame,
.mascot .m-sweat,
.mascot .m-tear { transform-box: fill-box; transform-origin: 50% 100%; }
.mascot .m-eyes { transform-origin: 50% 50%; animation: mBlink 4.2s infinite; }
.mascot .m-shadow { fill: rgba(0, 0, 0, 0.35); transform-origin: 50% 50%; }
.mascot .m-body { filter: drop-shadow(0 4px 10px rgba(255, 79, 109, 0.45)); }
.mascot .m-pupils { transform: translate(var(--px, 0px), var(--py, 0px)); transition: transform 0.15s; }
.mascot .m-shut,
.mascot .m-frown,
.mascot .m-wobble,
.mascot .m-grin,
.mascot .m-sweat,
.mascot .m-tear,
.mascot .m-flame { display: none; }
.mascot .m-flame { font-size: 26px; animation: mFlicker 0.35s ease-in-out infinite alternate; }

@keyframes mBob { 50% { transform: translateY(-4px); } }
@keyframes mBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes mFlicker { to { transform: scale(1.15, 0.9) rotate(4deg); } }
@keyframes mJump {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(2px) scale(1.12, 0.88); }
  45% { transform: translateY(-16px) scale(0.94, 1.08); }
  75% { transform: translateY(0) scale(1.06, 0.95); }
}
@keyframes mShadow { 45% { transform: scale(0.6); opacity: 0.5; } }
@keyframes mTremble {
  25% { transform: translateX(-1.2px) rotate(-1.5deg); }
  75% { transform: translateX(1.2px) rotate(1.5deg); }
}
@keyframes mDrip { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@keyframes mSlump { to { transform: translateY(4px) scale(1.05, 0.93); } }
@keyframes mJitter { 50% { transform: translate(1px, -1px); } }

.mascot.idle .m-body,
.mascot.think .m-body,
.mascot.fire .m-body { animation: mBob 2.6s ease-in-out infinite; }
.mascot.think .m-pupils { transform: translate(-2.5px, -3px); }
.mascot.think .m-body { rotate: -6deg; }

.mascot.fire .m-flame,
.mascot.fire .m-grin { display: inline; }
.mascot.fire .m-smile { display: none; }
.mascot.fire .m-pupils { transform: translate(0, 1px) scale(0.85); transform-origin: 50px 53px; }

.mascot.nervous .m-body { animation: mTremble 0.14s linear infinite; }
.mascot.nervous .m-smile { display: none; }
.mascot.nervous .m-wobble,
.mascot.nervous .m-sweat { display: inline; }
.mascot.nervous .m-sweat { animation: mDrip 0.9s ease-in infinite; }
.mascot.nervous .m-pupils { animation: mJitter 0.3s steps(2) infinite; }

.mascot.happy .m-body { animation: mJump 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 2; }
.mascot.happy .m-shadow { animation: mShadow 0.7s 2; }
.mascot.party .m-body { animation: mJump 0.8s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.mascot.party .m-shadow { animation: mShadow 0.8s infinite; }
.mascot.happy .m-open,
.mascot.party .m-open,
.mascot.happy .m-smile,
.mascot.party .m-smile { display: none; }
.mascot.happy .m-shut,
.mascot.party .m-shut,
.mascot.happy .m-grin,
.mascot.party .m-grin { display: inline; }

.mascot.sad .m-body { animation: mSlump 0.4s ease-out forwards; }
.mascot.sad .m-smile { display: none; }
.mascot.sad .m-frown,
.mascot.sad .m-tear { display: inline; }
.mascot.sad .m-tear { animation: mDrip 1.4s ease-in infinite; }
.mascot.sad .m-pupils { transform: translate(0, 3px); }

/* Speech bubble */
.m-bubble {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: -2px;
  white-space: nowrap;
  background: #fff;
  color: #1a1030;
  font: 800 0.85rem var(--body);
  padding: 7px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-4px) scale(0.6);
  transform-origin: 20px 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.m-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  border: 7px solid transparent;
  border-top: 0;
  border-bottom-color: #fff;
}
.m-bubble.show { opacity: 1; transform: none; }
.mascot.big .m-bubble { top: -12px; left: 82%; transform-origin: 0 50%; white-space: normal; width: max-content; max-width: 150px; }
.mascot.big .m-bubble::before { top: 10px; left: -6px; border: 7px solid transparent; border-left: 0; border-right-color: #fff; }

.hero-chips { align-items: flex-end; }
.hero-chips .mascot { margin: 0 4px; z-index: 1; }
.score-card .mascot { margin: 4px auto 10px; }

/* ---------- glowfish ---------- */

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.critter {
  position: absolute;
  left: 0;
  animation: swim var(--dur) linear var(--delay) infinite;
  filter: drop-shadow(0 0 6px currentColor);
}
.critter.left { animation-direction: reverse; }
.critter.left svg { transform: scaleX(-1); }
@keyframes swim {
  from { transform: translateX(-60px); }
  to { transform: translateX(calc(100vw + 60px)); }
}
.c-bob { animation: cBob var(--bob) ease-in-out infinite; }
@keyframes cBob { 50% { transform: translateY(-14px); } }
.c-tail { transform-box: fill-box; transform-origin: 100% 50%; animation: cTail 0.45s ease-in-out infinite alternate; }
@keyframes cTail { to { transform: scaleY(0.6) rotate(8deg); } }
body.cheer .c-react { animation: cHop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) var(--hop-delay); }
@keyframes cHop { 40% { transform: translateY(-30px) rotate(-12deg) scale(1.15); } }
body.scatter .c-react { animation: cWobble 0.6s ease-in-out var(--hop-delay); }
@keyframes cWobble {
  20% { transform: translate(-6px, 4px) rotate(-14deg); }
  50% { transform: translate(6px, -2px) rotate(12deg); }
  80% { transform: translate(-3px, 1px) rotate(-6deg); }
}

@media (max-width: 380px) {
  .chip { width: 72px; height: 72px; font-size: 1.1rem; }
  .hero h1 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
