/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(220, 20%, 15%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(220, 20%, 15%);
  --primary: hsl(142, 71%, 45%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(140, 30%, 95%);
  --secondary-foreground: hsl(220, 20%, 15%);
  --muted: hsl(210, 20%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --border: hsl(214, 32%, 91%);
  --radius: 0.75rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== LAYOUT ===== */
.quiz-container {
  margin: 0 auto;
  width: 100%;
  max-width: 430px;
  padding-left: 20px;
  padding-right: 20px;
}

/* ===== HEADER ===== */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 0;
  max-width: 430px;
  margin: 0 auto;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.quiz-header .back-btn {
  position: absolute;
  left: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--foreground);
  font-size: 20px;
  line-height: 1;
}

.quiz-header .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.quiz-header .logo-emoji { font-size: 20px; line-height: 1; }
.quiz-header .logo-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-foreground);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-wrapper {
  max-width: 430px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px 8px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.5s ease-out;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ===== BUTTONS ===== */
.cta-button {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: var(--primary);
  padding: 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  border: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  animation: ctaPulse 2.5s ease-in-out infinite;
  text-decoration: none;
}

.cta-button:hover { filter: brightness(1.1); }
.cta-button:active { transform: scale(0.98); }
.cta-button:disabled { opacity: 0.5; cursor: not-allowed; animation: none; }
.cta-button.no-pulse { animation: none; }

.option-button {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  padding: 16px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-button:hover {
  border-color: var(--primary);
  background: var(--secondary);
}

.option-button:active { transform: scale(0.98); }

/* ===== MULTI-SELECT ===== */
.multi-option {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  padding: 16px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.multi-option.selected {
  border-color: var(--primary);
  background: var(--secondary);
}

.multi-option .checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.multi-option.selected .checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.multi-option .checkbox svg { display: none; }
.multi-option.selected .checkbox svg { display: block; }

.multi-option .label { flex: 1; }
.multi-option .emoji { font-size: 20px; flex-shrink: 0; }
.multi-option .thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* ===== STEP CONTENT ===== */
.step-content {
  flex: 1;
  max-width: 430px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px 32px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 16px;
}

.step-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

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

.bottom-image {
  margin-top: 24px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

.bottom-image img { width: 100%; height: auto; display: block; }

/* ===== TESTIMONIAL (step 1) ===== */
.testimonial-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.testimonial-stars { display: flex; gap: 2px; margin-bottom: 4px; }
.testimonial-stars .star { color: #facc15; font-size: 16px; }
.testimonial-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.testimonial-text { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; }

.testimonial-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.testimonial-image img { width: 100%; height: auto; display: block; }

/* ===== SLIDER ===== */
.slider-units {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 24px;
}

.slider-unit-btn {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.slider-unit-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.slider-unit-btn:not(.active) {
  background: var(--muted);
  color: var(--muted-foreground);
}

.slider-value {
  text-align: center;
  margin-bottom: 16px;
}

.slider-value .number { font-size: 48px; font-weight: 700; }
.slider-value .unit { font-size: 24px; color: var(--muted-foreground); margin-left: 4px; }

.slider-input {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--muted);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.slider-hint {
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
  margin: 12px 0 24px;
}

.slider-info {
  background: hsla(142, 71%, 45%, 0.1);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.slider-info-title { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.slider-info-text { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; }

/* ===== SUMMARY (step 22) ===== */
.imc-bar {
  width: 100%;
  height: 12px;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(to right, var(--primary), hsl(60, 80%, 50%), hsl(0, 80%, 50%));
  margin-bottom: 24px;
}

.imc-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: 16px;
  background: var(--primary);
  border: 2px solid var(--background);
  border-radius: 9999px;
  left: 60%;
  transform: translateX(-50%);
}

.summary-stats {
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
}

.summary-stats p { margin-bottom: 8px; }
.summary-stats .value { color: var(--primary); font-weight: 600; }

/* ===== INFO / TRANSITION ===== */
.info-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
}

.info-emoji { font-size: 64px; margin-bottom: 24px; }

.info-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.info-image img { width: 100%; height: auto; display: block; }

.info-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.info-text {
  font-size: 16px;
  color: var(--muted-foreground);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ===== LOADING SCREEN ===== */
.loading-screen { min-height: 100vh; display: flex; flex-direction: column; }

.loading-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 16px 0;
  line-height: 1.3;
}

.loading-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.loading-progress-info .label { color: var(--muted-foreground); }
.loading-progress-info .pct { color: var(--muted-foreground); }

.loading-sub {
  font-size: 14px;
  color: var(--primary);
  text-align: center;
  margin: 16px 0 24px;
}

.loading-testimonial {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.loading-testimonial-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.loading-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.loading-testimonial-name { font-size: 14px; font-weight: 700; }
.loading-testimonial-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.loading-testimonial-text { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; }
.loading-testimonial-location { font-size: 12px; color: var(--muted-foreground); margin-top: 12px; }

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  opacity: 0.3;
  transition: opacity 0.3s, background 0.3s;
}

.loading-dot.active {
  background: var(--primary);
  opacity: 1;
}

/* ===== RESULT PAGE ===== */
.result-page { min-height: 100vh; background: var(--background); }

.result-hero { text-align: center; margin-bottom: 24px; margin-top: 16px; }

.result-hero h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.result-hero .highlight {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
}

.result-image { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }

.urgency-banner {
  background: hsla(0, 84%, 60%, 0.1);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 32px;
  text-align: center;
}

.urgency-banner p { font-size: 14px; font-weight: 700; color: var(--destructive); }

.pricing-section { text-align: center; margin-bottom: 24px; }

.pricing-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

.pricing-box {
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pricing-box .left { text-align: left; font-size: 14px; color: var(--muted-foreground); }
.pricing-box .left .strike { text-decoration: line-through; }
.pricing-box .left .installment { color: var(--primary); font-weight: 700; }
.pricing-box .right { text-align: right; }
.pricing-box .price { font-size: 24px; font-weight: 800; }
.pricing-box .cash { font-size: 12px; color: var(--muted-foreground); }

.plan-includes {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 32px 0;
}

.plan-includes h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.plan-includes .item { font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.plan-includes .bonus { padding-top: 8px; border-top: 1px solid var(--border); }
.plan-includes .bonus-label { font-size: 12px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }

.testimonial-section { margin: 32px 0; }
.testimonial-section h2 { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 24px; line-height: 1.3; }
.testimonial-section .highlight { color: var(--primary); }

.result-testimonial {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.result-testimonial .stars { display: flex; gap: 2px; margin-bottom: 8px; }
.result-testimonial .stars span { color: #facc15; font-size: 16px; }
.result-testimonial .name { font-size: 14px; font-weight: 700; }
.result-testimonial .location { font-size: 12px; color: var(--primary); margin-bottom: 8px; }
.result-testimonial .text { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; }

.guarantee-banner {
  background: var(--primary);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: var(--primary-foreground);
  margin: 32px 0;
}

.guarantee-banner .big { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.guarantee-banner .sub { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.guarantee-banner .small { font-size: 12px; }

.guarantee-details {
  background: hsla(142, 71%, 45%, 0.1);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 32px 0;
}

.guarantee-details .title { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.guarantee-details .text { font-size: 14px; color: var(--muted-foreground); line-height: 1.5; }

/* ===== TRUST BADGES ===== */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 0;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.trust-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-badge-icon svg { width: 24px; height: 24px; color: var(--primary); }
.trust-badge-label { font-size: 12px; color: var(--muted-foreground); text-align: center; font-weight: 500; }

/* ===== FAQ ===== */
.faq-section { padding: 32px 0; }
.faq-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 8px; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--foreground);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question .chevron {
  transition: transform 0.2s;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

.faq-item.open .faq-question .chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s;
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 16px;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 32px 0;
}

/* ===== CHART PLACEHOLDER (transition step 24) ===== */
.chart-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: var(--muted);
  margin-bottom: 24px;
  overflow: hidden;
}

.chart-placeholder svg { width: 100%; height: 100%; padding: 16px; }
