:root {
  --bg: #0a0a0f;
  --bg-card: #14141c;
  --text: #f5f4f7;
  --text-dim: #9b98a8;
  --accent: #ff2e93;
  --accent-2: #7b68ee;
  --border: #26242f;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.screen {
  display: none;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 32px 24px;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.screen.active { display: flex; }

/* ---------- INTRO ---------- */
#screen-intro { align-items: center; text-align: center; }

.glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,46,147,0.25) 0%, rgba(123,104,238,0.15) 45%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.intro-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.subtext {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 340px;
  margin-top: -4px;
}

.btn-primary {
  margin-top: 12px;
  width: 100%;
  max-width: 320px;
  padding: 17px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,46,147,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 4px 12px rgba(255,46,147,0.3); }

.btn-secondary {
  width: 100%;
  max-width: 320px;
  padding: 15px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn-secondary:active { transform: scale(0.97); }

.btn-ghost {
  width: 100%;
  max-width: 320px;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.microcopy {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ---------- QUIZ ---------- */
#screen-quiz { justify-content: flex-start; padding-top: 48px; }

.quiz-header { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.quiz-meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  align-self: flex-end;
}

.question-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 28px;
}

.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
}
.option:active { transform: scale(0.98); }
.option:hover { border-color: var(--accent-2); background: #18161f; }
.option.selected {
  border-color: var(--accent);
  background: linear-gradient(120deg, rgba(255,46,147,0.12), rgba(123,104,238,0.12));
}

/* ---------- RESULT ---------- */
#screen-result { align-items: center; padding-top: 32px; padding-bottom: 32px; }

.result-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }

#result-canvas {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.capture-box {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.capture-title { font-size: 16px; font-weight: 800; }
.capture-subtext { font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; }

.capture-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.capture-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
}
.capture-form input:focus { outline: none; border-color: var(--accent-2); }

.capture-submit { margin-top: 0; padding: 14px; font-size: 15px; box-shadow: none; }

.capture-success {
  display: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.capture-box.submitted .capture-form { display: none; }
.capture-box.submitted .capture-subtext { display: none; }
.capture-box.submitted .capture-success { display: block; }

@media (min-width: 420px) {
  .logo { font-size: 60px; }
}
