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

:root {
  --bg:       #07071a;
  --card:     #0d0d26;
  --card2:    #11112e;
  --border:   rgba(120, 80, 255, 0.18);
  --purple:   #7C3AED;
  --purple-lg:#9F67FF;
  --cyan:     #06B6D4;
  --gold:     #F59E0B;
  --green:    #10B981;
  --red:      #F87171;
  --text:     #E2E8F0;
  --muted:    #94A3B8;
  --dim:      #4A5568;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(6,182,212,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Language selector ── */
.lang-bar {
  position: fixed;
  top: .85rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  gap: .35rem;
}

.lang-btn {
  padding: .3rem .65rem;
  background: rgba(7,7,26,0.85);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .2s;
  white-space: nowrap;
}
.lang-btn:hover { border-color: rgba(124,58,237,0.5); color: var(--text); }
.lang-btn.active {
  border-color: var(--purple);
  color: var(--purple-lg);
  background: rgba(124,58,237,0.12);
}

/* ── Screens ── */
.screen { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ══ INTRO ══ */
#intro {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.25rem 3rem;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(124,58,237,0.12);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .38rem 1.1rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--purple-lg);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.logo-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple-lg);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }

.hero-title {
  font-size: clamp(1.9rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  max-width: 820px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--purple-lg), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(.9rem, 2.5vw, 1.12rem);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
  font-size: .8rem;
  color: var(--dim);
}
.trust-row span { display: flex; align-items: center; gap: .35rem; }

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: linear-gradient(135deg, var(--purple), #5B21B6);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: .95rem 2.2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 40px rgba(124,58,237,0.4);
  min-height: 52px;
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(124,58,237,0.6); }

.intro-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem;
  margin-top: 3rem;
  max-width: 660px;
  width: 100%;
}
@media (min-width: 580px) { .intro-features { grid-template-columns: repeat(4, 1fr); } }

.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: left;
}
.feat-icon { font-size: 1.5rem; margin-bottom: .45rem; }
.feat-title { font-weight: 700; font-size: .85rem; margin-bottom: .2rem; }
.feat-desc { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* ══ FORM ══ */
#form-screen {
  display: none;
  padding: 4.5rem 1.25rem 5rem;
  align-items: center;
}
#form-screen.active { display: flex; flex-direction: column; }

.form-container { width: 100%; max-width: 660px; margin: 0 auto; }

.progress-bar-wrap { display: flex; align-items: center; gap: .85rem; margin-bottom: 2.5rem; }
.progress-track {
  flex: 1; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: 99px;
  transition: width .5s ease;
}
.progress-label { font-size: .78rem; color: var(--muted); white-space: nowrap; }

.step-panel { animation: fadeSlideIn .38s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--purple-lg);
  margin-bottom: .75rem;
}

.step-question {
  font-size: clamp(1.2rem, 3.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}

.step-hint { font-size: .83rem; color: var(--muted); margin-bottom: 1.6rem; }

.options-grid { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.75rem; }
.options-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.opt-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.opt-card:hover { border-color: rgba(124,58,237,0.5); background: var(--card2); }
.opt-card.selected {
  border-color: var(--purple);
  background: rgba(124,58,237,0.12);
  box-shadow: 0 0 0 1px var(--purple), 0 0 20px rgba(124,58,237,0.18);
}
.opt-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.opt-text { flex: 1; min-width: 0; }
.opt-label { font-weight: 600; font-size: .9rem; }
.opt-desc { font-size: .75rem; color: var(--muted); margin-top: .12rem; }
.opt-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--purple);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s; flex-shrink: 0;
}
.opt-card.selected .opt-check { opacity: 1; }
.opt-check::after { content: '✓'; color: #fff; font-size: .7rem; font-weight: 800; }

.multi-hint { font-size: .76rem; color: var(--cyan); margin-bottom: .65rem; }

.form-input {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  outline: none;
  transition: border-color .18s;
  resize: vertical;
  margin-bottom: 1.25rem;
}
.form-input:focus { border-color: var(--purple); }
.form-input::placeholder { color: var(--dim); }
.form-input.no-resize { resize: none; min-height: auto; }

.step-nav { display: flex; gap: .85rem; align-items: center; }
.btn-back {
  padding: .8rem 1.4rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 48px;
}
.btn-back:hover { border-color: var(--muted); color: var(--text); }
.btn-next {
  flex: 1;
  padding: .88rem 1.75rem;
  background: linear-gradient(135deg, var(--purple), #5B21B6);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
  min-height: 48px;
}
.btn-next:hover:not(:disabled) { box-shadow: 0 0 30px rgba(124,58,237,0.5); transform: translateY(-1px); }
.btn-next:disabled { opacity: .3; cursor: not-allowed; transform: none; box-shadow: none; }

/* ══ LOADING ══ */
#loading {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 3rem 1.5rem;
}
#loading.active { display: flex; }

.loader-orb {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  margin-bottom: 1.75rem;
  animation: orb-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(124,58,237,0.5);
}
@keyframes orb-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 60px rgba(124,58,237,0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 90px rgba(124,58,237,0.7); }
}

.loader-title { font-size: clamp(1.3rem, 4vw, 1.6rem); font-weight: 800; margin-bottom: .65rem; }
.loader-sub { color: var(--muted); font-size: .9rem; max-width: 380px; line-height: 1.6; margin-bottom: 2.25rem; }

.agent-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}

.loader-steps {
  display: flex; flex-direction: column; gap: .55rem;
  max-width: 340px; width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-family: 'Inter', monospace;
}
.loader-step { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--dim); transition: color .4s; }
.loader-step.done { color: var(--muted); }
.loader-step.active { color: var(--cyan); }
.step-arrow { font-size: .75rem; flex-shrink: 0; color: var(--dim); transition: color .4s; }
.loader-step.done .step-arrow { color: var(--green); }
.loader-step.active .step-arrow { color: var(--cyan); }
.loader-step-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex-shrink: 0; transition: background .4s; }
.loader-step.done .loader-step-dot { background: var(--green); }
.loader-step.active .loader-step-dot { background: var(--cyan); animation: pulse 1s infinite; }

/* ══ RESULTS ══ */
#results { display: none; padding: 4rem 1.25rem 6rem; align-items: center; }
#results.active { display: flex; flex-direction: column; }
.results-container { width: 100%; max-width: 860px; margin: 0 auto; }

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

.result-header { text-align: center; margin-bottom: 2.5rem; animation: fadeUp .55s ease; }

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 100px;
  padding: .32rem .95rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.archetype-emoji { display: block; font-size: 2.2rem; margin-bottom: .4rem; }
.archetype-name {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.06;
  margin-bottom: .5rem;
}
.archetype-tagline { font-size: 1rem; color: var(--muted); font-style: italic; max-width: 480px; margin: 0 auto .5rem; }
.stage-desc { font-size: .83rem; color: var(--dim); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9rem;
}

/* Grid layouts */
.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .1s both;
}
@media (max-width: 560px) { .metrics-row { grid-template-columns: 1fr; } }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .3s both;
}
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

/* Score */
.overall-score-big {
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--purple-lg), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.overall-label { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

.score-bars { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .65rem; }
.score-bar-row { display: flex; align-items: center; gap: .7rem; }
.score-bar-label { font-size: .75rem; color: var(--muted); width: 100px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 99px; transition: width 1.4s cubic-bezier(.4,0,.2,1); width: 0; }
.score-bar-num { font-size: .75rem; font-weight: 700; width: 26px; text-align: right; }

/* Chart */
.chart-wrap { position: relative; height: 210px; }

/* Eye opener */
.eye-opener-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.13), rgba(6,182,212,0.07));
  border: 1px solid rgba(124,58,237,0.32);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .2s both;
  position: relative;
  overflow: hidden;
}
.eye-opener-card::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent 70%);
  pointer-events: none;
}
.insight-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: .7rem;
}
.eye-opener-text {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
}

/* Summary card section */
.summary-card-section {
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .25s both;
}
.summary-card-preview {
  width: 100%;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--border);
}
.card-actions {
  display: flex;
  gap: .75rem;
  margin-top: .85rem;
  flex-wrap: wrap;
}
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  background: linear-gradient(135deg, var(--purple), #5B21B6);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  min-height: 44px;
}
.btn-dl:hover { box-shadow: 0 0 20px rgba(124,58,237,0.4); }
.btn-dl-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 44px;
}
.btn-dl-secondary:hover { border-color: var(--muted); color: var(--text); }

/* Insight text */
.insight-label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cyan);
  margin-bottom: .7rem;
}
.insight-text { font-size: .9rem; line-height: 1.65; color: var(--text); }

/* Belief card */
.belief-inner {
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
}
.belief-quote { font-size: .92rem; font-style: italic; color: var(--red); line-height: 1.5; }
.shift-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green); margin-top: .75rem; margin-bottom: .3rem; }
.shift-text { font-size: .88rem; color: #6EE7B7; line-height: 1.55; }

/* Actions */
.actions-card { margin-bottom: 1.25rem; animation: fadeUp .6s ease .4s both; }
.action-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.action-item:last-child { border-bottom: none; }
.action-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #5B21B6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem;
  flex-shrink: 0;
}
.action-text { font-weight: 600; font-size: .9rem; margin-bottom: .28rem; }
.action-impact { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* Prediction */
.prediction-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.07), rgba(124,58,237,0.07));
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 16px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .5s both;
}
.prediction-text { font-size: .9rem; line-height: 1.7; }

/* Market */
.market-card { animation: fadeUp .6s ease .5s both; margin-bottom: 1.25rem; }

/* AI Journey Image */
.image-card { animation: fadeUp .6s ease .6s both; margin-bottom: 1.75rem; }
#ai-image-wrap {
  border-radius: 10px; overflow: hidden;
  background: var(--card2);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
#ai-image { width: 100%; display: block; border-radius: 10px; }
.image-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .65rem; color: var(--muted); font-size: .85rem;
}
.img-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,.07);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* CTA */
.cta-section {
  text-align: center;
  padding: 2.25rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  animation: fadeUp .6s ease .7s both;
}
.cta-title { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 800; margin-bottom: .5rem; }
.cta-sub { font-size: .88rem; color: var(--muted); margin-bottom: 1.4rem; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.cta-buttons { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }
.btn-restart {
  padding: .8rem 1.5rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 46px;
}
.btn-restart:hover { border-color: var(--purple); color: var(--purple-lg); }
.btn-share {
  padding: .8rem 1.5rem;
  background: linear-gradient(135deg, var(--purple), #5B21B6);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 18px rgba(124,58,237,0.3);
  min-height: 46px;
}
.btn-share:hover { box-shadow: 0 0 30px rgba(124,58,237,0.5); }

.anon-footer { text-align: center; margin-top: 2.5rem; font-size: .75rem; color: var(--dim); }

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
  #intro { padding: 5rem 1rem 3rem; }
  .trust-row { gap: .85rem; font-size: .75rem; }
  .options-grid.two-col { grid-template-columns: 1fr; }
  .btn-start { width: 100%; justify-content: center; }
  .step-nav { flex-direction: column; }
  .btn-back { width: 100%; }
  .card { padding: 1.1rem; }
  .eye-opener-card { padding: 1.25rem; }
  .cta-section { padding: 1.5rem 1rem; }
  .cta-buttons { flex-direction: column; }
  .btn-restart, .btn-share { width: 100%; justify-content: center; }
  .lang-bar { top: .6rem; right: .65rem; }
  .lang-btn { padding: .28rem .55rem; font-size: .7rem; }
}
