import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react'; import ReactDOM from 'react-dom/client'; // --- DEFINIÇÕES DE DADOS --- interface Option { id: string; text: string; emoji?: string; image?: string; } interface QuizStep { id: string; type: 'age' | 'info' | 'single-choice' | 'multi-choice' | 'loading' | 'name' | 'final-plan' | 'commitment' | 'slider'; title: string; subtitle?: string; options?: Option[]; image?: string; buttonText?: string; mainText?: string; loadingTexts?: string[]; min?: number; max?: number; defaultValue?: number; unit?: string; hint?: string; testimonials?: { name: string; date: string; rating: number; text: string; avatar: string; }[]; } const quizData: QuizStep[] = [ { id: 'name', type: 'name', title: '👊 QUAL É SEU NOME?', subtitle: 'Quero te chamar pelo nome quando te salvar dessa situação.', buttonText: 'CONTINUAR' }, { id: 'age', type: 'slider', title: '⏰ QUAL SUA IDADE?', subtitle: 'Depois dos 30, o corpo começa a te jogar contra a parede.', hint: 'Arraste para selecionar', min: 18, max: 80, defaultValue: 35, unit: 'anos', buttonText: 'PRÓXIMO PASSO' }, { id: 'currentWeight', type: 'slider', title: '⚖️ SEU PESO ATUAL EM KG?', subtitle: 'Seja honesta para o plano funcionar.', hint: 'Arraste para marcar', min: 40, max: 200, defaultValue: 80, unit: 'kg', buttonText: 'REGISTRAR PESO' }, { id: 'height', type: 'slider', title: '📏 E SUA ALTURA EM CM?', subtitle: 'Ajuste sua altura exata.', hint: 'Arraste para ajustar', min: 100, max: 220, defaultValue: 165, unit: 'cm', buttonText: 'CALCULAR IMC' }, { id: 'proof-27k', type: 'info', title: 'MAIS DE 27.000 MULHERES!', subtitle: 'Elas relataram perda de peso real. Comece sua mudança agora.', image: 'https://conquistafit.site/wp-content/uploads/2025/11/lg-if2k4-pag2-ajrdsc.webp', buttonText: 'EU QUERO SER A PRÓXIMA' }, { id: 'whatHoldsYouBack', type: 'multi-choice', title: '💥 O QUE TE TRAVA HOJE?', options: [{ id: 'h1', text: 'Ansiedade / Compulsão' }, { id: 'h2', text: 'Falta de Tempo' }, { id: 'h3', text: 'Metabolismo Lento' }, { id: 'h4', text: 'Efeito Sanfona' }], buttonText: 'VOU SUPERAR ISSO' }, { id: 'feelingInMirror', type: 'single-choice', title: '😡 SENTIMENTO NO ESPELHO?', options: [{ id: 'f1', text: 'Frustrada e Cansada', emoji: '😞' }, { id: 'f2', text: 'Sem Autoestima', emoji: '💔' }, { id: 'f3', text: 'Vergonha de Sair', emoji: '😶' }, { id: 'f4', text: 'Pronta para o Basta', emoji: '🔥' }] }, { id: 'before-after-1', type: 'info', title: 'RESULTADOS EM 7 DIAS', subtitle: 'Queima de gordura visceral destravada.', image: 'https://conquistafit.site/wp-content/uploads/2025/11/Group-1891.png', buttonText: 'QUERO ESSE RESULTADO' }, { id: 'mealsPerDay', type: 'slider', title: '🍔 REFEIÇÕES POR DIA?', min: 1, max: 8, defaultValue: 3, unit: 'vezes', buttonText: 'CONFIRMAR' }, { id: 'before-after-2', type: 'info', title: 'TRANSFORMAÇÃO VISÍVEL', image: 'https://conquistafit.site/wp-content/uploads/2025/11/Dep-5.png', buttonText: 'CONTINUAR' }, { id: 'dietaryRestrictions', type: 'multi-choice', title: '🚫 RESTRIÇÃO ALIMENTAR?', options: [{ id: 'r1', text: 'Nenhuma' }, { id: 'r2', text: 'Sem Glúten' }, { id: 'r3', text: 'Sem Lactose' }, { id: 'r4', text: 'Vegetariana' }], buttonText: 'PRÓXIMO' }, { id: 'before-after-3', type: 'info', title: 'SAÚDE QUE SE VÊ', image: 'https://conquistafit.site/wp-content/uploads/2025/11/Dep6.png', buttonText: 'VAMOS ADIANTE' }, { id: 'exerciseFrequency', type: 'single-choice', title: '🏋️♀️ EXERCÍCIOS?', options: [{ id: 'e1', text: 'Sedentária', emoji: '🛋️' }, { id: 'e2', text: 'Pouco ativa', emoji: '🚶' }, { id: 'e3', text: 'Ativa', emoji: '🏃' }, { id: 'e4', text: 'Atleta', emoji: '🏅' }] }, { id: 'before-after-4', type: 'info', title: 'MUDANÇA POSSÍVEL', image: 'https://conquistafit.site/wp-content/uploads/2025/11/Group-1889.png', buttonText: 'QUERO COMEÇAR' }, { id: 'familySupport', type: 'single-choice', title: '👨👩👧 FAMÍLIA APOIA?', options: [{ id: 's1', text: 'Me apoiam', emoji: '❤️' }, { id: 's2', text: 'Me sabotam', emoji: '🍕' }, { id: 's3', text: 'Indiferentes', emoji: '😐' }, { id: 's4', text: 'Moro sozinha', emoji: '🏠' }] }, { id: 'before-after-5', type: 'info', title: 'SUA NOVA VERSÃO 2026', image: 'https://conquistafit.site/wp-content/uploads/2025/11/Group-1890.png', buttonText: 'QUASE LÁ, CONTINUAR' }, { id: 'fatteningHabit', type: 'multi-choice', title: '🍕 HÁBITO QUE ENGORDA?', options: [{ id: 'hab1', text: 'Beliscar' }, { id: 'hab2', text: 'Doce' }, { id: 'hab3', text: 'Noite' }, { id: 'hab4', text: 'Bebidas' }], buttonText: 'VOU ELIMINAR' }, { id: 'motivationLevel', type: 'commitment', title: '🔥 ESTÁ PRONTA?', buttonText: 'ESTOU 100% PRONTA' }, { id: 'loading-1', type: 'loading', title: 'GERANDO DOSSIÊ...', mainText: 'Processando seus dados metabólicos.', loadingTexts: ['Calculando IMC...', 'Protocolos de saciedade...', 'Dossiê 2026...', 'Finalizando...'], testimonials: [{ name: 'Dra. Paula Costa', date: 'Nutricionista', rating: 5, text: 'Quase pronto. Metabolismo detectado.', avatar: 'https://conquistafit.site/wp-content/uploads/2025/12/595111737_122141445536959250_3157664674890558791_n.jpg' }] }, { id: 'final-plan', type: 'final-plan', title: 'DIAGNÓSTICO CONCLUÍDO!', subtitle: 'DERRETA 5KG EM 7 DIAS', image: 'https://i.postimg.cc/c1m5rthW/50-RECEUITAS.png', buttonText: 'LIBERAR ACESSO' }, ]; // --- COMPONENTES --- const ProgressBar = ({ progress }: { progress: number }) => (
{current.subtitle}
setAnswers(p => ({ ...p, name: e.target.value }))} placeholder="DIGITE SEU NOME" className="w-full p-6 bg-white border-2 border-slate-100 rounded-[2rem] text-center text-xl focus:border-primary focus:outline-none font-black text-secondary shadow-xl uppercase mb-10" />{current.subtitle}
Dra. Paula Costa
"{current.testimonials![0].text}"
Seu Metabolismo Está em Estado de
ALERTA 🔥"{current.subtitle}"
}