/* ===== Base Styles ===== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --gray-color: #95a5a6;
    --white: #ffffff;
    --black: #000000;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-color);
    color: var(--white);
    border: 2px solid var(--gray-color);
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}

.text-center {
    text-align: center;
}

/* ===== Login Page Styles ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

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

.login-header {
    margin-bottom: 30px;
    text-align: center;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.login-header h2 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 400;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fadbd8;
    color: var(--danger-color);
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

/* ===== Dashboard Styles ===== */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100%;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: var(--white);
    font-size: 1.3rem;
}

.sidebar-nav {
    margin-top: 20px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--light-color);
    transition: all 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav a i {
    margin-right: 10px;
}

.main-content {
    flex: 1;
    margin-left: 250px;
}

.topbar {
    background-color: var(--white);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-menu img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.content-area {
    padding: 20px;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* ===== Course Management Styles ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    margin-top: 30px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
        transition: all 0.3s;
    }
    .sidebar.active {
        width: 250px;
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-toggle {
        display: block;
    }
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}/* Course Creation Specific Styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Card Styles */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.card-header {
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0;
}

/* File Upload Styles */
.file-upload {
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    display: none;
    border-radius: 5px;
    border: 1px solid #eee;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-error {
    background-color: #fadbd8;
    color: #e74c3c;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #28a745;
    border: 1px solid #c3e6cb;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Course Card */
.course-card {
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.course-cover {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.course-card .card-body {
    padding: 15px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-published {
    background-color: #d4edda;
    color: #28a745;
}

.badge-draft {
    background-color: #fff3cd;
    color: #856404;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-success {
    background-color: #28a745;
}

.btn-danger {
    background-color: #dc3545;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-state i {
    color: #ddd;
    margin-bottom: 20px;
    font-size: 3rem;
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.ml-3 {
    margin-left: 1rem;
}

.text-muted {
    color: #6c757d;
}

/* Course Content Styles */
.content-list {
    margin-top: 20px;
}

.content-item {
    transition: all 0.3s ease;
}

.content-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.empty-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.course-description {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Course Cover Styles */
.course-cover-container {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.course-cover-image {
    max-width: 100%;
    height: auto;
    max-height: 300px; /* Adjust this value as needed */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* For smaller screens */
@media (max-width: 768px) {
    .course-cover-image {
        max-height: 200px;
    }
}







//////////////////////////////////////
/* Add Content Page Specific Styles */
.content-creation-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* Content Type Tabs */
.content-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.content-type-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 6px;
    background: #f5f7fa;
    border: 1px solid #e1e5eb;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.content-type-tab:hover {
    background: #ebf0f7;
}

.content-type-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Content Type Forms */
.content-type-form {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.content-type-form.active {
    display: block;
}

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

/* Form Elements */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* File Upload Styles */
.file-upload-wrapper {
    margin-bottom: 20px;
}

.file-upload-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.file-upload-box {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fafc;
}

.file-upload-box:hover {
    border-color: #3498db;
    background: #f0f7ff;
}

.file-upload-input {
    display: none;
}

.file-upload-icon {
    font-size: 2rem;
    color: #718096;
    margin-bottom: 10px;
}

.file-upload-text {
    color: #4a5568;
    margin-bottom: 5px;
}

.file-upload-hint {
    color: #718096;
    font-size: 0.875rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .content-type-tabs {
        flex-direction: column;
    }
    
    .content-type-tab {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

////////////////////
/* Subtopic Styles */
.subtopic-item {
    border-left: 3px solid #3498db;
    transition: all 0.3s ease;
}

.subtopic-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-subtopic {
    transition: all 0.2s ease;
}

.remove-subtopic:hover {
    transform: scale(1.1);
}

.file-upload-box {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-box:hover {
    border-color: #3498db;
    background: #f8faff;
}

.file-upload-icon {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.file-upload-text {
    font-weight: 500;
}

.d-none {
    display: none !important;
}


.file-upload-container {
    /* Your existing styles */
    transition: all 0.3s ease;
}

.file-upload-container.has-file {
    border-color: #28a745 !important;
    background-color: #e8f5e9 !important;
}

.file-upload-text {
    /* Your existing styles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.file-upload-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

<style>
        /* Error/Success Messages */
        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid transparent;
            border-radius: 4px;
        }
        .alert-error {
            color: #a94442;
            background-color: #f2dede;
            border-color: #ebccd1;
        }
        .alert-success {
            color: #3c763d;
            background-color: #dff0d8;
            border-color: #d6e9c6;
        }
        
        /* Form Styles */
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        input[type="text"],
        input[type="number"],
        textarea,
        select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        textarea {
            min-height: 100px;
        }
        
        /* File Upload */
        .file-upload-container {
            border: 2px dashed #ddd;
            padding: 20px;
            text-align: center;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .file-upload-container:hover {
            border-color: #3498db;
            background-color: #f8f9fa;
        }
        .file-upload-icon {
            font-size: 24px;
            color: #666;
            margin-bottom: 10px;
        }
        
        /* Buttons */
        .btn {
            display: inline-block;
            padding: 10px 15px;
            border-radius: 4px;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .btn-primary {
            background-color: #3498db;
            color: white;
            border: none;
        }
        .btn-primary:hover {
            background-color: #2980b9;
        }
        .btn-secondary {
            background-color: #95a5a6;
            color: white;
            border: none;
        }
        .btn-secondary:hover {
            background-color: #7f8c8d;
        }
        
        /* Subtopic Styles */
        .subtopic-item {
            border: 1px solid #ddd;
            padding: 15px;
            margin-bottom: 15px;
            border-radius: 4px;
            background-color: #f8f9fa;
            position: relative;
        }
        .remove-subtopic {
            position: absolute;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            font-size: 1.2rem;
        }
        .subtopic-fields {
            display: none;
        }
        .subtopic-fields.active {
            display: block;
        }
      .course-card {
            transition: all 0.3s ease;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 20px;
        }
        .course-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .course-cover {
            height: 160px;
            background-size: cover;
            background-position: center;
            background-color: #f0f0f0;
        }
        .badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }
        .badge-published {
            background-color: #d4edda;
            color: #28a745;
        }
        .badge-premium {
            background-color: #e6e6fa;
            color: #9370db;
        }
        .empty-state {
            text-align: center;
            padding: 40px;
            background: #f8f9fa;
            border-radius: 8px;
        }
        .header {
            background: #2c3e50;
            color: white;
            padding: 20px 0;
            margin-bottom: 30px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }
        .courses-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }
        .nav-link {
            color: white !important;
        }
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        /* Intro section styles */
        .intro-section {
            background: linear-gradient(135deg, #3498db, #2c3e50);
            color: white;
            padding: 60px 0;
            margin-bottom: 40px;
            border-radius: 8px;
        }
        .intro-content {
            max-width: 800px;
            margin: 0 auto;
            text-align: center;
        }
        /* Blog section styles */
        .blog-section {
            margin: 60px 0;
            padding: 40px 0;
            background: #f8f9fa;
            border-radius: 8px;
        }
        .blog-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            margin-bottom: 20px;
        }
        .blog-card:hover {
            transform: translateY(-5px);
        }
        .blog-image {
            height: 200px;
            background-size: cover;
            background-position: center;
        }
        .blog-content {
            padding: 20px;
        }
        /* Modal styles */
        /* Add these styles to your existing CSS */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto; /* Enable scrolling for the entire modal if needed */
}

.auth-content {
    background-color: #fefefe;
    margin: 5% auto; /* Reduced from 10% to give more space */
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    max-height: 90vh; /* Limit height to viewport */
    overflow-y: auto; /* Enable vertical scrolling if content overflows */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Adjust tab content height and scrolling */
.tab-content {
    padding: 20px 0;
    max-height: 60vh; /* Limit height of the form area */
    overflow-y: auto; /* Enable scrolling for the form */
}

/* Make form elements fit better */
.auth-content .form-control,
.auth-content .form-select {
    margin-bottom: 15px;
}

/* Adjust tab buttons */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    flex: 1;
    text-align: center;
}

.tab-button.active {
    color: #2c3e50;
    border-bottom: 3px solid #2c3e50;
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .auth-content {
        margin: 2% auto;
        max-height: 96vh;
    }
    
    .tab-content {
        max-height: 80vh;
    }
}
        .course-progress {
            height: 5px;
            background-color: #e9ecef;
            border-radius: 3px;
            margin-top: 10px;
        }
        .progress-bar {
            height: 100%;
            border-radius: 3px;
            background-color: #28a745;
        }