/* Course-Specific Styles */

/* Course container */
.course-content {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
}

/* Main course container */
.course-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Course header */
.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Course navigation */
.course-navigation {
    background: #f8fafc;
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-navigation .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.course-navigation .btn-primary {
    background: #667eea;
    color: white;
    border: none;
}

.course-navigation .btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.course-navigation .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
}

.course-navigation .btn-secondary:hover {
    background: #cbd5e0;
}

/* Course sections */
.course-section {
    padding: 3rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.course-section:last-child {
    border-bottom: none;
}

.course-section h2 {
    color: #2d3748;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.course-section h2::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 4px;
    height: 1.5rem;
    background: #667eea;
    border-radius: 2px;
}

.course-section h3 {
    color: #4a5568;
    font-size: 1.25rem;
    font-weight: 500;
    margin: 1.5rem 0 1rem 0;
}

.course-section p {
    color: #718096;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.course-section ul,
.course-section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.course-section li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.course-section li:last-child {
    margin-bottom: 0;
}

/* Slide-based courses */
.slide {
    min-height: 100vh;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    display: flex;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide container */
.slide-container {
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Slide content */
.slide-content {
    padding: 3rem 2rem;
}

.slide-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.slide-subtitle {
    font-size: 1.125rem;
    color: #718096;
    text-align: center;
    margin-bottom: 2rem;
}

/* Slide navigation */
.slide-navigation {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slide-counter {
    font-weight: 600;
    color: #4a5568;
}

.slide-indicators {
    display: flex;
    gap: 0.5rem;
}

.slide-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slide-indicator.active {
    background: #667eea;
    transform: scale(1.2);
}

.slide-indicator:hover {
    background: #a0aec0;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Quiz styles */
.quiz-question {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.quiz-question h4 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.quiz-option.selected {
    background: #ebf8ff;
    border-color: #667eea;
}

.quiz-option input[type="radio"] {
    margin-right: 0.75rem;
}

.quiz-submit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.quiz-submit-btn:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-1px);
}

.quiz-submit-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* Interactive elements */
.interactive-element {
    transition: all 0.3s ease;
}

.interactive-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Completion button */
.completion-section {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.completion-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.mark-complete-btn {
    background: white;
    color: #f5576c;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mark-complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Certificate styles */
.certificate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 16px;
    margin: 2rem 0;
}

.certificate h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.certificate p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.download-cert-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-cert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .course-header {
        padding: 2rem 1rem;
    }

    .course-title {
        font-size: 2rem;
    }

    .course-section {
        padding: 2rem 1rem;
    }

    .course-navigation {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .slide-content {
        padding: 2rem 1rem;
    }

    .slide-navigation {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
}

/* ================================
   DARK MODE STYLES
   ================================ */

/* Base slide dark mode */
.dark-mode .slide {
    background-color: #0f172a;
}

/* Container and card dark mode */
.dark-mode .container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
}

.dark-mode .card,
.dark-mode .icon-card {
    background: linear-gradient(135deg, #334155, #1e293b);
    border-color: #475569;
    color: #f8fafc;
}

/* Text dark mode */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode p,
.dark-mode span,
.dark-mode li {
    color: #f8fafc;
}

/* Quiz options dark mode */
.dark-mode .quiz-option {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

.dark-mode .quiz-option:hover {
    background: linear-gradient(135deg, #475569, #334155) !important;
    border-color: #60a5fa !important;
}

.dark-mode .quiz-option.selected {
    background-color: #3b82f6 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

.dark-mode .quiz-option.correct {
    background-color: #166534 !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

.dark-mode .quiz-option.incorrect {
    background-color: #991b1b !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.dark-mode .quiz-option span,
.dark-mode .quiz-option .option-text,
.dark-mode .quiz-option .option-letter {
    color: inherit !important;
}

/* Highlight boxes dark mode */
.dark-mode .highlight-box {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    border-left-color: #f87171 !important;
    color: #f8fafc !important;
}

.dark-mode .highlight-box h4,
.dark-mode .highlight-box p,
.dark-mode .highlight-box span,
.dark-mode .highlight-box strong {
    color: #f8fafc !important;
}

/* Question box dark mode */
.dark-mode .question-box {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

/* Quiz explanation dark mode */
.dark-mode .quiz-explanation {
    background: #334155 !important;
    color: #f8fafc !important;
}

/* Author box dark mode */
.dark-mode .author-box {
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
}

.dark-mode .author-box a {
    color: #38bdf8;
}

/* ================================
   GLOBAL QUIZ OPTION IMPROVEMENTS
   ================================ */

/* Add gap between option letter and text */
.quiz-option {
    gap: 0.75rem;
}

/* Style option letter properly */
.option-letter {
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #4b5563;
    flex-shrink: 0;
}

.dark-mode .option-letter {
    background: #475569;
    color: #f8fafc;
}

/* ================================
   TAILWIND COLOR CLASSES DARK MODE
   ================================ */

.dark-mode .bg-blue-50,
.dark-mode .bg-green-50,
.dark-mode .bg-yellow-50,
.dark-mode .bg-red-50,
.dark-mode .bg-orange-50,
.dark-mode .bg-purple-50,
.dark-mode .bg-pink-50,
.dark-mode .bg-teal-50,
.dark-mode .bg-indigo-50,
.dark-mode .bg-gray-50 {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
}

.dark-mode .bg-gray-100 {
    background: #334155 !important;
}

.dark-mode .text-blue-800,
.dark-mode .text-green-800,
.dark-mode .text-yellow-800,
.dark-mode .text-red-800,
.dark-mode .text-blue-600,
.dark-mode .text-green-600,
.dark-mode .text-green-700,
.dark-mode .text-yellow-600 {
    color: #f8fafc !important;
}

.dark-mode .text-gray-500,
.dark-mode .text-gray-600,
.dark-mode .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark-mode .border-blue-100,
.dark-mode .border-green-100,
.dark-mode .border-blue-200,
.dark-mode .border-green-200 {
    border-color: #475569 !important;
}

/* ================================
   THEME TOGGLE BUTTON
   ================================ */

.theme-toggle-btn {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: #0f172a;
    color: #f8fafc;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1002;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* Mobile Optimization for Dynamic Floating Buttons */
@media (max-width: 768px) {
    .dynamic-float-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }
}