:root {
  --duo-green: #58CC02;
  --duo-green-hover: #61E002;
  --duo-green-dark: #46A302;
  --duo-green-shadow: #58A700;
  --ink: #3C3C3C;
  --ink-strong: #4B4B4B;
  --muted: #777777;
  --muted-light: #AFAFAF;
  --canvas: #FFFFFF;
  --wash-blue: #DDF4FF;
  --surface: #FFFFFF;
  --surface-alt: #F7F7F7;
  --border: #E5E5E5;
  --border-strong: #DADADA;
  --link-blue: #1CB0F6;
  --link-blue-dark: #1B99D6;
  --navy: #042C60;
  --super-navy: #100F3E;
  --warning: #FFC800;
  --error: #FF4B4B;
  --streak: #FF9600;
  --gems: #CE82FF;
  --footer-soft: #D7FFB8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --max: 988px;
  --font: "Nunito", din-round, system-ui, sans-serif;
  --edge: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  position: relative;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

/* —— Soft sky atmosphere —— */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--wash-blue) 0%, transparent 60%),
    linear-gradient(180deg, #f3fbff 0%, var(--canvas) 42%, #f6ffe9 100%);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: floaty 8s ease-in-out infinite;
}

.blob--a {
  width: 180px;
  height: 180px;
  top: 12%;
  left: 6%;
  background: #ce82ff33;
  animation-delay: 0s;
}

.blob--b {
  width: 140px;
  height: 140px;
  top: 28%;
  right: 8%;
  background: #ffc80044;
  animation-delay: -2.5s;
}

.blob--c {
  width: 220px;
  height: 220px;
  bottom: 8%;
  left: 40%;
  background: #58cc0222;
  animation-delay: -4s;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* —— Buttons (physical bottom edge) —— */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}

.btn--primary {
  color: #fff;
  background: var(--duo-green);
  box-shadow: 0 var(--edge) 0 0 var(--duo-green-shadow);
}

.btn--primary:hover {
  background: var(--duo-green-hover);
}

.btn--primary:active {
  transform: translateY(var(--edge));
  box-shadow: 0 0 0 0 var(--duo-green-shadow);
  background: var(--duo-green-dark);
}

.btn--secondary {
  color: var(--link-blue);
  background: var(--surface);
  box-shadow:
    0 0 0 2px var(--border),
    0 var(--edge) 0 0 var(--border-strong);
}

.btn--secondary:hover {
  background: var(--wash-blue);
  box-shadow:
    0 0 0 2px var(--link-blue),
    0 var(--edge) 0 0 var(--link-blue-dark);
}

.btn--secondary:active {
  transform: translateY(var(--edge));
  box-shadow: 0 0 0 2px var(--link-blue);
}

.btn--wide {
  width: min(330px, 100%);
}

.btn--spin,
.btn--submit {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn--pulse {
  animation: duoPulse 1.5s ease-in-out infinite;
}

.age-btn {
  min-width: 72px;
  height: 44px;
  padding: 0 14px;
}

.field-next {
  width: 50px;
  min-width: 50px;
  padding: 0;
  font-size: 20px;
  flex-shrink: 0;
}

/* —— Overlays / modals —— */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(60, 60, 60, 0.45);
  animation: fadeIn 0.3s ease;
}

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 0 var(--border-strong);
  padding: 28px 24px 24px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.success-seal {
  margin: 0 auto 12px;
  width: 88px;
  animation: popBounce 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.modal-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink-strong);
  text-transform: none;
}

.modal-title strong {
  display: block;
  margin-top: 4px;
  color: var(--duo-green);
  font-size: 1.15em;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.modal-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
}

.modal-card--jackpot {
  width: min(460px, 100%);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--link-blue);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jackpot-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--duo-green);
  letter-spacing: -0.01em;
}

.jackpot-title span {
  color: var(--navy);
  font-size: 0.72em;
}

.jackpot-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
}

.reward-burst span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  opacity: 0.85;
}

.reward-burst span:nth-child(1) {
  top: 18px;
  left: 24px;
  background: var(--warning);
  transform: rotate(18deg);
}

.reward-burst span:nth-child(2) {
  top: 28px;
  right: 28px;
  background: var(--gems);
  border-radius: 50%;
}

.reward-burst span:nth-child(3) {
  bottom: 70px;
  left: 36px;
  background: var(--link-blue);
  transform: rotate(-12deg);
}

/* —— Age gate —— */
.age-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  padding: 12px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 0 var(--border-strong);
}

.age-text {
  flex: 1;
  margin: 0;
  font-weight: 800;
  font-size: 17px;
  color: var(--ink-strong);
}

.age-actions {
  display: flex;
  gap: 8px;
}

/* —— Header / HUD —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  text-transform: lowercase;
}

.brand-name span {
  color: var(--duo-green);
}

.hud {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-strong);
  box-shadow: 0 2px 0 0 var(--border-strong);
}

.chip--xp .chip-icon {
  color: var(--gems);
}

.chip--streak .chip-icon {
  font-size: 14px;
}

.hero-copy {
  text-align: center;
  padding: 8px 0 24px;
}

.headline {
  margin: 0 auto;
  max-width: 640px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}

.headline__bonus {
  display: block;
  margin-top: 4px;
  color: var(--duo-green);
}

/* —— Game layout —— */
.game {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  width: 100%;
}

@media (min-width: 800px) {
  .game {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }

  .hero-copy {
    padding-bottom: 32px;
  }
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.wheel-glow {
  position: absolute;
  width: min(460px, 92vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #58cc0233 0%, transparent 68%);
  animation: glowPulse 3s ease-in-out infinite;
}

.wheel-frame {
  position: relative;
  width: min(400px, 86vw);
  aspect-ratio: 1;
}

.roulette {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  will-change: transform;
  border: 6px solid var(--duo-green);
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 8px var(--duo-green-shadow),
    0 12px 0 0 #e5e5e5;
  overflow: hidden;
  background: #fff;
}

.roulette img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  user-select: none;
  -webkit-user-drag: none;
}

.pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  margin-left: -16px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid var(--duo-green);
  filter: drop-shadow(0 3px 0 var(--duo-green-shadow));
}

.wheel-hub {
  position: absolute;
  inset: 42%;
  z-index: 2;
  border-radius: 50%;
  background: var(--duo-green);
  border: 4px solid #fff;
  box-shadow: 0 3px 0 0 var(--duo-green-shadow);
  pointer-events: none;
}

.panel {
  display: flex;
  justify-content: center;
}

.stat-box {
  width: min(360px, 100%);
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 0 0 var(--border-strong);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stat-box.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.stat-card {
  padding: 12px 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
}

.stat span {
  display: inline-block;
}

.stat span.swoosh,
.result.swoosh {
  animation: swoosh 0.5s ease;
}

.result {
  min-height: 1.6em;
  margin: 14px 0 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--streak);
}

.cash-blink {
  animation: blink 0.55s ease 4;
  color: var(--duo-green) !important;
}

.site-footer {
  margin-top: 40px;
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(180deg, transparent 0%, #58cc0214 40%, #58cc0228 100%);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* —— Lead form —— */
.lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
}

.lead-scrim {
  position: absolute;
  inset: 0;
  background: rgba(60, 60, 60, 0.45);
}

.lead-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: 92dvh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 2px solid var(--border);
  border-bottom: 0;
  padding: 24px 20px 32px;
  animation: slideUp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.lead-hype {
  text-align: center;
  margin-bottom: 20px;
}

.lead-hype h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-strong);
}

.lead-hype h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--duo-green);
}

.expire {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-strong);
}

.input-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 3px 0 0 var(--border-strong);
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.input-wrap input:focus {
  border-color: var(--link-blue);
  background: var(--wash-blue);
  box-shadow: 0 3px 0 0 var(--link-blue-dark);
}

.input-wrap input.is-valid {
  border-color: var(--duo-green);
  background: #f3ffe8;
  box-shadow: 0 3px 0 0 var(--duo-green-shadow);
}

.input-wrap input.is-invalid {
  border-color: var(--error);
  background: #fff5f5;
  box-shadow: 0 3px 0 0 #e03c3c;
}

.field-error {
  display: none;
  margin: 8px 0 0;
  color: var(--error);
  font-size: 14px;
  font-weight: 700;
}

.field-error.is-shown {
  display: block;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}

.terms-check input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--duo-green);
  flex-shrink: 0;
}

.linkish {
  border: 0;
  padding: 0;
  background: none;
  color: var(--link-blue);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.linkish:hover {
  color: var(--link-blue-dark);
}

.modal-card--terms {
  width: min(560px, 100%);
  max-height: 85dvh;
  overflow: auto;
  text-align: left;
}

.modal-card--terms h3 {
  margin: 0 2rem 12px 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--duo-green);
}

.terms-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.terms-body h4 {
  margin: 16px 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-strong);
}

.terms-body p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.mascot {
  display: inline-flex;
  animation: floaty 3.5s ease-in-out infinite;
}

/* —— Motion —— */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popBounce {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes duoPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes swoosh {
  0% { transform: scale(0.7); opacity: 0.3; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes blink {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.04); }
}
