/* Estilos Globais Responsivos */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #2c3e50;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

input:focus, 
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

/* Botões e Links */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    padding: 12px;
}

/* Mensagens de erro */
.error-alert {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

/* Estilos para a página inicial */
.form-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* Estilos para as questões */
.questao {
    margin-bottom: 25px;
    padding: 20px;
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.pergunta {
    background-color: #495057;
    color: #ffffff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 1.1em;
}

.alternativas {
    padding: 10px;
}

.alternativa-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.alternativa-item:hover {
    background-color: #f8f9fa;
}

.alternativa-texto {
    margin-left: 10px;
}

input[type="radio"] {
    margin: 0;
}

/* Estilos para a página de quiz */
.quiz-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.quiz-header h1 {
    margin-bottom: 10px;
}

.quiz-info {
    display: block;
    margin: 15px 0;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.quiz-info p {
    margin: 5px 0;
    font-size: 1.1em;
}

.question-container {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.question {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #2c3e50;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.option-selected {
    background-color: #d4edff;
    border-color: #3498db;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.progress-container {
    margin-bottom: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

/* Estilos para a página de resultados */
.resultado-header {
    text-align: center;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.aluno-info {
    margin: 15px 0;
}

.pontuacao {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin: 20px 0;
}

.pontuacao-valor {
    color: #27ae60;
    font-size: 36px;
    display: block;
    margin: 10px 0;
}

.resumo-container {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.resumo-titulo {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.questao-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.questao-texto {
    font-weight: bold;
    margin-bottom: 10px;
}

.resposta {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.resposta-correta {
    background-color: #d4edda;
    color: #155724;
}

.resposta-errada {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-container {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* Estilos para a página de consulta de resultados */
.header {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.info-aluno {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.resultados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resultado-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.resultado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.resultado-materia {
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.resultado-data {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.resultado-pontuacao {
    background-color: #3498db;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
}

.no-results {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.questao-review {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.correta {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.incorreta {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.consulta-resultados {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.titulo-menor {
    font-size: 0.95rem;
    font-weight: bold;
    margin: 0;
    display: inline;
}

.footer {
    text-align: center;
    font-size: 0.95rem;
    color: #888;
    margin-top: 40px;
    padding: 15px 0 5px 0;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .form-container, 
    .quiz-header,
    .resultado-header,
    .header,
    .resumo-container,
    .question-container {
        padding: 20px 15px;
    }
    
    .resultados-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
    
    .question {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .pontuacao {
        font-size: 20px;
    }
    
    .pontuacao-valor {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input[type="text"],
    select {
        padding: 10px;
    }
    
    .resultados-grid {
        grid-template-columns: 1fr;
    }
    
    .btn, 
    .action-buttons .btn {
        width: 100%;
        padding: 12px 0;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .question {
        font-size: 17px;
    }
    
    .option {
        padding: 12px;
    }
    
    .pontuacao {
        font-size: 18px;
    }
    
    .pontuacao-valor {
        font-size: 26px;
    }
    
    .resumo-titulo {
        font-size: 18px;
    }
    
    .btn-container {
        flex-direction: column;
    }
}

/* Estilos para o botão de áudio */
.btn-audio {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.btn-audio:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.btn-audio:active {
    background-color: #1f5f8b;
    transform: scale(0.95);
}

/* Estilos para o botão de áudio em inglês */
.btn-audio-ingles {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.btn-audio-ingles:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

.btn-audio-ingles:active {
    background-color: #a93226;
    transform: scale(0.95);
}

/* Estilos para o botão de explicação */
.btn-explicacao {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.btn-explicacao:hover {
    background-color: #e67e22;
    transform: scale(1.1);
}

.btn-explicacao:active {
    background-color: #d35400;
    transform: scale(0.95);
}

/* Estilos para o modal/popup */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: none;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

#conteudoExplicacao {
    margin-top: 20px;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
}

/* Responsividade para o modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 15px;
    }
    
    .btn-explicacao, .btn-audio, .btn-audio-ingles {
        width: 25px;
        height: 25px;
        font-size: 12px;
        margin-left: 5px;
    }
}
