/* ===== Grading System Styles ===== */

/* Quiz Container */
.quiz-section {
    margin: 30px 0;
    padding: 25px;
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
}
.quiz-section h3 {
    margin-top: 0;
    border: none;
}

/* Individual Question */
.quiz-question {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 10px;
    padding: 24px;
    margin: 20px 0;
    transition: border-color 0.3s;
}
.quiz-question.answered-correct {
    border-color: #22c55e;
    background: #f0fdf4;
}
.quiz-question.answered-wrong {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Question Number */
.quiz-question .q-number {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    font-size: 0.9em;
    margin-bottom: 12px;
}

/* Question Text */
.quiz-question .q-text {
    font-size: 1.05em;
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quiz-options label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.6;
}
.quiz-options label:hover {
    border-color: #667eea;
    background: #f5f3ff;
}
.quiz-options input[type="radio"] {
    margin-top: 4px;
    accent-color: #667eea;
    flex-shrink: 0;
}

/* Disabled state after answering */
.quiz-question.answered .quiz-options label {
    cursor: default;
    opacity: 0.8;
}
.quiz-question.answered .quiz-options label:hover {
    border-color: #e5e7eb;
    background: transparent;
}

/* Selected option styling */
.quiz-options label.selected-correct {
    border-color: #22c55e !important;
    background: #dcfce7 !important;
    opacity: 1 !important;
}
.quiz-options label.selected-wrong {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    opacity: 1 !important;
}
.quiz-options label.correct-answer {
    border-color: #22c55e !important;
    background: #dcfce7 !important;
    opacity: 1 !important;
}

/* Feedback */
.quiz-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.quiz-feedback.wrong {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Explanation (shown after answering) */
.quiz-explanation {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    border-radius: 4px;
    display: none;
    font-size: 0.95em;
    line-height: 1.7;
}
.quiz-explanation.show { display: block; }

/* ===== Score Summary ===== */
.quiz-summary {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    text-align: center;
    display: none;
}
.quiz-summary.show { display: block; }

.quiz-summary .score-display {
    font-size: 2.5em;
    font-weight: 800;
    color: #1a1a2e;
    margin: 10px 0;
}
.quiz-summary .score-display .score-correct { color: #22c55e; }
.quiz-summary .score-display .score-total { color: #64748b; }

/* Progress Bar */
.quiz-progress {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
}
.quiz-progress .progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    background: #22c55e;
}
.quiz-progress .progress-fill.low { background: #ef4444; }
.quiz-progress .progress-fill.mid { background: #f59e0b; }

.quiz-summary .score-label {
    color: #64748b;
    font-size: 0.95em;
}

/* Buttons */
.quiz-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.quiz-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.quiz-btn-reset {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #cbd5e1;
}
.quiz-btn-reset:hover { background: #e2e8f0; }
.quiz-btn-primary {
    background: #667eea;
    color: white;
}
.quiz-btn-primary:hover { background: #5a6fd6; transform: translateY(-1px); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .quiz-question { padding: 18px; }
    .quiz-options label { padding: 10px 12px; }
    .quiz-summary .score-display { font-size: 2em; }
}
