/**
 * Quiz Frontend Styles
 * Matches the design shown in quiz.png
 */

.quiz-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.quiz-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Progress Section */
.quiz-progress-container {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
}

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

.current-question {
    background: #2eb398;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.question-counter {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2eb398;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Question Content */
.quiz-questions {
    padding: 40px 30px 20px;
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
}

.question-content h3.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0 0 30px 0;
}

/* Answer Options */
.question-answers {
    margin: 0 0 30px 0;
}

.answer-option {
    margin-bottom: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.answer-option:hover {
    border-color: #d0d0d0;
    background: #f8f9fa;
}

.answer-option:has(.answer-input:checked) {
    border-color: #2eb398;
    background: #f0fffe;
}

.answer-option.correct {
    border-color: #28a745;
    background: #f8fff8;
}

.answer-option.incorrect {
    border-color: #dc3545;
    background: #fff8f8;
}

.answer-label {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    cursor: pointer;
    gap: 15px;
    margin: 0;
    width: 100%;
}

.answer-input {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #2eb398;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.answer-letter {
    background: #f1f3f4;
    color: #5f6368;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.answer-option:has(.answer-input:checked) .answer-letter {
    background: #2eb398;
    color: white;
}

.answer-option.correct .answer-letter {
    background: #28a745;
    color: white;
}

.answer-option.incorrect .answer-letter {
    background: #dc3545;
    color: white;
}

.answer-text {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    flex: 1;
}

/* Answer Tags */
.answer-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correct-tag {
    background: #28a745;
    color: white;
}

/* Explanation */
.question-explanation {
    margin-top: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #2eb398;
    border-radius: 0 8px 8px 0;
}

.explanation-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.explanation-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* Navigation */
.quiz-navigation {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.quiz-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quiz-btn-primary {
    background: #6b7280;
    color: white;
}

.quiz-btn-primary:hover:not(:disabled) {
    background: #5b626f;
}

.quiz-btn-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.quiz-btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Results */
.quiz-results {
    padding: 40px 30px;
    text-align: center;
}

.quiz-results h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.results-summary {
    margin-bottom: 30px;
}

.results-summary p {
    font-size: 18px;
    margin: 10px 0;
    color: #555;
}

.score-value,
.percentage-value {
    font-weight: 600;
    color: #2eb398;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-page-container {
        padding: 10px;
    }
    
    .quiz-header,
    .quiz-questions {
        padding: 20px;
    }
    
    .quiz-progress-container {
        padding: 15px 20px;
    }
    
    .quiz-navigation {
        padding: 15px 20px 20px;
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .quiz-btn {
        width: 100%;
        min-width: auto;
    }
    
    .question-content h3.question-text {
        font-size: 18px;
    }
    
    .answer-label {
        padding: 12px 15px;
    }
    
    .quiz-progress {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .question-counter {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .quiz-title {
        font-size: 22px;
    }
    
    .question-content h3.question-text {
        font-size: 16px;
    }
    
    .answer-text {
        font-size: 14px;
    }
    
    .answer-label {
        padding: 10px 12px;
        gap: 12px;
    }
}