/* Paleta de Cores */
:root {
    --primary-color: #7B42F6; 
    --primary-dark: #5A27B0;  
    --background-light: #f7f7f7; 
    --card-background: #ffffff; 
    --border-radius: 12px;   
    --shadow: rgba(0, 0, 0, 0.08);
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

/* Reset e Estilo Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* Seções */
section {
    max-width: 900px; 
    margin: 0 auto 30px auto;
    background: var(--card-background);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
    animation: fadeIn 0.5s ease-in;
}

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

/* Títulos */
h2 {
    color: var(--primary-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 2em;
}

h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

h4 {
    color: var(--primary-dark);
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Descrições e Instruções */
.descricao, .instrucoes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary-color);
}

.instrucoes {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.info {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0;
}

/* Cards de Seleção de Questionário */
.questionario-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.questionario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.questionario-card h3 {
    color: white;
    margin-top: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.questionario-card p {
    margin: 10px 0;
}

.questionario-card .info {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Botões */
button, .btn-selecionar {
    background: var(--primary-color);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: auto;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(123, 66, 246, 0.3);
}

button:hover, .btn-selecionar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(123, 66, 246, 0.4);
}

button:active, .btn-selecionar:active {
    transform: translateY(0);
}

form button[type="submit"] {
    width: 100%;
    margin-top: 30px;
    padding: 18px;
    font-size: 18px;
}

#btnVoltar {
    background: #6c757d;
    margin-top: 20px;
}

#btnVoltar:hover {
    background: #5a6268;
}

/* Formulários */
form label:not(.pergunta label) {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
select {
    width: 100%;
    padding: 12px 15px;
    margin: 5px 0 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 66, 246, 0.1);
    outline: none;
}

/* Perguntas */
.pergunta {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.pergunta:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pergunta p {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.05em;
}

.pergunta label {
    display: inline-flex;
    align-items: center;
    margin-right: 25px;
    margin-bottom: 10px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.pergunta label:hover {
    background: rgba(123, 66, 246, 0.05);
}

.pergunta input[type="radio"],
.pergunta input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Categorias */
.categoria {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 35px;
    margin-bottom: 20px;
    font-size: 1.3em;
    box-shadow: 0 3px 10px rgba(123, 66, 246, 0.3);
}

/* Resultados */
.resultado-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.escore-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.escore-box h4 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.escore-box p {
    margin: 12px 0;
    font-size: 1.05em;
}

.interpretacao-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid var(--primary-color);
}

.interpretacao-box h4 {
    color: var(--primary-dark);
    margin-top: 0;
}

.interpretacao-box p {
    margin: 12px 0;
    line-height: 1.8;
}

.interpretacao-box ul {
    margin: 15px 0;
    padding-left: 25px;
}

.interpretacao-box li {
    margin: 8px 0;
}

.dados-usuario {
    background: #e9ecef;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.dados-usuario h3 {
    margin-top: 0;
    color: var(--primary-dark);
}

.dados-usuario p {
    margin: 8px 0;
    font-size: 1.02em;
}

/* Status de Envio */
#statusEnvioEmail {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    margin: 20px 0;
    background: #f8f9fa;
    border: 2px solid var(--primary-color);
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    section {
        padding: 25px 20px;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .pergunta label {
        display: block;
        margin: 8px 0;
    }
    
    .questionario-card {
        padding: 20px;
    }
    
    button, .btn-selecionar {
        width: 100%;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.4em;
    }
    
    section {
        padding: 20px 15px;
    }
    
    .pergunta {
        padding: 15px;
    }
}

/* Animações */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(123, 66, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(123, 66, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(123, 66, 246, 0);
    }
}

button:focus {
    animation: pulse 1.5s infinite;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Impressão */
@media print {
    body {
        background: white;
    }
    
    section {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    button {
        display: none;
    }
    
    .questionario-card {
        background: white;
        color: black;
        border: 2px solid #333;
    }
    
    .escore-box {
        background: white;
        color: black;
        border: 2px solid #333;
    }
}
