:root {
  --bg: #06030f;
  --surface: #0f0820;
  --border: #2d1b5e;
  --accent: #a855f7;
  --gold: #f59e0b;
  --glow: #7c3aed;
  --text: #e2d9f3;
  --muted: #9381b0;
  --teal: #33e7d0;
  --danger: #fb7185;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 12%, rgba(168, 85, 247, 0.28), transparent 34rem),
    radial-gradient(circle at 20% 90%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #120924 0%, var(--bg) 48%, #030108 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  animation: twinkle var(--duration, 4s) ease-in-out infinite;
  opacity: var(--opacity, 0.5);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: var(--opacity, 0.75); transform: scale(1.35); }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 22px 16px max(28px, env(safe-area-inset-bottom));
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  animation: screen-in 0.34s ease both;
}

.screen.is-active {
  display: block;
}

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

.brand-mark {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 10px 0 14px;
}

.brand-star,
.processing-symbol {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(124, 58, 237, 0.1));
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.22);
  font-size: 28px;
}

.brand-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.trust-row,
.trust-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 24px;
}

.trust-row span,
.trust-signals span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 999px;
  background: rgba(45, 27, 94, 0.22);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 7px;
}

h1,
h2 {
  font-family: "Cinzel Decorative", Georgia, serif;
  color: white;
  text-align: center;
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.48);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.08;
}

h1 span {
  color: var(--accent);
}

.lead {
  color: var(--text);
  text-align: center;
  font-size: 14px;
  margin: 16px auto 24px;
  max-width: 38rem;
}

.glass {
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  background: rgba(45, 27, 94, 0.25);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
  backdrop-filter: blur(16px);
}

.form-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.form-card h2 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 14px;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 7px;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: white;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

small {
  color: var(--gold);
  font-size: 11px;
}

.formula-note {
  margin: 2px 0 0;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
  text-align: center;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  text-align: center;
}

.primary-btn {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, #7c3aed, #a855f7 55%, #f59e0b);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.42);
  font-weight: 900;
  font-size: 15px;
  padding: 15px 20px;
  transition: transform 0.16s ease, filter 0.16s ease;
  animation: pulse-glow 2s ease-in-out infinite;
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn[aria-busy="true"] {
  filter: grayscale(0.3);
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.45); }
  50% { box-shadow: 0 0 38px rgba(245, 158, 11, 0.34); }
}

.micro,
.social-proof {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.social-proof {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.avatars {
  display: flex;
  padding-left: 12px;
}

.avatars i {
  width: 28px;
  height: 28px;
  margin-left: -12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #33e7d0);
}

.quiz-top {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 12px 0 16px;
  background: linear-gradient(180deg, rgba(6, 3, 15, 0.96), rgba(6, 3, 15, 0.72), transparent);
}

.quiz-top p {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #f59e0b);
  transition: width 0.45s ease;
}

.quiz-card {
  padding: 22px;
  margin-top: 12px;
}

.question-icon {
  color: var(--gold);
  font-size: 30px;
  text-align: center;
}

.quiz-card h2 {
  margin: 10px 0 20px;
  font-family: Inter, sans-serif;
  font-size: 21px;
  line-height: 1.26;
}

.answers {
  display: grid;
  gap: 11px;
}

.answer {
  min-height: 58px;
  width: 100%;
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  padding: 13px 14px;
  text-align: left;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.answer:active,
.answer.is-selected {
  transform: scale(0.99);
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.24);
}

#screen-processing {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  text-align: center;
  padding-top: 14vh;
}

#screen-processing.is-active {
  display: grid;
}

.processing-symbol {
  margin: 0 auto;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-progress {
  width: min(100%, 340px);
  margin: 22px auto;
}

.processing-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.result-head {
  text-align: center;
  padding-top: 6px;
}

.result-head .brand-star {
  margin: 0 auto 12px;
}

.result-head p,
.locked-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.result-head h2 {
  margin: 8px 0 18px;
  font-size: 28px;
}

.insight {
  position: relative;
  margin: 13px 0;
  padding: 18px;
}

.insight strong {
  display: block;
  color: white;
  font-size: 16px;
  margin-bottom: 8px;
}

.insight p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.locked p {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.locked.compact {
  min-height: 128px;
}

.locked-label {
  color: var(--danger);
  margin: 18px 0 8px;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: rgba(6, 3, 15, 0.34);
  font-weight: 900;
  text-align: center;
  padding: 18px;
}

.urgency {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 18px;
  border-color: rgba(251, 113, 133, 0.34);
  text-align: center;
}

.urgency span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.urgency b {
  color: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 34px;
}

.urgency b.is-low {
  color: var(--danger);
  animation: shake 0.4s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.download-btn {
  margin-top: 8px;
}

.testimonials {
  margin-top: 24px;
}

.testimonials > p {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.quote {
  margin-top: 10px;
  padding: 14px;
  color: var(--text);
  font-size: 13px;
}

.quote b {
  display: block;
  margin-top: 8px;
  color: var(--gold);
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 38px;
  }

  .quiz-card {
    padding: 28px;
  }
}
