/* Quiz-specific styles */
.quiz-option {
    padding: 12px 16px;
    margin: 6px 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    font-size: 0.95em;
}
.quiz-option:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}
.quiz-option.selected {
    border-color: #3b82f6;
    background: #dbeafe;
    border-width: 2px;
}
.quiz-option.correct {
    border-color: #10b981;
    background: #d1fae5;
}
.quiz-option.wrong {
    border-color: #ef4444;
    background: #fee2e2;
}
.feedback {
    font-size: 0.9em;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
}
.feedback.hidden { display: none; }
.feedback.text-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}
.feedback.text-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}
.feedback.text-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Unit Navigation Tabs */
.unit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}
.unit-tab {
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #475569;
}
.unit-tab:hover {
    border-color: #3b82f6;
    color: #1e3a8a;
    background: #f0f9ff;
}
.unit-tab.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}
.unit-tab.completed {
    border-color: #10b981;
    color: #065f46;
}
.unit-tab.completed::after {
    content: " ✓";
}

/* Unit sections */
.unit-section {
    display: none;
    scroll-margin-top: 20px;
}
.unit-section.active {
    display: block;
}
.unit-header {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.unit-header h3 {
    margin: 0;
    font-size: 1.2em;
}
.unit-header .unit-meta {
    font-size: 0.85em;
    opacity: 0.85;
    margin-top: 4px;
}

/* Quiz progress bar */
.quiz-progress {
    background: #e2e8f0;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}
.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
}

/* Score display */
.score-display {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}
.score-display .score-number {
    font-size: 2.5em;
    font-weight: 800;
    color: #1e3a8a;
}
.score-display .score-label {
    font-size: 1.1em;
    color: #64748b;
}
.score-display .score-message {
    margin-top: 10px;
    font-size: 1em;
}

/* Unit nav buttons */
.unit-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}
.unit-nav-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95em;
}
.unit-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.unit-nav-btn.prev {
    background: #e2e8f0;
    color: #475569;
}
.unit-nav-btn.prev:hover:not(:disabled) {
    background: #cbd5e1;
}
.unit-nav-btn.next {
    background: #1e3a8a;
    color: white;
}
.unit-nav-btn.next:hover:not(:disabled) {
    background: #1e40af;
}
.unit-nav-btn.check-unit {
    background: #10b981;
    color: white;
}
.unit-nav-btn.check-unit:hover {
    background: #059669;
}

/* Quiz question styling */
.quiz-question {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.quiz-question h4 {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #1e293b;
    line-height: 1.5;
}
.quiz-question .q-number {
    display: inline-block;
    background: #1e3a8a;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-size: 0.8em;
    font-weight: 700;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 640px) {
    .unit-tabs {
        gap: 4px;
    }
    .unit-tab {
        font-size: 0.78em;
        padding: 6px 10px;
    }
    .quiz-question {
        padding: 14px;
    }
}
