/* Modern Learning Platform Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background) 0%, #e0e7ff 100%);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem;
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.hero-section h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.course-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.course-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.course-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.course-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Course Content Styles */
section h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    position: relative;
}

section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

section h4::before {
    content: '📚';
    font-size: 1rem;
}

section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

code {
    background: #f1f5f9;
    color: var(--primary-color);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
}

/* Quiz Styles */
.course-quiz {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.quiz-options {
    margin: 1rem 0 2rem 0;
    display: grid;
    gap: 0.75rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quiz-options label:hover {
    border-color: var(--primary-color);
    background: #fefbff;
}

.quiz-options input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

.check-answers-btn {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    font-size: 1rem;
}

.check-answers-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.quiz-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
}

.quiz-result.correct {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #34d399;
}

.quiz-result.incorrect {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Quiz Page Styles */
#quiz-container {
    background: var(--surface);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
    max-width: 700px;
}

#quiz-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

#question-container p {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.option-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: #fefbff;
    transform: translateX(5px);
}

.option-btn.correct {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: var(--success-color);
    color: #065f46;
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: var(--error-color);
    color: #991b1b;
}

#next-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    font-size: 1rem;
    margin: 2rem auto;
    display: block;
}

#next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

#result {
    text-align: center;
    padding: 2rem;
}

#score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

#restart-btn {
    background: linear-gradient(135deg, var(--secondary-color), #0891b2);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
    font-size: 1rem;
}

#restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}

#quiz-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    max-width: 800px;
}

.quiz-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--surface), #f8fafc);
    border: 2px solid var(--border);
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    color: var(--text-primary);
}

.quiz-select-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.quiz-select-btn::before {
    content: '🎯';
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 2rem 1rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    #quiz-container {
        padding: 2rem 1rem;
    }

    .quiz-select-btn {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card, .stat-card, .quiz-select-btn {
    animation: fadeIn 0.6s ease-out;
}