/* Adaptive Quiz System Frontend Styles */
.aqs-chapter-selection {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.aqs-chapter-selection h3 {
    margin-bottom: 20px;
    color: #333;
}

.aqs-chapter-selection select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
}

.aqs-btn-primary {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.aqs-btn-primary:hover:not(:disabled) {
    background: #1976D2;
}

.aqs-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.aqs-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    transition: background 0.3s;
}

.aqs-btn-secondary:hover {
    background: #545b62;
}

.aqs-success {
    color: #28a745;
    font-weight: bold;
}

.aqs-error {
    color: #dc3545;
    font-weight: bold;
}

/* Quiz Container */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.quiz-header h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.student-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.level-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.level-1 { background: #e8f5e8; color: #2e7d32; }
.level-2 { background: #e3f2fd; color: #1565c0; }
.level-3 { background: #fff3e0; color: #ef6c00; }
.level-4 { background: #fce4ec; color: #c2185b; }
.level-5 { background: #f3e5f5; color: #7b1fa2; }

.chapter-info, .scoring-info {
    font-size: 14px;
    opacity: 0.9;
}

/* Quiz Progress */
.quiz-progress {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

/* Question Card */
.question-card {
    padding: 30px;
}

.question-card h3 {
    margin-bottom: 25px;
    font-size: 20px;
    line-height: 1.5;
    color: #333;
}

.options {
    margin-bottom: 25px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    border-color: #2196F3;
    background: #f8f9fa;
}

.option.selected {
    border-color: #2196F3;
    background: #e3f2fd;
}

.option.correct {
    border-color: #4CAF50;
    background: #e8f5e8;
}

.option.incorrect {
    border-color: #f44336;
    background: #ffebee;
}

.option-letter {
    font-weight: bold;
    margin-right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

.option-text {
    flex: 1;
}

/* Quiz Controls */
.quiz-controls {
    text-align: center;
    margin-top: 20px;
}

/* Feedback */
.feedback {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

.feedback.correct {
    background: #e8f5e8;
    color: #2e7d32;
}

.feedback.incorrect {
    background: #ffebee;
    color: #c62828;
}

/* Results Screen */
.results-screen {
    padding: 40px 20px;
    text-align: center;
}

.results-card {
    max-width: 500px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.score-summary {
    margin: 20px 0;
}

.final-score {
    font-size: 24px;
    color: #2196F3;
    margin-bottom: 10px;
}

.correct-answers, .time-taken {
    font-size: 16px;
    margin-bottom: 8px;
    color: #666;
}

.level-projection {
    margin: 25px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.level-change {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.action-buttons {
    margin-top: 25px;
}

/* Loading and No Questions */
.quiz-loading, .no-questions {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-questions {
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px;
}

/* Login Required */
.aqs-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .student-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .question-card {
        padding: 20px 15px;
    }
    
    .option {
        padding: 12px;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .aqs-btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Animation for smooth transitions */
.option, .quiz-controls button {
    transition: all 0.3s ease;
}

.feedback {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}