:root {
  --bg: #120722;
  --bg2: #1e0f38;
  --card: #241244;
  --gold: #d4af37;
  --gold-light: #f0d98c;
  --text: #efe9fa;
  --muted: #b3a5cf;
  --danger: #ff5d73;
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at 50% -20%, var(--bg2) 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

a { color: var(--gold-light); }

/* ---------- screens ---------- */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 480px;
  padding: 36px 22px 24px;
  flex: 1;
}
.screen.active { display: flex; }

.screen-title { font-size: 1.6rem; line-height: 1.25; }
.screen-sub { color: var(--muted); font-size: 0.95rem; line-height: 1.5; max-width: 40ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 14px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(160deg, var(--gold-light), var(--gold) 60%, #a8871f);
  color: #241500;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}
.btn-xl { font-size: 1.15rem; padding: 17px 32px; width: 100%; max-width: 360px; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid #4a3a70;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- consent modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 3, 18, 0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.overlay.hidden { display: none; }

.modal {
  background: var(--card);
  border: 1px solid #4a3a70;
  border-radius: 18px;
  padding: 26px 22px;
  max-width: 440px;
  width: 100%;
  text-align: left;
  display: flex; flex-direction: column; gap: 16px;
  max-height: 88dvh; overflow-y: auto;
}
.modal h2 { text-align: center; }
.modal-sub { color: var(--muted); font-size: 0.9rem; text-align: center; }

.check-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.86rem; line-height: 1.45; color: var(--text);
  cursor: pointer;
}
.check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }

/* ---------- landing ---------- */
#screen-landing { justify-content: center; position: relative; }
.landing-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; z-index: 1; }
.crystal { font-size: 4rem; filter: drop-shadow(0 0 24px rgba(160, 90, 255, 0.6)); }
.crystal.spin { animation: floaty 2.4s ease-in-out infinite; }
h1 { font-size: 2.4rem; line-height: 1.15; }
.gold { color: var(--gold); }
.tagline { color: var(--muted); max-width: 34ch; line-height: 1.55; }

.trust-row {
  list-style: none; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  color: var(--muted); font-size: 0.8rem;
}

.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stars::before, .stars::after {
  content: "✦"; position: absolute; color: var(--gold-light); opacity: 0.5;
  animation: twinkle 3s ease-in-out infinite;
}
.stars::before { top: 12%; left: 14%; font-size: 14px; }
.stars::after { top: 22%; right: 12%; font-size: 10px; animation-delay: 1.4s; }

/* ---------- camera ---------- */
.camera-frame {
  position: relative;
  width: 100%; max-width: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: #0b0518;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
}
#camera-video {
  /* kept alive but invisible — the canvas below shows the live preview */
  position: absolute;
  width: 2px; height: 2px;
  opacity: 0.01;
  pointer-events: none;
}
#camera-preview { width: 100%; height: 100%; display: block; }

#preview-img {
  width: 100%; max-width: 340px;
  border-radius: 20px; border: 2px solid var(--gold);
}

/* ---------- fake analysis ---------- */
#screen-analyzing { justify-content: center; }
.scan-wrap {
  position: relative; width: 180px; height: 180px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed #5a4585; border-radius: 24px; overflow: hidden;
}
.scan-palm { font-size: 6rem; opacity: 0.85; }
.scan-line {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 14px var(--gold);
  animation: scan 1.8s ease-in-out infinite;
}
.pulse { animation: pulse 1.6s ease-in-out infinite; }

.progress-track {
  width: 100%; max-width: 300px; height: 8px;
  background: #2e1d52; border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* ---------- paywall ---------- */
.alert-badge {
  background: var(--danger); color: #fff;
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em;
  padding: 6px 14px; border-radius: 99px;
  animation: pulse 1.2s ease-in-out infinite;
}
.discovery-title {
  font-size: 1.9rem; line-height: 1.15; color: var(--gold-light);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}
.discovery-sub { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

.report-includes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  width: 100%; font-size: 0.8rem; color: var(--text);
}
.inc { background: var(--card); border: 1px solid #3d2b66; border-radius: 10px; padding: 10px 8px; }

.price-box {
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: 18px;
  padding: 22px 18px;
  width: 100%;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.12);
}
.sale-tag { color: var(--danger); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; }
.prices { display: flex; align-items: baseline; gap: 14px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 1.4rem; }
.price-new { color: var(--gold-light); font-size: 2.6rem; font-weight: 800; }

#email-input {
  width: 100%; padding: 14px 16px;
  border-radius: 12px; border: 1px solid #4a3a70;
  background: #170b2e; color: var(--text);
  font-size: 1rem;
}
#email-input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.fine { color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

/* ---------- birth details form ---------- */
.details-form {
  width: 100%;
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 0.82rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.03em; }
.field .optional { color: var(--muted); font-weight: 400; font-style: normal; }
.field input {
  width: 100%; padding: 13px 14px;
  border-radius: 12px; border: 1px solid #4a3a70;
  background: #170b2e; color: var(--text);
  font-size: 1rem;
  color-scheme: dark;
  -webkit-appearance: none; appearance: none;
  min-height: 48px;
}
.field input:focus { outline: 2px solid var(--gold); border-color: transparent; }

.zodiac-callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(150deg, #2c1750, var(--card));
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.14);
  animation: callout-in 0.35s ease;
}
.zodiac-symbol {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, #3d2470, #1c0d38);
  color: var(--gold-light);
  font-size: 1.8rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}
.zodiac-name { font-weight: 800; color: var(--gold-light); font-size: 1.05rem; margin-bottom: 4px; }
.zodiac-horoscope { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

@keyframes callout-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- success / misc ---------- */
.success-check {
  width: 74px; height: 74px; border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--gold-light);
  box-shadow: 0 0 34px rgba(212, 175, 55, 0.35);
}

.error { color: var(--danger); font-size: 0.9rem; }
.warn { color: var(--gold-light); font-size: 0.85rem; }
.hidden { display: none !important; }

footer { padding: 18px 16px 26px; color: #6f6390; font-size: 0.72rem; }
footer a { color: #8f7fb5; }

/* ---------- animations ---------- */
@keyframes scan { 0%, 100% { top: 8%; } 50% { top: 88%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* terms page */
.terms-body {
  text-align: left; max-width: 640px; padding: 32px 22px; line-height: 1.65;
  display: block;
}
.terms-body h1 { font-size: 1.7rem; margin-bottom: 8px; }
.terms-body h2 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--gold-light); }
.terms-body p, .terms-body li { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.terms-body ul { padding-left: 20px; }
.back-link { display: inline-block; margin-bottom: 18px; }
