/* =============================================================
   Rakhi Test — Design System v5
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background: #FFF9F2;
  color: #1a1a1a;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.lang-hi { font-family: 'Noto Sans Devanagari', 'Space Grotesk', sans-serif; }
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(192,57,43,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(247,159,31,0.03) 0%, transparent 50%);
}

#app { position: relative; z-index: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px; min-height: 100vh; }
.hi { font-family: 'Noto Sans Devanagari', sans-serif; }
h1, h2, h3, .screen-title { font-family: 'Archivo Black', sans-serif; font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
h1.hi, h2.hi, h3.hi, .screen-title.hi { font-family: 'Baloo 2', sans-serif; font-weight: 700; }

/* ── Language Toggle ───────────────────────────────────── */
.lang-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 0 8px; }
.lang-btn { background: transparent; border: 1.5px solid rgba(26,26,26,0.12); border-radius: 6px; padding: 6px 16px; font-size: 13px; font-weight: 600; color: rgba(26,26,26,0.35); cursor: pointer; transition: all 0.2s; font-family: inherit; }
.lang-btn.active { background: #C0392B; border-color: #C0392B; color: #fff; }
.lang-sep { color: rgba(26,26,26,0.1); }

/* ── Buttons ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; width: 100%; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #C0392B, #96281B); color: #fff; }
.btn-primary:active { transform: scale(0.98); }
.btn-outline { background: transparent; color: #1a1a1a; border: 1.5px solid rgba(26,26,26,0.12); }
.btn-whatsapp { background: #25D366; color: #fff; font-size: 15px; }
.btn-whatsapp:active { background: #1da851; transform: scale(0.98); }
.btn-flip { background: linear-gradient(135deg, #E55D30, #C0392B); color: #fff; }
.btn-link { background: transparent; color: rgba(26,26,26,0.45); text-decoration: underline; text-underline-offset: 4px; padding: 10px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-submit { margin-top: 8px; }

/* ── Screens ───────────────────────────────────────────── */
.screen { padding-bottom: 48px; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.screen-header { text-align: center; padding: 20px 0; }
.screen-title { font-size: 24px; margin-bottom: 8px; }
.screen-subtitle { font-size: 14px; color: rgba(26,26,26,0.5); line-height: 1.5; }

/* ── Landing ───────────────────────────────────────────── */
.landing-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 0; min-height: 75vh; justify-content: center; gap: 20px; }
.landing-lottie { width: 140px; height: 140px; }
.landing-badge { font-family: 'Archivo Black', sans-serif; font-size: 13px; letter-spacing: 0.12em; color: #C0392B; border: 1.5px solid rgba(192,57,43,0.2); padding: 6px 18px; border-radius: 4px; }
/* Lottie confetti overlay for reveal */
.lottie-confetti-overlay { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
body.lang-hi .landing-badge { font-family: 'Baloo 2', sans-serif; letter-spacing: 0.04em; }
.landing-headline { font-size: 28px; max-width: 300px; }
.landing-sub { font-size: 14px; color: rgba(26,26,26,0.4); }

/* ── Relation / Question Mode ──────────────────────────── */
.relation-content, .qmode-content { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0; min-height: 60vh; justify-content: center; gap: 28px; }
.relation-cards { display: flex; gap: 16px; }
.relation-card { background: #fff; border: 2px solid rgba(192,57,43,0.08); border-radius: 16px; padding: 28px 24px; cursor: pointer; transition: all 0.2s; text-align: center; flex: 1; min-width: 130px; }
.relation-card:active { transform: scale(0.96); border-color: #C0392B; }
.relation-emoji { font-size: 48px; margin-bottom: 10px; }
.relation-label { font-size: 17px; font-weight: 700; }
.qmode-cards { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.qmode-card { background: #fff; border: 2px solid rgba(26,26,26,0.05); border-radius: 16px; padding: 22px; cursor: pointer; transition: all 0.2s; text-align: left; }
.qmode-card:active { border-color: #C0392B; transform: scale(0.98); }
.qmode-icon { font-size: 28px; margin-bottom: 6px; }
.qmode-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.qmode-desc { font-size: 13px; color: rgba(26,26,26,0.4); line-height: 1.5; }

/* ── Questions ─────────────────────────────────────────── */
.question-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; }
.question-card { background: #fff; border: 1px solid rgba(26,26,26,0.05); border-radius: 14px; padding: 16px; transition: all 0.2s; }
.question-card.shake { animation: shake 0.4s ease; border-color: #C62828; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
.question-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.question-number { font-family: 'Space Mono', monospace; font-size: 11px; color: #C0392B; letter-spacing: 0.08em; opacity: 0.5; }
.question-text { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.btn-remove { background: none; border: none; color: rgba(26,26,26,0.2); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 6px; }
.btn-remove:hover { color: #C62828; }
.mcq-options { display: flex; flex-direction: column; gap: 7px; }
.mcq-opt { text-align: left; padding: 11px 13px; background: rgba(192,57,43,0.02); border: 1.5px solid rgba(192,57,43,0.06); border-radius: 10px; font-size: 14px; font-family: inherit; color: #1a1a1a; cursor: pointer; transition: all 0.15s; line-height: 1.4; }
.mcq-opt:active { transform: scale(0.98); }
.mcq-opt.selected { background: #C0392B; color: #fff; border-color: #C0392B; }
.mcq-custom { margin-top: 4px; }
.mcq-custom-input { width: 100%; padding: 10px 13px; border: 1.5px dashed rgba(192,57,43,0.12); border-radius: 10px; font-size: 13px; font-family: inherit; background: transparent; color: #1a1a1a; outline: none; }
.mcq-custom-input:focus { border-color: #C0392B; border-style: solid; }
.mcq-opt-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(192,57,43,0.02); border: 1.5px solid rgba(192,57,43,0.06); border-radius: 10px; cursor: pointer; transition: all 0.15s; }
.mcq-opt-row.selected { border-color: #C0392B; background: rgba(192,57,43,0.05); }
.mcq-opt-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(192,57,43,0.2); flex-shrink: 0; }
.mcq-opt-row.selected .mcq-opt-radio { background: #C0392B; border-color: #C0392B; }
.custom-opt-input { flex: 1; border: none; background: transparent; font-size: 14px; font-family: inherit; outline: none; color: #1a1a1a; }
.freetext-input, .text-input { width: 100%; padding: 12px 13px; border: 1.5px solid rgba(26,26,26,0.08); border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff; color: #1a1a1a; outline: none; transition: border-color 0.2s; }
.freetext-input:focus, .text-input:focus { border-color: #C0392B; }
.freetext-input::placeholder, .text-input::placeholder, .mcq-custom-input::placeholder, .custom-opt-input::placeholder { color: rgba(26,26,26,0.2); }
.input-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.custom-q-text { margin-bottom: 12px !important; font-weight: 600; }
.creator-actions { display: flex; gap: 10px; margin: 8px 0 16px; }
.creator-actions .btn { font-size: 13px; padding: 11px 14px; }

/* ── Share ──────────────────────────────────────────────── */
.share-form { display: flex; flex-direction: column; gap: 10px; }
.share-result { margin-top: 20px; }
.share-instruction { font-size: 16px; font-weight: 600; margin-bottom: 12px; text-align: center; }
.share-link-box { display: flex; gap: 8px; margin-bottom: 12px; }
.share-url { flex: 1; padding: 10px; border: 1.5px solid rgba(26,26,26,0.08); border-radius: 8px; font-size: 10px; font-family: 'Space Mono', monospace; background: #fff; color: rgba(26,26,26,0.4); overflow: hidden; text-overflow: ellipsis; outline: none; }

/* ── Responder ─────────────────────────────────────────── */
.responder-badge { font-family: 'Archivo Black', sans-serif; font-size: 12px; letter-spacing: 0.1em; color: #C0392B; opacity: 0.4; margin-bottom: 8px; }
.name-card { border-left: 3px solid #C0392B; }

/* =============================================================
   VERDICT CARD — Bold Gradient Cards, Spotify Wrapped-level
   ============================================================= */
.card-container { display: flex; justify-content: center; padding: 16px 0; }
.verdict-card {
  width: 360px; height: 640px;
  border-radius: 20px; overflow: hidden;
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
}
.vc-inner {
  position: relative; z-index: 3;
  display: flex; flex-direction: column;
  height: 100%; padding: 28px 24px;
  justify-content: space-between;
}
.vc-inner-combined { justify-content: space-between; }

/* Top badge */
.vc-top { text-align: center; }
.vc-badge { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.2em; opacity: 0.5; }

/* Names */
.vc-names { text-align: center; padding: 8px 0; }
.vc-name-big { font-family: 'Archivo Black', sans-serif; font-size: 18px; display: block; }
body.lang-hi .vc-name-big { font-family: 'Baloo 2', sans-serif; }
.vc-arrow { font-size: 16px; opacity: 0.5; display: block; margin: 4px 0; }

/* SCORE — the hero */
.vc-score-hero {
  text-align: center; padding: 4px 0;
  font-family: 'Space Mono', monospace;
  line-height: 1;
}
.vc-score-num { font-size: 120px; font-weight: 700; }
.vc-score-sep { font-size: 48px; opacity: 0.3; }
.vc-score-den { font-size: 48px; opacity: 0.4; }

/* VERDICT — the identity label */
.vc-verdict-block { text-align: center; padding: 4px 0; }
.vc-verdict-main {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px; letter-spacing: 0.03em; line-height: 1.15;
}
.vc-verdict-main.hi { font-family: 'Baloo 2', sans-serif; font-size: 32px; }
.vc-verdict-sub { font-size: 12px; opacity: 0.6; margin-top: 6px; }

/* AI one-liner */
.vc-oneliner {
  text-align: center; font-size: 13px; line-height: 1.5;
  font-style: italic; opacity: 0.75; padding: 0 4px;
}
.vc-oneliner.hi { font-family: 'Noto Sans Devanagari', sans-serif; font-size: 12px; }

/* Smart flex pill */
.vc-flex-pill {
  text-align: center; font-size: 10px; font-weight: 600;
  padding: 5px 14px; border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 20px; display: inline-block; align-self: center;
  opacity: 0.7;
}
.tier-janmon .vc-flex-pill { border-color: rgba(255,215,0,0.3); }

/* Flip tease */
.vc-flip-tease { text-align: center; font-size: 11px; font-weight: 600; opacity: 0.6; }

/* Bottom */
.vc-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9px; font-family: 'Space Mono', monospace; opacity: 0.35;
}

/* ── Combined Card ─────────────────────────────────────── */
.vc-combo-section { text-align: center; padding: 10px 0; }
.vc-combo-names { font-size: 14px; font-weight: 700; opacity: 0.8; margin-bottom: 8px; }
.vc-combo-result { display: flex; align-items: center; justify-content: center; gap: 16px; }
.vc-combo-score { font-family: 'Space Mono', monospace; font-size: 42px; font-weight: 700; }
.vc-combo-label { font-family: 'Archivo Black', sans-serif; font-size: 12px; letter-spacing: 0.03em; opacity: 0.8; }
.vc-combo-label.hi { font-family: 'Baloo 2', sans-serif; font-size: 14px; }
.vc-combo-divider {
  text-align: center; font-size: 20px; padding: 6px 0;
  position: relative;
}
.vc-combo-divider::before, .vc-combo-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 24px); height: 1px;
  background: rgba(255,255,255,0.15);
}
.vc-combo-divider::before { left: 0; }
.vc-combo-divider::after { right: 0; }

/* =============================================================
   ANIMATED REVEAL — the moment of truth
   ============================================================= */
.screen-animated-reveal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
  overflow: hidden;
}

.reveal-stage { width: 100%; max-width: 360px; position: relative; z-index: 2; }
.reveal-badge { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.2em; opacity: 0.3; margin-bottom: 24px; }
.reveal-direction { font-size: 16px; opacity: 0.7; margin-bottom: 32px; font-weight: 600; }

/* Score count-up */
.reveal-count {
  font-family: 'Space Mono', monospace; font-size: 140px;
  font-weight: 700; line-height: 1;
  display: inline-block;
}
.reveal-total { font-family: 'Space Mono', monospace; font-size: 48px; font-weight: 400; opacity: 0.3; }
.reveal-score-anim { margin-bottom: 40px; }

/* Verdict slam */
.reveal-verdict {
  font-family: 'Archivo Black', sans-serif;
  font-size: 44px; letter-spacing: 0.03em;
  line-height: 1.15;
  opacity: 0;
  transform: scale(4) rotate(-15deg);
  filter: blur(8px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-verdict.slammed {
  opacity: 1; transform: scale(1) rotate(-4deg); filter: blur(0px);
}
body.lang-hi .reveal-verdict { font-family: 'Baloo 2', sans-serif; font-size: 42px; }

.reveal-sub {
  font-size: 14px; opacity: 0; margin-top: 16px;
  transition: opacity 0.8s ease 0.3s;
}
.reveal-sub.visible { opacity: 0.6; }

/* ── Particle shower ───────────────────────────────────── */
.particles-container { position: fixed; inset: 0; pointer-events: none; z-index: 101; overflow: hidden; }
.particle {
  position: absolute; top: -20px; border-radius: 50%;
  animation: particleFall linear forwards;
}
@keyframes particleFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  70% { opacity: 0.8; }
  100% { transform: translateY(110vh) rotate(1080deg) scale(0.2); opacity: 0; }
}
/* Petal-shaped particles for Rakhi */
.particle.petal { border-radius: 50% 0 50% 0; }
.particle.star { border-radius: 2px; transform-origin: center; }

/* Glow pulse behind the score */
.reveal-glow {
  position: absolute; top: 50%; left: 50%;
  width: 300px; height: 300px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(60px); opacity: 0.3; z-index: 1;
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100%{opacity:0.2;transform:translate(-50%,-50%) scale(1)} 50%{opacity:0.4;transform:translate(-50%,-50%) scale(1.15)} }

/* ── Breakdown ─────────────────────────────────────────── */
.answer-breakdown { margin-top: 20px; }
.breakdown-title { font-size: 16px; margin-bottom: 12px; text-align: center; }
.breakdown-item { background: #fff; border: 1px solid rgba(26,26,26,0.04); border-radius: 12px; padding: 13px; margin-bottom: 8px; border-left: 4px solid; }
.breakdown-item.correct { border-left-color: #27AE60; }
.breakdown-item.wrong { border-left-color: #C0392B; }
.breakdown-item.pending { border-left-color: #F39C12; }
.breakdown-q { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.breakdown-status { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.breakdown-item.correct .breakdown-status { color: #27AE60; }
.breakdown-item.wrong .breakdown-status { color: #C0392B; }
.breakdown-detail { font-size: 11px; color: rgba(26,26,26,0.4); line-height: 1.5; }

/* ── Reveal Actions ────────────────────────────────────── */
.reveal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.reveal-divider { height: 1px; background: rgba(26,26,26,0.05); margin: 8px 0; }
.flip-prompt { text-align: center; font-size: 14px; color: rgba(26,26,26,0.4); font-style: italic; }

/* ── Loading ───────────────────────────────────────────── */
.screen-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh; gap: 20px; }
.loading-spinner { width: 36px; height: 36px; border: 3px solid rgba(192,57,43,0.1); border-top-color: #C0392B; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: rgba(26,26,26,0.35); }

/* ── Error ─────────────────────────────────────────────── */
.screen-error { min-height: 80vh; }
.error-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; min-height: 60vh; }
.error-icon { width: 52px; height: 52px; border: 3px solid #C62828; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #C62828; }

/* ── Family ────────────────────────────────────────────── */
.family-form { display: flex; flex-direction: column; gap: 10px; }
.family-links { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.family-link-item { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid rgba(26,26,26,0.04); border-radius: 12px; padding: 12px 14px; }
.family-link-name { font-weight: 600; font-size: 14px; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer { text-align: center; padding: 28px 0 16px; margin-top: 16px; border-top: 1px solid rgba(192,57,43,0.06); }
.site-footer a { color: rgba(192,57,43,0.3); text-decoration: none; font-size: 11px; font-family: 'Space Mono', monospace; }
.site-footer a:hover { color: rgba(192,57,43,0.6); }

/* ── Promo Toast ───────────────────────────────────────── */
.promo-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: linear-gradient(135deg, #C0392B, #96281B); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 12px; font-family: 'Space Mono', monospace; display: flex; align-items: center; gap: 10px; z-index: 1000; max-width: 380px; width: calc(100% - 32px); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 8px 32px rgba(192,57,43,0.25); }
.promo-toast.visible { transform: translateX(-50%) translateY(0); }
.promo-toast a { color: #fff; text-decoration: underline; text-underline-offset: 3px; flex: 1; }
.promo-close { background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 15px; padding: 4px; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 400px) {
  .verdict-card { width: 100%; height: auto; aspect-ratio: 9 / 16; }
  .vc-score-num { font-size: 80px; }
  .vc-score-sep, .vc-score-den { font-size: 36px; }
  .vc-verdict-main { font-size: 22px; }
  .landing-headline { font-size: 24px; }
  .relation-card { padding: 22px 18px; min-width: 110px; }
  .reveal-count { font-size: 100px; }
  .reveal-verdict { font-size: 32px; }
}
