* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gray-color: #95a5a6;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: #f5f7fb;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: translateY(-3px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px);
    padding: 30px 0;
}

.page {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Home Page */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature-card {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Course/Product Page */
.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.course-filter {
    display: flex;
    gap: 15px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: white;
    border: 1px solid var(--gray-color);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.course-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 180px;
    background-color: var(--gray-color);
    background-size: cover;
    background-position: center;
}

.course-content {
    padding: 20px;
}

.course-category {
    display: inline-block;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.course-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.course-description {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Subject Page */
.subject-header {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.subject-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.subject-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.chapters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chapter-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.chapter-card:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Authentication Page */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-box {
    background-color: white;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Dashboard Pages */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dashboard-card-icon.blue {
    background-color: var(--primary-color);
}

.dashboard-card-icon.green {
    background-color: var(--success-color);
}

.dashboard-card-icon.orange {
    background-color: var(--warning-color);
}

.dashboard-card-icon.red {
    background-color: var(--danger-color);
}

.dashboard-table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Video Learning Page */
.video-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.video-player {
    flex: 1;
    min-width: 300px;
}

.video-player video {
    width: 100%;
    border-radius: var(--border-radius);
    background-color: black;
}

.video-playlist {
    flex: 0 0 350px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    max-height: 600px;
    overflow-y: auto;
}

.playlist-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
}

.playlist-item:hover {
    background-color: #f8f9fa;
}

.playlist-item.active {
    background-color: rgba(67, 97, 238, 0.1);
    border-left: 4px solid var(--primary-color);
}

/* Admin Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Additional Styles */
.enrollment-form {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 20px;
    display: none;
}

.enrollment-form.active {
    display: block;
}

.progress-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.5s ease;
}

.admin-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.course-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.course-actions .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
}

.alert.active {
    display: block;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    border-left: 4px solid #3498db;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 10px 0;
    width: 200px;
    display: none;
    z-index: 100;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.logout-btn {
    color: var(--danger-color);
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: none;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid #eee;
}

.mobile-nav-links a.active {
    color: var(--primary-color);
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .courses-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .course-filter {
        flex-wrap: wrap;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-30 {
    margin-top: 30px;
}