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

:root {
  --ink-900: #111827;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --paper: #f8fafc;
  --white: #ffffff;
  --brand-700: #0f5fd8;
  --brand-600: #1d75ea;
  --brand-500: #4092ff;
  --mint-500: #1ea672;
  --amber-500: #d28f16;
  --rose-500: #d9475f;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(255, 255, 255, 0.78);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 36px rgba(15, 23, 42, 0.11);
  --shadow-lg: 0 30px 54px rgba(15, 23, 42, 0.17);
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 6%, rgba(64, 146, 255, 0.2), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(30, 166, 114, 0.16), transparent 22%),
    radial-gradient(circle at 50% 95%, rgba(15, 95, 216, 0.14), transparent 30%),
    linear-gradient(135deg, #f5f8ff 0%, #f5fbf8 45%, #eef4ff 100%);
  color: var(--ink-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  filter: blur(80px);
  z-index: -1;
}

body::before {
  top: -80px;
  left: -100px;
  background: rgba(64, 146, 255, 0.2);
}

body::after {
  right: -120px;
  bottom: -120px;
  background: rgba(30, 166, 114, 0.16);
}

header {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  width: min(100%, 960px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(155deg, #ef4444, #dc2626);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.logo-mark svg {
  width: 19px;
  height: 19px;
  fill: #fff;
}

.logo-text {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--brand-700);
  font-size: 1.05rem;
}

.theme-toggle {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  min-width: 70px;
}

.theme-toggle:hover {
  border-color: var(--brand-700);
}

main {
  width: min(100%, 470px);
  padding: 12px 18px 44px;
  flex: 1;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-up 380ms cubic-bezier(0.18, 0.89, 0.32, 1.12) both;
}

.hidden {
  display: none !important;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 128px);
}

.hero-chip {
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
  background: rgba(64, 146, 255, 0.13);
  border: 1px solid rgba(64, 146, 255, 0.3);
}

.hero-icon {
  font-size: 52px;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero .tagline {
  color: var(--ink-700);
  line-height: 1.6;
  margin-bottom: 8px;
  font-size: 1rem;
}

.hero .sub {
  color: var(--ink-500);
  margin-bottom: 28px;
  font-size: 0.86rem;
}

.btn-primary,
.btn-secondary,
.option-btn,
.back-btn {
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(150deg, var(--brand-500), var(--brand-700));
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 15px 34px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(29, 117, 234, 0.34);
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: cta-breathe 2.4s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 95, 216, 0.36);
  filter: saturate(108%);
  animation-play-state: paused;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -35%;
  width: 32%;
  height: 340%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  transform: rotate(20deg);
  animation: cta-shimmer 2.8s ease-in-out infinite;
}

@keyframes cta-breathe {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 14px 28px rgba(29, 117, 234, 0.34);
  }
  50% {
    transform: translateY(-1px) scale(1.015);
    box-shadow: 0 20px 36px rgba(29, 117, 234, 0.42);
  }
}

@keyframes cta-shimmer {
  0%,
  55% {
    left: -40%;
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  100% {
    left: 125%;
    opacity: 0;
  }
}

.cta-note {
  margin-top: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-500);
}

.quiz {
  padding-top: 20px;
}

.progress-wrapper {
  width: 100%;
  margin-bottom: 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.progress-label,
.progress-pct {
  color: var(--ink-500);
  font-weight: 700;
}

.progress-time {
  color: var(--ink-500);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.progress-category {
  color: var(--brand-700);
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 17%;
  background: linear-gradient(90deg, #66b5ff, #0f5fd8);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(15, 95, 216, 0.45);
  transition: width 280ms ease;
}

.question-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border-radius: 26px;
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
  transition: opacity 300ms ease, transform 300ms ease;
}

.question-card.transitioning {
  opacity: 0;
  transform: translateY(8px);
}

.question-icon {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 8px;
}

.question-card h2 {
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.options {
  display: grid;
  gap: 10px;
}

.option-btn {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-900);
  text-align: left;
  padding: 14px 14px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 700;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.option-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 117, 234, 0.48);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.option-btn.selected {
  border-color: var(--brand-700);
  color: #fff;
  background: linear-gradient(145deg, #44a0ff, #0f5fd8);
  box-shadow: 0 8px 20px rgba(29, 117, 234, 0.32);
}

.option-btn:active,
.option-btn.tapped {
  transform: scale(0.985);
}

.calc-status {
  width: 100%;
  margin-top: 10px;
  color: var(--ink-700);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.calc-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--brand-600);
  box-shadow: 0 0 0 0 rgba(29, 117, 234, 0.5);
  animation: pulse-dot 1s infinite ease-out;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 117, 234, 0.42);
    transform: scale(0.92);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(29, 117, 234, 0);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(29, 117, 234, 0);
    transform: scale(0.92);
  }
}

.back-btn {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--ink-500);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 12px;
}

.back-btn:hover {
  color: var(--brand-700);
}

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

.result h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.result-sub {
  margin-top: 4px;
  margin-bottom: 18px;
  color: var(--ink-500);
  font-size: 0.86rem;
}

.gauge-container {
  margin-bottom: 18px;
}

.gauge-svg-wrap {
  width: 188px;
  height: 188px;
  position: relative;
}

.gauge-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gauge-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
}

.gauge-score {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 2.6rem;
  line-height: 1;
}

.gauge-label {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--ink-500);
}

.zone-badge {
  margin-top: 12px;
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.zone-msg {
  margin-bottom: 22px;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.55;
}

.dynamic-messages,
.action-steps,
.emotional-hook {
  width: 100%;
  border-radius: 14px;
  text-align: left;
}

.dynamic-messages {
  background: #fff5f7;
  border: 1px solid #fecdd6;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.dynamic-messages p {
  color: var(--rose-500);
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 700;
}

.dynamic-messages p + p {
  margin-top: 8px;
}

.emotional-hook {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: rgba(64, 146, 255, 0.08);
  border: 1px solid rgba(64, 146, 255, 0.2);
  text-align: center;
}

.emotional-hook p {
  color: var(--ink-700);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
  font-weight: 600;
}

.action-steps {
  background: #f2fbf7;
  border: 1px solid #b7efd6;
  padding: 16px;
  margin-bottom: 14px;
}

.action-steps h3 {
  color: var(--mint-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.action-item {
  display: flex;
  gap: 10px;
}

.action-item + .action-item {
  margin-top: 10px;
}

.action-num {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: #d8f7e9;
  color: var(--mint-500);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.action-text {
  color: var(--ink-900);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.btn-secondary {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--ink-700);
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: var(--brand-700);
}

.share-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.share-btn {
  border: 1px solid rgba(29, 117, 234, 0.35);
  border-radius: 14px;
  padding: 13px 12px;
  background: #ffffff;
  color: var(--brand-700);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(29, 117, 234, 0.14);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-700);
  box-shadow: 0 12px 24px rgba(29, 117, 234, 0.22);
}

#whatsappShareBtn {
  background: linear-gradient(145deg, #e8fff3, #ffffff);
  border-color: rgba(30, 166, 114, 0.35);
  color: #158756;
}

#whatsappShareBtn:hover {
  border-color: #158756;
  box-shadow: 0 12px 24px rgba(30, 166, 114, 0.22);
}

.result-animate {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.result-animate.revealed {
  opacity: 1;
  transform: translateY(0);
}

footer {
  width: 100%;
  padding: 26px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

footer p {
  color: var(--ink-500);
  font-size: 0.72rem;
  line-height: 1.45;
}

.footer-trust {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-700);
}

footer p + p {
  margin-top: 5px;
}

.dev-info {
  margin-top: 8px;
  color: var(--ink-700);
  font-weight: 700;
  font-size: 0.76rem;
}

.dev-info a {
  color: var(--brand-700);
  text-decoration: none;
}

.dev-info a:hover {
  text-decoration: underline;
}

.version {
  margin-left: 6px;
  color: var(--ink-500);
  font-weight: 700;
}

body.theme-dark {
  --ink-900: #e2e8f0;
  --ink-700: #cbd5e1;
  --ink-500: #94a3b8;
  --ink-300: #475569;
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: rgba(148, 163, 184, 0.26);
  background:
    radial-gradient(circle at 14% 6%, rgba(56, 189, 248, 0.16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.13), transparent 24%),
    radial-gradient(circle at 50% 95%, rgba(59, 130, 246, 0.18), transparent 32%),
    linear-gradient(135deg, #0b1220 0%, #101a2f 45%, #111827 100%);
}

body.theme-dark header {
  background: rgba(15, 23, 42, 0.74);
  border-bottom-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .logo-text {
  color: #93c5fd;
}

body.theme-dark .logo-mark {
  background: linear-gradient(155deg, #f87171, #dc2626);
  box-shadow: 0 6px 16px rgba(248, 113, 113, 0.35);
}

body.theme-dark .theme-toggle {
  background: rgba(15, 23, 42, 0.88);
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.4);
}

body.theme-dark .hero-chip {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}

body.theme-dark .question-card,
body.theme-dark .option-btn,
body.theme-dark .share-btn,
body.theme-dark .btn-secondary {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--ink-900);
}

body.theme-dark .option-btn:hover,
body.theme-dark .share-btn:hover,
body.theme-dark .btn-secondary:hover {
  background: rgba(30, 41, 59, 0.95);
}

body.theme-dark .option-btn.selected {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #f8fafc;
}

body.theme-dark .progress-bar {
  background: rgba(148, 163, 184, 0.22);
}

body.theme-dark .dynamic-messages {
  background: rgba(69, 10, 10, 0.35);
  border-color: rgba(251, 113, 133, 0.35);
}

body.theme-dark .emotional-hook {
  background: rgba(30, 64, 175, 0.22);
  border-color: rgba(96, 165, 250, 0.35);
}

body.theme-dark .action-steps {
  background: rgba(6, 78, 59, 0.26);
  border-color: rgba(52, 211, 153, 0.36);
}

body.theme-dark .action-num {
  background: rgba(16, 185, 129, 0.24);
}

body.theme-dark footer {
  background: rgba(15, 23, 42, 0.7);
  border-top-color: rgba(148, 163, 184, 0.24);
}

button:focus-visible {
  outline: 3px solid rgba(64, 146, 255, 0.4);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  main {
    padding-left: 24px;
    padding-right: 24px;
  }

  header {
    text-align: center;
  }

  .question-card {
    padding: 34px 28px;
  }

  .gauge-svg-wrap,
  .gauge-svg-wrap svg {
    width: 220px;
    height: 220px;
  }

  .gauge-score {
    font-size: 3.2rem;
  }
}

@media (max-width: 480px) {
  .share-actions {
    grid-template-columns: 1fr;
  }

  .option-btn {
    padding: 16px 14px;
    font-size: 1rem;
  }

  .action-item {
    gap: 12px;
  }

  .action-text {
    font-size: 0.95rem;
    line-height: 1.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
