/* Course Title Section */
.course-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    gap: 20px;
}

.course-title {
    flex: 1;
    font-size: 24px;
    font-weight: 600;
    color: #222;
}

.course-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mark-done-btn {
    background: #22c55e;
    color: white;
}

.mark-done-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.quiz-btn {
    background: #7c5dfa;
    color: white;
}

.quiz-btn:hover {
    background: #6d4aed;
    transform: translateY(-1px);
}

.result-btn {
    background: #3b82f6;
    color: white;
}

.result-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.quiz-passed {
    background: #22c55e;
    color: white;
}

.quiz-passed:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.quiz-failed {
    background: #ef4444;
    color: white;
}

.quiz-failed:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Quiz Modal Styles */
.quiz-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.quiz-overlay.active {
    display: flex;
}

.quiz-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quiz Header */
.quiz-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.quiz-header h3 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-timer {
    background: #fee2e2;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.quiz-question-progress {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Question Container */
.quiz-question-container {
    padding: 24px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 24px;
    line-height: 1.6;
}

.question-options {
    space-y: 12px;
}

.option-item {
    display: block;
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.option-item:hover {
    border-color: #7c5dfa;
    background: #f3f4f6;
}

.option-item.selected {
    border-color: #7c5dfa;
    background: #ede7fe;
    color: #7c5dfa;
    font-weight: 500;
}

.option-item:focus {
    outline: none;
    border-color: #7c5dfa;
    box-shadow: 0 0 0 3px rgba(124, 93, 250, 0.1);
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    border-color: #7c5dfa;
    color: #7c5dfa;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.submit-btn {
    background: #7c5dfa;
    color: white;
    font-weight: 600;
}

.nav-btn.submit-btn:hover {
    background: #6d4aed;
    transform: translateY(-1px);
}

.question-indicators {
    display: flex;
    gap: 8px;
}

.question-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.2s ease;
}

.question-indicator.answered {
    background: #7c5dfa;
}

.question-indicator.current {
    background: #f59e0b;
    transform: scale(1.2);
}

/* Quiz Actions */
.quiz-actions {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.quiz-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-btn-primary {
    background: #7c5dfa;
    color: white;
}

.quiz-btn-primary:hover {
    background: #6d4aed;
    transform: translateY(-1px);
}

.quiz-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.quiz-btn-secondary:hover {
    background: #e5e7eb;
}

.quiz-btn-info {
    background: #17a2b8;
    color: white;
}

.quiz-btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* Quiz Result Modal */
.quiz-result-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.quiz-result-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.quiz-result-content {
    padding: 32px 24px;
}

.result-score {
    display: flex;
    align-items: center;
    gap: 32px;
    justify-content: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #7c5dfa, #a855f7);
    box-shadow: 0 8px 32px rgba(124, 93, 250, 0.3);
}

.result-details {
    text-align: left;
}

.result-details p {
    margin: 8px 0;
    font-size: 16px;
    color: #374151;
}

.result-details strong {
    color: #111827;
}

.quiz-result-actions {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Status Colors */
.status-passed {
    color: #059669 !important;
    font-weight: 600;
}

.status-failed {
    color: #dc2626 !important;
    font-weight: 600;
}

.score-circle.passed {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
}

.score-circle.failed {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.3);
}

/* Answer Review Modal */
.answer-review-content {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.answer-item {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.answer-item:last-child {
    margin-bottom: 0;
}

.answer-question {
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    font-size: 16px;
}

.answer-detail {
    margin-bottom: 8px;
    font-size: 14px;
}

.answer-detail strong {
    color: #374151;
}

.answer-correct {
    color: #059669;
}

.answer-incorrect {
    color: #dc2626;
}

.answer-not-answered {
    color: #6b7280;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .course-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .quiz-container {
        width: 95%;
        margin: 20px;
    }
    
    .result-score {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .result-details {
        text-align: center;
    }
}

/* Loading States */
.quiz-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.quiz-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #7c5dfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timer Warning */
.quiz-timer.warning {
    background: #fef3c7;
    color: #d97706;
    animation: pulse 1s infinite;
}

.quiz-timer.danger {
    background: #fecaca;
    color: #dc2626;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
} 