/* --- Variáveis Globais e Reset Básico --- */
:root {
    /* Tema Claro (Padrão) */
    --background-color: #f4f5f7;
    --card-background: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --shadow-color: rgba(0,0,0,0.1);
    
    /* Cores da Marca (não mudam com o tema) */
    --dark-blue: #1a237e;
    --light-blue: #5c6bc0;
    --accent-green: #4CAF50;
    --red-error: #e53e3e;
    --white: #fff;
}

body.dark-mode {
    /* Tema Escuro */
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #444;
    --shadow-color: rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

/* --- Estrutura Principal --- */
#app { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.site-header {
    background-color: var(--card-background);
    padding: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky; top: 0; z-index: 1000;
    transition: background-color 0.3s;
}
.header-container {
    display: flex;
    justify-content: center; /* Alterado de space-between para center */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative; /* Adicionado */
}
.logo { height: 56px; width: auto; }

.site-main {
    flex-grow: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 1.5rem 1rem;
}
.site-footer {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Botão de Tema --- */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Linhas adicionadas para posicionamento */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.theme-toggle:hover {
    color: var(--dark-blue);
    background-color: rgba(0,0,0,0.05);
}
body.dark-mode .theme-toggle:hover { background-color: rgba(255,255,255,0.1); }
.theme-icon { width: 24px; height: 24px; }
#moon-icon { display: none; }
body.dark-mode #sun-icon { display: none; }
body.dark-mode #moon-icon { display: block; }

/* --- Estilos do Quiz --- */
.quiz-wrapper { width: 100%; max-width: 500px; }
.quiz-intro { text-align: center; margin-bottom: 1.5rem; }
.quiz-intro h1 { font-size: 1.75rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 0.5rem; }
.quiz-intro p { font-size: 1rem; color: var(--text-secondary); }
.quiz-box {
    background-color: var(--card-background);
    border-radius: 12px; box-shadow: 0 8px 30px var(--shadow-color);
    padding: 1.5rem; transition: background-color 0.3s;
}
#quiz-container { position: relative; min-height: 250px; }

.progress-container { width: 100%; background-color: var(--border-color); border-radius: 999px; height: 8px; margin-bottom: 2rem; }
.progress-indicator { background-color: var(--dark-blue); height: 100%; border-radius: 999px; width: 0%; transition: width 0.5s ease-in-out; }

.question-card { opacity: 0; visibility: hidden; transform: translateX(30px); transition: opacity 0.4s ease-out, transform 0.4s ease-out, visibility 0.4s; position: absolute; width: 100%;}
.question-card.active { opacity: 1; visibility: visible; transform: translateX(0); position: relative; }
.question-card.fade-out { opacity: 0; transform: translateX(-30px); }
.question-card p { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; }
.question-card .options-container { display: flex; flex-direction: column; gap: 0.75rem; }

.form-input { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; border: 2px solid var(--border-color); border-radius: 8px; transition: all 0.3s; color: var(--text-primary); background-color: var(--background-color); }
.form-input:focus { outline: none; border-color: var(--dark-blue); box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.2); }
.form-input.invalid { border-color: var(--red-error); }

.answer-btn { width: 100%; padding: 1rem; font-size: 1rem; font-weight: 600; text-align: left; border: 2px solid var(--border-color); border-radius: 8px; background-color: transparent; cursor: pointer; transition: all 0.3s; color: var(--text-primary); }
.answer-btn:hover { background-color: var(--background-color); border-color: var(--dark-blue); }
.answer-btn.selected { background-color: var(--dark-blue); color: var(--white); border-color: var(--dark-blue); }

.cta-button { width: 100%; margin-top: 2rem; padding: 1rem; background-color: var(--dark-blue); color: var(--white); font-size: 1.1rem; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(26, 35, 126, 0.2); }
.cta-button:hover { background-color: var(--light-blue); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3); }

.error-message { color: var(--red-error); font-size: 0.875rem; margin-top: 0.5rem; font-weight: 600; display: none; }

/* --- Spinner e Tela Final --- */
.loader-container { text-align: center; padding: 2rem; }
.loader { width: 32px; height: 32px; border: 4px solid var(--dark-blue); border-bottom-color: transparent; border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; }
.loader-container p { margin-top: 1rem; font-weight: 600; }
.result-card { width: 100%; max-width: 500px; background-color: var(--card-background); border-radius: 12px; box-shadow: 0 8px 30px var(--shadow-color); padding: 2rem; text-align: center; }
.result-icon { width: 4rem; height: 4rem; color: var(--accent-green); margin: 0 auto 1rem; }
.result-title { font-size: 2rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 0.5rem; }
.result-text { font-size: 1.1rem; color: var(--text-secondary); }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Seção de Prova Social --- */
.social-proof-section { background-color: var(--background-color); padding: 4rem 1rem; text-align: center; transition: background-color 0.3s;}
.section-title { font-size: 2rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 2.5rem; }
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 1000px; margin: 0 auto; }
.testimonial-card { background-color: var(--card-background); padding: 2rem; border-radius: 12px; border-left: 5px solid var(--dark-blue); text-align: left; transition: background-color 0.3s;}
.testimonial-quote { font-size: 1.1rem; color: var(--text-secondary); font-style: italic; margin-bottom: 1rem; }
.testimonial-author { font-size: 1rem; font-weight: 600; color: var(--text-primary); text-align: right; }

/* --- Media Queries --- */
@media (min-width: 768px) {
    .quiz-box { padding: 2.5rem; }
    .quiz-intro h1 { font-size: 2rem; }
    .testimonials-grid { grid-template-columns: 1fr 1fr; }
}