/* Estilos para as páginas de quiz */
.quiz-page {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Seleção de Tópico */
.topic-selection {
    max-width: 1000px;
    margin: 0 auto;
}

.selection-header {
    text-align: center;
    margin-bottom: 50px;
}

.selection-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 16px;
}

.selection-header p {
    font-size: 1.2rem;
    color: #666;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.topic-option {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.topic-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #0056b3;
}

.topic-option .topic-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.topic-option h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 10px;
}

.topic-option p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.topic-option .btn {
    width: 100%;
}

/* Introdução do Quiz Completo */
.quiz-intro {
    max-width: 800px;
    margin: 0 auto;
}

.intro-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.intro-header {
    text-align: center;
    margin-bottom: 40px;
}

.intro-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.intro-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 16px;
}

.intro-header p {
    font-size: 1.2rem;
    color: #666;
}

.intro-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.detail-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 5px;
}

.detail-content p {
    color: #666;
    font-size: 0.9rem;
}

.intro-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    display: flex;
    gap: 15px;
}

.warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.warning-content h4 {
    color: #856404;
    font-weight: 600;
    margin-bottom: 10px;
}

.warning-content ul {
    color: #856404;
    margin: 0;
    padding-left: 20px;
}

.warning-content li {
    margin-bottom: 5px;
}

.intro-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Área do Quiz */
.quiz-area {
    max-width: 900px;
    margin: 0 auto;
}

.quiz-header {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 15px;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quiz-progress span {
    font-weight: 600;
    color: #333;
    min-width: 60px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    width: 0%;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
}

.timer-icon {
    font-size: 1.5rem;
}

.quiz-timer span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0056b3;
    min-width: 70px;
}

.quiz-timer.warning {
    border-color: #ffc107;
    background: #fff3cd;
}

.quiz-timer.danger {
    border-color: #dc3545;
    background: #f8d7da;
}

.quiz-timer.danger span {
    color: #dc3545;
}

/* Navegação de Questões (Quiz Completo) */
.questions-nav {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-header {
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 8px;
}

.question-nav-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-nav-btn:hover {
    border-color: #0056b3;
    color: #0056b3;
}

.question-nav-btn.current {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
}

.question-nav-btn.answered {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.question-nav-btn.answered:hover {
    background: #218838;
    border-color: #218838;
}

/* Container da Questão */
.question-container {
    margin-bottom: 30px;
}

.question-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.question-number {
    font-size: 1rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 10px;
}

.question-topic {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
    margin-bottom: 30px;
}

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

.option {
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    border-color: #0056b3;
    background: #f8f9fa;
}

.option.selected {
    border-color: #0056b3;
    background: #e3f2fd;
}

.option-letter {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: #0056b3;
    color: white;
}

.option-text {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

/* Controles do Quiz */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiz-controls .btn {
    min-width: 120px;
}

/* Área de Resultados */
.results-area {
    max-width: 800px;
    margin: 0 auto;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-header {
    margin-bottom: 40px;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 20px;
}

.results-score {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.results-score.passed {
    color: #28a745;
}

.results-score.failed {
    color: #dc3545;
}

.results-status {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 20px;
}

.results-status.passed {
    background: #d4edda;
    color: #155724;
}

.results-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.results-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 16px;
}

.result-stat {
    text-align: center;
}

.result-stat .stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.result-stat .stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0056b3;
}

.results-breakdown {
    margin-bottom: 40px;
    text-align: left;
}

.results-breakdown h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 20px;
    text-align: center;
}

.topic-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.topic-breakdown-item .topic-name {
    font-weight: 500;
    color: #333;
}

.topic-breakdown-item .topic-score {
    font-weight: 600;
    color: #0056b3;
}

.results-message {
    background: #e3f2fd;
    border-left: 4px solid #0056b3;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: left;
}

.results-message h4 {
    color: #0056b3;
    font-weight: 600;
    margin-bottom: 10px;
}

.results-message p {
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal de Revisão */
.review-modal {
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.review-question {
    border-bottom: 1px solid #e1e5e9;
    padding: 25px 0;
}

.review-question:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-number {
    font-weight: 600;
    color: #0056b3;
}

.review-result {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.review-result.correct {
    background: #d4edda;
    color: #155724;
}

.review-result.wrong {
    background: #f8d7da;
    color: #721c24;
}

.review-question-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

.review-options {
    margin-bottom: 15px;
}

.review-option {
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-option.user-answer {
    background: #e3f2fd;
    border: 1px solid #0056b3;
}

.review-option.correct-answer {
    background: #d4edda;
    border: 1px solid #28a745;
}

.review-option.wrong-answer {
    background: #f8d7da;
    border: 1px solid #dc3545;
}

.review-explanation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
}

.review-explanation strong {
    color: #0056b3;
}

/* Responsividade */
@media (max-width: 768px) {
    .quiz-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .quiz-progress {
        justify-content: center;
    }
    
    .progress-bar {
        width: 150px;
    }
    
    .questions-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .question-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .question-card {
        padding: 25px 20px;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-controls .btn {
        width: 100%;
    }
    
    .results-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
    }
    
    .intro-actions {
        flex-direction: column;
    }
    
    .intro-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quiz-page {
        padding: 20px 0;
    }
    
    .selection-header h1 {
        font-size: 2rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-card {
        padding: 25px 20px;
    }
    
    .intro-header h1 {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .results-score {
        font-size: 3rem;
    }
    
    .results-details {
        grid-template-columns: 1fr;
    }
}





/* === ESTILO AO CLICAR NA RESPOSTA === */
.option {
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 14px;
  margin: 8px 0;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.option:hover {
  background-color: #e9f1ff;
  border-color: #007bff;
}

/* Quando o usuário clica (ativa a opção) */
.option.selected {
  background-color: #007bff !important; /* Azul marcante */
  color: #fff !important; /* Texto branco */
  border-color: #0056d2;
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
}

/* Efeito de clique */
.option:active {
  transform: scale(0.98);
}
