/* General 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 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    color: #4a6bdf;
    margin-right: 10px;
}

.logo p {
    font-size: 16px;
    color: #666;
    font-style: italic;
}

/* Navigation Styles */
nav {
    background-color: #4a6bdf;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.3s;
}

.main-menu > li > a:hover {
    background-color: #3a5bcf;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4a6bdf;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #3a5bcf;
}

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

.btn-primary:hover {
    background-color: #218838;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    list-style: none;
}

.submenu li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.submenu li a:hover {
    background-color: #f1f1f1;
}

.submenu .submenu {
    top: 0;
    left: 100%;
}

/* Main Content Styles */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

/* Login/Register Box Styles */
.auth-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
}

.auth-box {
    flex: 1;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.auth-box h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.student-box {
    border-top: 5px solid #4a6bdf;
}

.teacher-box {
    border-top: 5px solid #28a745;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #4a6bdf;
    outline: none;
}

.form-row {
    display: flex;
    gap: 15px;
}

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

.password-toggle {
    position: relative;
}

.password-toggle i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.auth-links a {
    color: #4a6bdf;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

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

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

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #fff;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #34495e;
    color: #fff;
    text-align: center;
    line-height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #4a6bdf;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }
    
    .main-menu {
        flex-wrap: wrap;
    }
    
    .submenu .submenu {
        left: 0;
        top: 100%;
    }
}

@media (max-width: 768px) {
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .main-menu {
        flex-direction: column;
    }
    
    .main-menu > li {
        width: 100%;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
    }
    
    .dropdown:hover .submenu {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Custom Styles for Specific Pages */
.about-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.about-section h2 {
    color: #4a6bdf;
    margin-bottom: 15px;
}

.about-section p {
    margin-bottom: 15px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    min-width: 150px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #4a6bdf;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

/* Course Categories */
.course-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.course-category {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.course-category h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #4a6bdf;
}

.course-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-category ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.course-category ul li:last-child {
    border-bottom: none;
}

.course-category ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.course-category ul li a:hover {
    color: #4a6bdf;
}

/* Notes & Books Section */
.notes-books-container {
    text-align: center;
    padding: 60px 0;
}

.notes-books-container h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.notes-books-container p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.coming-soon {
    display: inline-block;
    padding: 15px 30px;
    background-color: #4a6bdf;
    color: #fff;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
}

/* Blogs Section */
.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 200px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.blog-content p {
    margin-bottom: 15px;
    color: #666;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
}

/* Admin Panel Styles */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 250px;
    background-color: #2c3e50;
    padding: 20px 0;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar ul li {
    margin-bottom: 5px;
}

.admin-sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background-color: #34495e;
}

.admin-content {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
}

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

.admin-title {
    font-size: 24px;
    color: #333;
}

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

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

.admin-table {
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

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

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

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table .status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.btn-view {
    background-color: #17a2b8;
}

.btn-view:hover {
    background-color: #138496;
}

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

.btn-approve:hover {
    background-color: #218838;
}

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

.btn-reject:hover {
    background-color: #c82333;
}

/* Captcha Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-question {
    padding: 10px 15px;
    background-color: #f1f1f1;
    border-radius: 5px;
    font-weight: 500;
}

.captcha-refresh {
    background: none;
    border: none;
    color: #4a6bdf;
    cursor: pointer;
    font-size: 18px;
}

.captcha-refresh:hover {
    color: #3a5bcf;
}

/* File Upload Styles */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.file-upload-label:hover {
    background-color: #e9ecef;
}

.file-upload-label i {
    margin-right: 8px;
}

/* Form Validation Styles */
.form-control.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
    color: #666;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #4a6bdf;
    animation: spin 1s ease infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Form Check Styles */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
}

.form-check-label {
    margin-bottom: 0;
}

/* Error Page Styles */
.error-container {
    text-align: center;
    padding: 60px 0;
}

.error-container h1 {
    font-size: 120px;
    color: #4a6bdf;
    margin: 0;
}

.error-container h2 {
    font-size: 36px;
    margin: 20px 0;
    color: #333;
}

.error-container p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}