/* Tema Light — Clean e Minimalista */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg: #FFFFFF;
    --bg-alt: #FAFAFA;
    --text: #1A1A2E;
    --text-secondary: #636E72;
    --accent: #695ddf;
    --accent-hover: #5a4fc7;
    --accent-light: #a29bfe;
    --accent-lighter: #dfe6e9;
    --opcao-bg: #FFFFFF;
    --opcao-bg-hover: #F8F9FA;
    --opcao-border: #dfe6e9;
    --opcao-border-hover: #695ddf;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

body {
    background: var(--bg);
}

.hidden {
    display: none !important;
}

.tela {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--bg);
}

body.tela-inicial-body {
    background: var(--bg);
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    padding: 40px 24px;
    box-shadow: none;
}


.content {
    text-align: center;
}

/* —— TELA 0 — Pré-quiz (Welcome Card) —— */
.welcome-card {
    text-align: center;
}

.quiz-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.quiz-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.benefits-list {
    list-style: none;
    margin-bottom: 32px;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-list li {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 12px;
}

.benefits-list li.warning-item {
    font-size: 14px;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b894;
    color: #fff;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.check-icon.warning-icon {
    background: transparent !important;
    color: var(--text-secondary);
    font-size: 18px;
    width: auto;
    height: auto;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}


.social-proof {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.social-proof .counter {
    font-weight: 700;
    color: var(--accent);
}

/* —— TELA 1 — Instrução —— */
.tela-preparacao h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.tela-preparacao .aviso-preparacao {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 400;
}

/* —— Botão CTA —— */
.btn {
    background: var(--accent);
    color: #fff;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(105, 93, 223, 0.2);
}

.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(105, 93, 223, 0.3);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(105, 93, 223, 0.2);
}

.btn-primary {
    margin-top: 0;
}

.btn-large {
    padding: 20px 32px;
    font-size: 18px;
}

.btn-next {
    width: 100%;
    margin-top: 0;
    position: relative;
}



/* —— Tela e-mail —— */
.form-group {
    margin-bottom: 24px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.form-group input {
    width: 70%;
    padding: 14px 18px;
    background: var(--opcao-bg);
    border: 1px solid var(--opcao-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px var(--shadow);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--opcao-bg);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.email-erro {
    color: #ef4444;
    font-size: 14px;
    margin-top: -16px;
    margin-bottom: 16px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

.email-erro.hidden {
    display: none;
}

/* —— Progresso (minimalista) —— */
.progress-wrap {
    margin-bottom: 32px;
}

.progress-container {
    position: relative;
}

.progress-bar {
    height: 14px;
    background: var(--accent-lighter);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(105, 93, 223, 0.3);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.progress-percent {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
}

.numero-pergunta {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* —— Perguntas —— */
.pergunta-texto {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 32px;
    text-align: center;
}

.micro-pergunta {
    display: none;
}

/* —— Alternativas (botões grandes, empilhados) —— */
.opcoes {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 32px;
}

.opcao {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--opcao-bg);
    border: 2px solid var(--opcao-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 12px;
    min-height: 56px;
    gap: 12px;
}

.opcoes .opcao:last-child {
    margin-bottom: 0;
}

.opcao:hover:not(:has(input[type="radio"]:checked)) {
    background: var(--opcao-bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.opcao input[type="radio"] {
    display: none;
}

.opcao-texto {
    flex: 1;
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    display: flex;
    align-items: center;
    margin-left: 0;
}

.opcao-emoji {
    font-size: 20px;
    margin-right: 10px;
    display: inline-block;
    line-height: 1;
    flex-shrink: 0;
    vertical-align: middle;
}

.opcao:has(input[type="radio"]:checked) {
    background: var(--accent-lighter);
    border-color: var(--accent);
    border-width: 3px;
}

.opcao:has(input[type="radio"]:checked) .opcao-texto {
    font-weight: 400;
    color: var(--text);
}

.opcao-checkmark {
    display: none;
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.opcao:has(input[type="radio"]:checked) .opcao-checkmark {
    display: block;
    opacity: 1;
}

/* —— Micro-copy entre perguntas —— */
.micro-copy {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
    padding: 24px 32px;
    border: 1px solid var(--opcao-border);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 400;
    z-index: 10000;
    text-align: center;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: fadeIn 0.4s ease;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.micro-copy p {
    margin: 0;
    line-height: 1.5;
}

/* —— Tela transição entre perguntas —— */
#tela-transicao {
    background: var(--bg);
}

#tela-transicao .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

#tela-transicao .content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.transicao-titulo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease-out;
}

.transicao-mensagem {
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.transicao-progresso {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
    animation: fadeInUp 0.7s ease-out;
}

.transicao-continuidade {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 32px;
    line-height: 1;
    animation: fadeInUp 0.8s ease-out;
    opacity: 0.6;
}

.btn-transicao {
    animation: fadeInUp 0.9s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Tela processamento —— */
.loading-processando {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 40px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--accent-lighter);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.processamento-textos {
    min-height: 120px;
    margin-top: 24px;
}

.loader-wrap {
    width: 100%;
    height: 14px;
    background: var(--accent-lighter);
    border-radius: 10px;
    overflow: hidden;
    margin: 32px auto 40px;
    max-width: 400px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.loader-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 10px;
    animation: loadBar 5.5s ease-in-out forwards;
    box-shadow: 0 2px 8px rgba(105, 93, 223, 0.3);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmerLoader 1.5s ease-in-out infinite;
}

@keyframes loadBar {
    0% { width: 0; }
    20% { width: 25%; }
    40% { width: 50%; }
    60% { width: 75%; }
    85% { width: 95%; }
    100% { width: 100%; }
}

@keyframes shimmerLoader {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.processamento-texto {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 20px 0;
    font-weight: 400;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    line-height: 1.6;
    min-height: 28px;
    display: block;
    visibility: hidden;
    transform: translateY(10px);
}

.processamento-texto.ativo {
    opacity: 1;
    color: var(--text);
    font-weight: 500;
    transform: translateY(0);
    visibility: visible;
}

/* —— Erro —— */
.erro-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #EF4444;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* —— Mobile —— */
@media (max-width: 768px) {
    .tela {
        padding: 20px 16px;
    }

    .container {
        max-width: 100%;
        padding: 32px 20px;
    }
    
    .quiz-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .welcome-title {
        font-size: 26px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .benefits-list {
        max-width: 100%;
    }

    .tela-preparacao h2 {
        font-size: 1.25rem;
    }

    .pergunta-texto {
        font-size: 18px;
    }

    .opcao {
        padding: 14px 16px;
    }

    .opcao-texto {
        font-size: 15px;
    }
    
    .form-group input {
        width: 85%;
    }

    .btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    .progress-percent {
        font-size: 0.9375rem;
    }

    .numero-pergunta {
        font-size: 0.8125rem;
    }

    .micro-copy {
        max-width: 90%;
        padding: 20px 24px;
        font-size: 0.875rem;
    }
}

/* —— Tablet —— */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 700px;
    }
}
