/* Dark theme */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --primary-color: #667eea;
}

body {
    background-color: var(--bg-color, #f8f9fa);
    color: var(--text-color, #333);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.semester-card,
.download-card,
.video-card {
    background: var(--card-bg, white);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(44,62,80,0.12);
}
/* Stylish Search Bar Styles */
.search-bar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    padding: 1rem 2rem;
    border-radius: 32px;
    max-width: 600px;
    margin: 1.5rem auto 2rem auto;
    position: relative;
}
.search-bar-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 1px solid #3498db;
    border-radius: 24px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-bar-input:focus {
    border-color: #764ba2;
}
.search-bar-btn {
    background: linear-gradient(135deg, #3498db 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44,62,80,0.12);
    transition: background 0.2s;
}
.search-bar-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #3498db 100%);
}
.search-bar-results {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.search-bar-result-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}
.search-bar-result-item:last-child {
    border-bottom: none;
}
.search-bar-result-item:hover {
    background: #f4f8fb;
}
/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
    display: none;
}
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}
/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        height: 100vh;
        background: #2c3e50;
        transition: left 0.3s ease;
        padding-top: 4rem;
    }
    .nav-menu.active {
        left: 0;
    }
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    .btn, .btn-download {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 48px;
        min-width: 120px;
    }
    .video-wrapper {
        padding-bottom: 75%;
    }
    .semester-grid,
    .download-grid,
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Improved mobile forms */
input[type="text"], 
input[type="date"], 
select {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}
/* Progress Tracker Styles */
.progress-tracker {
    background: #f4f8fb;
    border: 1px solid #d1e3f0;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    max-width: 400px;
}
.progress-bar-container {
    background: #e0e0e0;
    border-radius: 20px;
    height: 20px;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
}
.progress-bar {
    background: #3498db;
    height: 100%;
    width: 0%;
    border-radius: 20px;
    transition: width 0.3s;
}
.topic-checklist label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}
/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navigation */
.navbar {
    background: #2c3e50;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

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

.stat {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stat i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.stat h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Semesters Section */
.semesters {
    padding: 4rem 0;
    background: #f8f9fa;
}

.semesters h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

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

.semester-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.semester-card:hover {
    transform: translateY(-5px);
}

.semester-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.semester-card ul {
    list-style: none;
    margin-bottom: 2rem;
}

.semester-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.semester-card li:last-child {
    border-bottom: none;
}

.semester-card a {
    color: #2c3e50;
    text-decoration: none;
}

.semester-card a:hover {
    color: #667eea;
}

/* Buttons */
.btn, .btn-download {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover, .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Downloads Section */
.downloads {
    padding: 4rem 0;
    background: white;
}

.downloads h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.download-card {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.download-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.download-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Videos Section */
.videos {
    padding: 4rem 0;
    background: #f8f9fa;
}

.videos h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.videos > .container > p {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    color: #666;
}

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

.video-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-wrapper {
        padding-bottom: 75%; /* Adjust for mobile */
    }
}
