/* Quiz Dinâmico - Estilos */

.quiz-dinamico-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Cabeçalho do Quiz */
.quiz-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.quiz-content {
    flex: 1;
}

.quiz-titulo {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.quiz-descricao {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.quiz-imagem {
    flex-shrink: 0;
    width: 200px;
}

.quiz-imagem img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Caixa Informativa */
.quiz-info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    margin-bottom: 30px;
}

.quiz-info-box h3 {
    color: #007cba;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.quiz-info-box .info-texto {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Barra de Progresso */
.quiz-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Questões */
.quiz-questao {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.quiz-questao.ativa {
    display: block;
}

.quiz-questao:first-child {
    display: block;
}

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

.questao-numero {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.questao-separador {
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #8bc34a, #4caf50);
    border-radius: 2px;
    margin-bottom: 20px;
}

.questao-texto {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
    font-weight: 400;
}

/* Escala Likert */
.escala-likert {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
}

.escala-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.escala-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.escala-opcoes {
    display: flex;
    gap: 8px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.escala-opcao {
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease;
}

.escala-opcao:hover {
    transform: translateY(-2px);
}

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

.escala-visual {
    display: block;
    width: 40px;
    height: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

/* Cores da Escala */
.escala-1 { background: #e53e3e; }
.escala-2 { background: #fd7f28; }
.escala-3 { background: #fbb042; }
.escala-4 { background: #9bd13a; }
.escala-5 { background: #68d391; }

/* Estado selecionado */
.escala-opcao input[type="radio"]:checked + .escala-visual {
    transform: scale(1.2) translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.escala-opcao input[type="radio"]:checked + .escala-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Navegação */
.quiz-navegacao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.btn-anterior,
.btn-proximo {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-anterior:hover,
.btn-proximo:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-proximo.finalizar {
    background: #007cba;
}

.btn-proximo.finalizar:hover {
    background: #005a87;
}

.btn-proximo.habilitado {
    background: #28a745;
}

.btn-proximo.habilitado:hover {
    background: #218838;
}

/* Resultado */
.quiz-resultado {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 30px;
}

.resultado-container h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
}

.resultado-personagem {
    margin: 20px 0;
}

.resultado-personagem h2 {
    font-size: 36px;
    color: #007cba;
    margin: 0;
    font-weight: 700;
}

.resultado-pontuacao {
    font-size: 48px;
    font-weight: 700;
    color: #28a745;
    margin: 20px 0;
}

.resultado-descricao {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.resultado-acoes {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-reiniciar,
.btn-compartilhar {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-reiniciar:hover,
.btn-compartilhar:hover {
    background: #005a87;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-compartilhar {
    background: #28a745;
}

.btn-compartilhar:hover {
    background: #1e7e34;
}

/* Erro */
.quiz-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .quiz-dinamico-container {
        padding: 15px;
        margin: 10px;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .quiz-imagem {
        width: 150px;
        align-self: center;
    }
    
    .quiz-titulo {
        font-size: 24px;
    }
    
    .escala-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .quiz-navegacao {
        flex-direction: column;
        gap: 15px;
    }
    
    .escala-label {
        min-width: auto;
    }
    
    .escala-visual {
        width: 50px;
        height: 15px;
    }
    
    .btn-anterior,
    .btn-proximo {
        width: 100%;
    }
    
    .resultado-acoes {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-reiniciar,
    .btn-compartilhar {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .quiz-titulo {
        font-size: 20px;
    }
    
    .escala-opcoes {
        justify-content: center;
        padding: 10px;
    }
    
    .escala-visual {
        width: 35px;
        height: 12px;
    }
    
    .resultado-personagem h2 {
        font-size: 28px;
    }
    
    .resultado-pontuacao {
        font-size: 36px;
    }
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
