/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cinzel", serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5deb3 0%, #f4e4c1 100%);
    min-height: 100vh;
    overflow-y: auto;
}

/* Dark mode body background */
body.dark-mode {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
}

/* Ensure scrolling works on register page */
html,
body {
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden;
}

body.register-page {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    position: relative;
}

/* Logo and Typography */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.site-logo {
    font-family: "Cinzel Decorative", serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.section-title {
    font-family: "Cinzel Decorative", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #243a6b;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f5deb3);
    border-radius: 2px;
}

.subsection-title {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #243a6b;
    margin-bottom: 1.5rem;
}

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

.login-page {
    /* background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 50%, #f5deb3 100%);  */
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    position: relative;
}

[dir="rtl"] .login-form {
    text-align: right;
}

[dir="rtl"] .switchers-container {
    flex-direction: row-reverse;
}

.login-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.05) 0%,
            transparent 50%
        );
    background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px;
    background-position: 0 0, 100px 100px, 200px 200px, 300px 300px;
    /* animation: backgroundFloat 20s ease-in-out infinite; */
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Specific fix for register page scrolling */
body.register-page .login-page {
    height: auto;
    overflow-y: auto;
    min-height: auto;
    display: block;
}

body.register-page .login-container {
    max-height: none;
    overflow: visible;
    margin: 2rem auto;
}

/* Register page specific styles - ensure it's scrollable */
body:has(.register-form) .login-page {
    height: auto;
    overflow-y: auto;
    display: block;
}

body:has(.register-form) .login-container {
    margin: 2rem auto;
    max-height: none;
    overflow: visible;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    border: 3px solid #d4af37;
}

[dir="rtl"] .login-form {
    text-align: right;
}

body.dark-mode .login-container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #d4af37, #f5deb3, #243a6b);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.login-header {
    margin-bottom: 2rem;
}

.tagline {
    color: #243a6b;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #243a6b;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #f5deb3;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

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

.register-link {
    color: #243a6b;
    text-decoration: none;
    font-weight: 600;
}

.register-link:hover,
.terms-link:hover {
    color: #d4af37;
}

/* Checkbox and Terms Styles */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    transform: scale(1.2);
}

.terms-link {
    color: #243a6b;
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Register form specific styles */
.register-form .form-group {
    margin-bottom: 1.2rem;
}

.register-form .form-group:last-child {
    margin-bottom: 1.5rem;
}

/* Add extra padding for register form */
.register-form {
    padding-bottom: 3rem;
}

/* Ensure register form is properly spaced */
body.register-page .register-form {
    margin-bottom: 2rem;
    padding-bottom: 4rem;
}

/* Register form styles */
.register-form {
    /* Form will scroll with the page */
    margin-bottom: 2rem;
    height: auto;
    overflow: visible;
    max-height: none;
}

/* Ensure the page is scrollable */
html,
body {
    height: 100%;
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    padding: 2rem 0;
    overflow-y: auto;
}

/* Specific fix for register page */
.register-page .login-page,
body:has(.register-form) .login-page {
    height: auto;
    overflow-y: auto;
    min-height: auto;
}

.register-page .login-container,
body:has(.register-form) .login-container {
    max-height: none;
    overflow: visible;
    margin: 2rem auto;
}

/* Enhanced select styling */
.form-group select {
    cursor: pointer;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23d4af37" d="M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Switchers Container */

[dir="rtl"] .switchers-container {
    flex-direction: row-reverse;
}

.switchers-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}

.theme-switcher,
.language-switcher {
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #f5deb3;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.theme-switcher:hover,
.language-switcher:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.theme-icon {
    font-size: 1.2rem;
}

.language-text {
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
}

body.dark-mode .login-container {
    background: rgb(0 0 0 / 95%);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    z-index: 2;
    border: 3px solid #d4af37;
}

body.dark-mode .tagline {
    color: #ffffff;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

body.dark-mode .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e9ce8e;
    font-weight: 600;
}

body.dark-mode .form-group select {
    background: rgba(0, 0, 0, 0.9);
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .terms-link {
    color: #e9ce8e;
}

body.dark-mode .checkbox-label {
    color: #f5deb3;
}

/* Dark mode for chat page */
body.dark-mode .chat-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-mode .chat-messages,
body.dark-mode .chat-input-container,
body.dark-mode .sidebar-section {
    background: rgba(0, 0, 0, 0.9);
    border-color: #d4af37;
    color: #f5deb3;
}

body.dark-mode .chat-messages {
    background: rgba(0, 0, 0, 0.9);
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .system-message {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    color: #e9ce8e;
}

body.dark-mode #messageInput {
    background: rgba(0, 0, 0, 0.9);
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .chat-message.received {
    background: rgba(212, 175, 55, 0.2);
    color: #e9ce8e;
}

/* Dark mode for new message structure */
body.dark-mode .message-content {
    background: rgba(0, 0, 0, 0.8);
    color: #f5deb3;
    border-color: rgba(212, 175, 55, 0.4);
}

body.dark-mode .user-message .message-content {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
}

body.dark-mode .other-message .message-content {
    background: rgba(212, 175, 55, 0.2);
    color: #f5deb3;
    border-color: rgba(212, 175, 55, 0.4);
}

body.dark-mode .system-message .message-content {
    background: rgba(212, 175, 55, 0.15);
    color: #e9ce8e;
    border-color: rgba(212, 175, 55, 0.3);
}

body.dark-mode .message-author {
    color: inherit;
}

body.dark-mode .message-time {
    color: rgba(245, 222, 179, 0.7);
}

body.dark-mode .student-name {
    color: #f5deb3;
}

body.dark-mode .student-status {
    color: #4caf50;
}

body.dark-mode .online-student {
    background: rgba(212, 175, 55, 0.2);
    color: #f5deb3;
}

body.dark-mode .chat-rules li {
    color: #e9ce8e;
    border-color: rgba(212, 175, 55, 0.3);
}

body.dark-mode .sidebar-section h3 {
    color: #e9ce8e;
}

body.dark-mode .register-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

body.dark-mode.login-page {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
    position: relative;
    overflow: hidden;
}

/* Dark Mode Styles */

body.dark-mode .main-header {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

body.dark-mode .hero-section {
    /* darker, cool-toned background that keeps contrast for gold accents */
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
    /* keep any decorative patterns visible but subdued */
    position: relative;
    overflow: hidden;
}

body.dark-mode .hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 18, 0.5);
    pointer-events: none;
}

/* Titles */
body.dark-mode .hero-title {
    color: #f5f7fb;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.dark-mode .hero-subtitle {
    color: #c9d6ea;
    opacity: 0.95;
}

/* Buttons in hero */
body.dark-mode .hero-buttons .btn {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(2, 6, 12, 0.6);
}

body.dark-mode .btn.primary {
    background: linear-gradient(90deg, #d4af37 0%, #b8892f 100%);
    color: #091018;
    /* dark text keeps gold readable */
}

body.dark-mode .btn.primary:hover {
    filter: brightness(0.95);
}

body.dark-mode .btn.secondary {
    background-color: rgba(255, 255, 255, 0.04);
    color: #dbe9fb;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

/* Decorative patterns inside hero (subdue contrast in dark) */
body.dark-mode .hero-decoration .ancient-symbol,
body.dark-mode .egyptian-patterns .pattern-1,
body.dark-mode .egyptian-patterns .pattern-2,
body.dark-mode .egyptian-patterns .pattern-3 {
    opacity: 0.5;
    filter: saturate(0.9) brightness(0.9);
}

/* Hero image adjustments */
body.dark-mode .egyptian-image {
    filter: contrast(0.95) saturate(0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* ensure buttons remain accessible on small screens in dark mode */
@media (max-width: 480px) {
    body.dark-mode .hero-buttons .btn {
        width: 100%;
        display: block;
        margin-bottom: 0.75rem;
    }
}

body.dark-mode .courses-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #243a6b 100%);
}

body.dark-mode .courses-section::before {
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.2) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.15) 0%,
            transparent 50%
        );
}

body.dark-mode .courses-section::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="8" fill="rgba(212, 175, 55, 0.08)" font-family="serif">☥</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="6" fill="rgba(36, 58, 107, 0.06)" font-family="serif">𓃭</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="10" fill="rgba(212, 175, 55, 0.05)" font-family="serif">𓂀</text></svg>');
}

body.dark-mode .teachers-section {
    background: #1a1a1a;
}

body.dark-mode .course-card {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 36, 0.95),
        rgba(15, 23, 36, 0.85)
    );
    border-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .teacher-card,
body.dark-mode .profile-card,
body.dark-mode .enrolled-course-card,
body.dark-mode .stat-card {
    background: #3a3a3a;
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .course-content h3,
body.dark-mode .teacher-info h3,
body.dark-mode .enrolled-course-card h4,
body.dark-mode .stat-label,
body.dark-mode .section-title {
    color: #d4af37;
}

body.dark-mode .course-content p,
body.dark-mode .teacher-info p,
body.dark-mode .enrolled-course-card p {
    color: #cccccc;
}

body.dark-mode .course-btn {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

body.dark-mode .course-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

body.dark-mode .course-content h3 {
    color: #f5deb3;
}

body.dark-mode .course-price {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

body.dark-mode .course-content p {
    color: #b8c5d6;
}

body.dark-mode .course-card::after {
    color: #f5deb3;
}

/* Courses Page Background */
.courses-page {
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 100%);
    position: relative;
}

.courses-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="12" fill="rgba(212, 175, 55, 0.03)" font-family="serif">☥</text></svg>');
    background-size: 300px 300px;
    background-position: 0 0;
    animation: pageBackgroundFloat 40s linear infinite;
    pointer-events: none;
    z-index: -1;
}

body.dark-mode .courses-page {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
    position: relative;
}

body.dark-mode .courses-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="12" fill="rgba(212, 175, 55, 0.02)" font-family="serif">☥</text></svg>');
    background-size: 300px 300px;
    background-position: 0 0;
    animation: pageBackgroundFloat 40s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pageBackgroundFloat {
    0% {
        transform: translateX(0px) translateY(0px);
    }

    50% {
        transform: translateX(50px) translateY(-30px);
    }

    100% {
        transform: translateX(0px) translateY(0px);
    }
}

body.dark-mode .courses-page .main-header {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

body.dark-mode .detail-group {
    background: #3a3a3a;
    color: #f5deb3;
}

body.dark-mode .detail-group label {
    color: #d4af37;
}

body.dark-mode .detail-group span {
    color: #f5deb3;
}

body.dark-mode .edit-input {
    background: #2d2d2d;
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .egyptian-wisdom-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

body.dark-mode .wisdom-text p {
    color: #f5deb3;
}

body.dark-mode .egyptian-heritage-section {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

body.dark-mode .heritage-item {
    background: rgba(58, 58, 58, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .heritage-item:hover {
    background: rgba(58, 58, 58, 0.5);
}

body.dark-mode .main-footer {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

/* Dark mode theme switcher icon */
body.dark-mode .theme-icon {
    content: "☀️";
}

/* Dark mode for mobile sidebar */
body.dark-mode .mobile-sidebar {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

body.dark-mode .sidebar-header {
    border-bottom-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .close-sidebar span {
    background: #f5deb3;
}

body.dark-mode .sidebar-nav a {
    color: #f5deb3;
}

body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
    background: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    border-left-color: #d4af37;
}

body.dark-mode .sidebar-nav .logout-btn {
    background: rgba(220, 53, 69, 0.3);
    border-left-color: rgba(220, 53, 69, 0.5);
}

body.dark-mode .sidebar-nav .logout-btn:hover {
    background: rgba(220, 53, 69, 0.4);
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

body.dark-mode .sidebar-switchers {
    border-top-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .hamburger-menu span {
    background: #f5deb3;
}

body.dark-mode .hamburger-menu.active span {
    background: #d4af37;
}

/* Arabic font support */
[dir="rtl"] body {
    font-family: "Noto Sans Arabic", "Cinzel", serif;
}

[dir="rtl"] .site-logo,
[dir="rtl"] .section-title,
[dir="rtl"] .subsection-title {
    font-family: "Noto Sans Arabic", "Cinzel Decorative", serif;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

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

.main-nav a:hover,
.main-nav a.active {
    /* background: rgba(212, 175, 55, 0.2); */
    color: #d4af37;
}

.main-nav a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.main-nav a:hover::before,
.main-nav a.active::before {
    width: 80%;
}

.logout-btn {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b6b !important;
}

/* Mobile Sidebar Styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: #d4af37;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    z-index: 1002;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.close-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    width: 30px;
    height: 30px;
}

.close-sidebar span {
    position: absolute;
    width: 20px;
    height: 2px;
    background: #d4af37;
    top: 50%;
    left: 50%;
    transition: 0.3s;
}

.close-sidebar span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-sidebar span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sidebar-nav {
    flex: 1;
    padding: 2rem 0;
}

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

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    border-left-color: #d4af37;
}

.sidebar-nav .logout-btn {
    background: rgba(220, 53, 69, 0.2);
    border-left-color: rgba(220, 53, 69, 0.3);
}

.sidebar-nav .logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

.sidebar-switchers {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero-section {
    height: 580px;
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.egyptian-patterns {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.pattern-1 {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23d4af37" stroke-width="2" opacity="0.3"/><path d="M30,50 L70,50 M50,30 L50,70" stroke="%23d4af37" stroke-width="2" opacity="0.3"/></svg>');
    animation: float 6s ease-in-out infinite;
}

.pattern-2 {
    position: absolute;
    top: 60%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,20 80,80 20,80" fill="none" stroke="%23f5deb3" stroke-width="2" opacity="0.3"/><circle cx="50" cy="50" r="15" fill="%23f5deb3" opacity="0.3"/></svg>');
    animation: float 8s ease-in-out infinite reverse;
}

.pattern-3 {
    position: absolute;
    bottom: 20%;
    left: 20%;
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="20" width="60" height="60" fill="none" stroke="%23d4af37" stroke-width="2" opacity="0.3"/><circle cx="50" cy="50" r="25" fill="%23d4af37" opacity="0.2"/></svg>');
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="egyptian" patternUnits="userSpaceOnUse" width="50" height="50"><path d="M10,10 L40,10 L25,40 Z" fill="%23d4af37" opacity="0.1"/><circle cx="25" cy="25" r="5" fill="%23f5deb3" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23egyptian)"/>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-family: "Cinzel Decorative", serif;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #f5deb3;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
}

.btn.secondary {
    background: transparent;
    color: #f5deb3;
    border: 2px solid #f5deb3;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #b8941f, #d4af37);
}

.btn.secondary:hover {
    background: #f5deb3;
    color: #243a6b;
}

/* Egyptian Wisdom Section */
.egyptian-wisdom-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 50%, #f5deb3 100%);
    position: relative;
    overflow: hidden;
}

/* .egyptian-wisdom-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="papyrus" patternUnits="userSpaceOnUse" width="50" height="50"><circle cx="25" cy="25" r="3" fill="%23d4af37" opacity="0.1"/><path d="M10,25 L40,25 M25,10 L25,40" stroke="%23d4af37" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23papyrus)"/>');
    opacity: 0.3;
} */
.egyptian-wisdom-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.05) 0%,
            transparent 50%
        );
    background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px;
    background-position: 0 0, 100px 100px, 200px 200px, 300px 300px;
    animation: backgroundFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.wisdom-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

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

.wisdom-text p {
    font-size: 1.5rem;
    color: #243a6b;
    margin-bottom: 1rem;
    font-family: "Cinzel Decorative", serif;
    font-weight: 600;
    line-height: 1.4;
}

.wisdom-author {
    font-size: 1.1rem !important;
    color: #d4af37 !important;
    font-style: italic;
    margin-top: 1rem;
}

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

.egyptian-image {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #d4af37;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.egyptian-image:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Courses Section */
.courses-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 50%, #f5deb3 100%);
    position: relative;
    overflow: hidden;
}

.courses-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.05) 0%,
            transparent 50%
        );
    background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px;
    background-position: 0 0, 100px 100px, 200px 200px, 300px 300px;
    animation: backgroundFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.courses-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="8" fill="rgba(212, 175, 55, 0.03)" font-family="serif">☥</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="6" fill="rgba(36, 58, 107, 0.02)" font-family="serif">𓃭</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="10" fill="rgba(212, 175, 55, 0.02)" font-family="serif">𓂀</text></svg>');
    background-size: 200px 200px, 150px 150px, 250px 250px;
    background-position: 0 0, 50px 50px, 100px 100px;
    animation: hieroglyphFloat 30s linear infinite;
    pointer-events: none;
}

@keyframes backgroundFloat {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(1deg);
    }

    50% {
        transform: translateY(-5px) rotate(-1deg);
    }

    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

@keyframes hieroglyphFloat {
    0% {
        transform: translateX(0px) translateY(0px);
    }

    25% {
        transform: translateX(10px) translateY(-5px);
    }

    50% {
        transform: translateX(-5px) translateY(-10px);
    }

    75% {
        transform: translateX(-10px) translateY(-5px);
    }

    100% {
        transform: translateX(0px) translateY(0px);
    }
}

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

.course-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.85)
    );
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(212, 175, 55, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
}

.course-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #d4af37, #f5deb3, #243a6b, #d4af37);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

[dir="rtl"] .course-card::after {
    left: 20px;
    right: initial;
}

.course-card::after {
    content: "☥";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #d4af37;
    opacity: 0.8;
    font-family: serif;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border-color: #d4af37;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0.95)
    );
}

.course-card:hover::after {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

.course-image {
    position: relative;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.4s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-content {
    padding: 2rem;
    position: relative;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.course-content h3 {
    color: #243a6b;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: "Cinzel Decorative", serif;
}

.course-price {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.course-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1rem;
}

.course-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.course-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.course-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    border-color: #d4af37;
}

.course-btn:hover::before {
    left: 100%;
}

/* Egyptian Heritage Section */
.egyptian-heritage-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Quiz Modal Exam Instructions Styling */
.quiz-modal-fullpage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #eae0c7;
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 3rem 1rem;
}

.quiz-modal {
    max-width: 500px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(36, 58, 107, 0.12);
    padding: 2rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

body.dark-mode .quiz-modal-fullpage {
    background: rgba(15, 23, 36, 0.98);
}

body.dark-mode .quiz-modal {
    background: #1a1a1a;
    color: #f5deb3;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.18);
}

.exam-instructions {
    margin-top: 1.5rem;
    background: #fff8e1;
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 1rem;
    color: #243a6b;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.08);
}

.exam-instructions h4 {
    margin-bottom: 0.5rem;
    color: #d4af37;
    font-family: "Cinzel Decorative", serif;
}

.exam-instructions ul {
    margin-left: 1.2em;
}

body.dark-mode .exam-instructions {
    background: #1a1a1a;
    color: #f5deb3;
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.18);
}

body.dark-mode .exam-instructions h4 {
    color: #d4af37;
}

body.dark-mode .exam-instructions ul li {
    color: #e9ce8e;
}

.egyptian-heritage-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hieroglyph" patternUnits="userSpaceOnUse" width="60" height="60"><path d="M20,20 L40,20 L30,40 Z" fill="%23d4af37" opacity="0.1"/><circle cx="30" cy="30" r="8" fill="%23f5deb3" opacity="0.1"/><rect x="25" y="25" width="10" height="10" fill="none" stroke="%23d4af37" stroke-width="1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23hieroglyph)"/>');
    opacity: 0.2;
    z-index: -1;
}

.egyptian-heritage-section .section-title {
    color: #d4af37;
    position: relative;
    z-index: 2;
}

.heritage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.heritage-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.heritage-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: #d4af37;
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2);
}

.heritage-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 3px solid #d4af37;
    transition: all 0.3s ease;
}

.heritage-item:hover .heritage-image {
    transform: scale(1.05);
}

.heritage-item h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-family: "Cinzel Decorative", serif;
}

.heritage-item p {
    color: #f5deb3;
    line-height: 1.6;
}

/* Teachers Section */
.teachers-section {
    padding: 4rem 0;
    background: white;
}

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

.teacher-card {
    background: #f8f4f0;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.teacher-card::before {
    content: "𓃭";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2rem;
    color: #d4af37;
    opacity: 0.8;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #d4af37;
}

.teacher-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid #d4af37;
}

.teacher-info h3 {
    color: #243a6b;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.subject {
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience {
    color: #666;
    font-size: 0.9rem;
}

/* Profile Page Styles */
.profile-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.profile-main-points {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.edit-profile-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.profile-content {
    display: grid;
    gap: 2rem;
}

.profile-info-section {
    order: 1;
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #f5deb3;
    position: relative;
}

.profile-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #d4af37, #f5deb3, #243a6b);
    border-radius: 17px;
    z-index: -1;
}

.profile-card::after {
    content: "☥";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #d4af37;
    opacity: 0.6;
    font-family: serif;
}

.profile-image-container {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #d4af37;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.image-upload {
    margin-top: 1rem;
}

.upload-label {
    display: inline-block;
    padding: 8px 16px;
    background: #243a6b;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: #1a2a4a;
}

#imageInput {
    display: none;
}

.profile-details {
    display: grid;
    gap: 1rem;
}

.detail-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f4f0;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

.detail-group label {
    font-weight: 600;
    color: #243a6b;
    min-width: 120px;
}

.detail-group span {
    color: #333;
    flex: 1;
    text-align: right;
}

.edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #d4af37;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.save-btn,
.cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.cancel-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.save-btn:hover,
.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Enrolled Courses Section */
.enrolled-courses-section {
    order: 2;
}

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

.enrolled-course-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #f5deb3;
    transition: all 0.3s ease;
}

.enrolled-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #d4af37;
}

.course-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f5deb3);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.enrolled-course-card h4 {
    color: #243a6b;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.enrolled-course-card p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.course-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.course-status.completed {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Academic Stats Section */
.academic-stats-section {
    order: 3;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #f5deb3;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card::before {
    content: "𓂀";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1rem;
    color: #d4af37;
    opacity: 0.7;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #d4af37;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #243a6b;
    font-weight: 600;
    font-size: 1rem;
}

/* Footer Styles */
.main-footer {
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    color: white;
    padding: 3rem 0 1rem;

    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f5deb3, #d4af37);
}

.main-footer::after {
    content: "𓃭 𓃭 𓃭";
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: rgba(212, 175, 55, 0.3);
    letter-spacing: 2rem;
    font-family: serif;
}

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

.footer-section h3,
.footer-section h4 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-family: "Cinzel Decorative", serif;
}

.footer-section p {
    color: #f5deb3;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

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

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icon {
    display: inline-block;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    color: #f5deb3;
}

/* RTL Support for Arabic */
[dir="rtl"] .logo-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .wisdom-content {
    direction: rtl;
}

[dir="rtl"] .heritage-grid {
    direction: rtl;
}

[dir="rtl"] .courses-grid {
    direction: rtl;
}

[dir="rtl"] .teachers-grid {
    direction: rtl;
}

[dir="rtl"] .enrolled-courses-grid {
    direction: rtl;
}

[dir="rtl"] .stats-grid {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

[dir="rtl"] .detail-group label {
    text-align: right;
}

[dir="rtl"] .detail-group span,
[dir="rtl"] .edit-input {
    text-align: left;
}

[dir="rtl"] .profile-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-logo {
        font-size: 2rem;
    }

    .main-header {
        padding: 0.5rem 0;
    }

    .login-page .switchers-container {
        display: flex;
    }

    .logo-image {
        width: 50px;
        height: 50px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        display: none;
    }

    .switchers-container {
        display: none;
    }

    .login-page .switchers-container {
        display: flex;
    }

    .wisdom-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .wisdom-text p {
        font-size: 1.3rem;
    }

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

    .courses-grid,
    .teachers-grid,
    .enrolled-courses-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-profile-btn {
        width: 100%;
    }

    .detail-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-group label {
        min-width: auto;
    }

    .detail-group span,
    .edit-input {
        text-align: left;
    }

    .profile-actions {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        /* padding: 2rem 1.5rem;
        margin: 1rem; */
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .course-card,
    .teacher-card,
    .profile-card,
    .enrolled-course-card,
    .stat-card {
        margin: 0 1rem;
    }

    /* Register form mobile optimizations */
    .register-form .form-group {
        margin-bottom: 1rem;
    }

    .checkbox-label {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .login-container {
        /* padding: 2rem 1.5rem; */
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-out {
    /* This applies the animation to the element. */
    animation: fadeOut 0.5s ease-out forwards;
}

/* This defines the animation steps. */
@keyframes fadeOut {
    from {
        opacity: 1;
        /* transform: translateY(0); */
    }

    to {
        opacity: 0;
        /* transform: translateY(-20px); */
        /* Optional: makes it slide up */
    }
}

/* Hover Effects */
.course-card:hover .course-image img,
.teacher-card:hover .teacher-image img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

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

/* Dark Mode Styles for Profile Page */
body.dark-mode .profile-main {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
}

body.dark-mode .profile-main-points {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
}

body.dark-mode .profile-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
}

body.dark-mode .profile-card::before {
    background: linear-gradient(45deg, #2d2d2d, #1a1a1a, #0f1724);
}

body.dark-mode .enrolled-course-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
}

body.dark-mode .enrolled-course-card h4 {
    color: #dbe9fb;
}

body.dark-mode .enrolled-course-card p.course-status {
    color: #212121;
}

body.dark-mode .stat-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
}

body.dark-mode .stat-label {
    color: #dbe9fb;
}

body.dark-mode .profile-header h1 {
    color: #f5f7fb;
}

body.dark-mode .subsection-title {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 1.5rem;
}

body.dark-mode .edit-profile-btn {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #091018;
}

/* Chat Page Styles */
.chat-page {
    background: linear-gradient(135deg, #f5deb3 0%, #f4e4c1 100%);
    min-height: 100vh;
    position: relative;
    background-attachment: fixed;
}

.chat-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="chat-pattern" patternUnits="userSpaceOnUse" width="40" height="40"><circle cx="20" cy="20" r="1" fill="%23d4af37" opacity="0.1"/><path d="M10,20 L30,20 M20,10 L20,30" stroke="%23d4af37" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23chat-pattern)"/>');
    pointer-events: none;
}

/* Dark mode background for chat page */
body.dark-mode .chat-page {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    background-attachment: fixed;
}

body.dark-mode .chat-page::before {
    opacity: 0.3;
}

.chat-main {
    padding: 1rem 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* Dark mode for chat main */
body.dark-mode .chat-main {
    color: #e7eef8;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #d4af37;
    position: relative;
}

.chat-header::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #d4af37, #f5deb3, #243a6b);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
}

.grade-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.grade-badge {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.online-count {
    color: #243a6b;
    font-weight: 600;
}

.online-count {
    color: #243a6b;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(212, 175, 55, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Dark mode for chat header elements */
body.dark-mode .chat-header {
    background: rgba(26, 26, 26, 0.9);
    border-color: #d4af37;
}

body.dark-mode .chat-header h1 {
    color: #f5f7fb;
}

body.dark-mode .online-count {
    color: #dbe9fb;
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

.chat-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.chat-messages {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid #d4af37;
    min-height: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    backdrop-filter: blur(10px);
    background-attachment: local;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom scrollbar for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #b8941f, #d4af37);
}

.welcome-message {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1),
        rgba(245, 222, 179, 0.1)
    );
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.welcome-message h2 {
    color: #243a6b;
    margin-bottom: 1rem;
    font-family: "Cinzel Decorative", serif;
}

.welcome-message p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.system-message {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.15),
        rgba(212, 175, 55, 0.05)
    );
    border: 2px solid rgba(212, 175, 55, 0.4);
    color: #243a6b;
    font-style: italic;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
}

.chat-input-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid #d4af37;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.chat-input-container::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #d4af37, #f5deb3, #243a6b);
    border-radius: 23px;
    z-index: -1;
    opacity: 0.3;
}

.input-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
    align-content: center;
    width: -webkit-fill-available;
}

#messageInput {
    flex: 1;
    padding: 16px 20px;
    border: 3px solid #f5deb3;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: "Cinzel", serif;
    resize: none;
    min-height: 60px;
    max-width: 100%;
    box-sizing: border-box;
}

#messageInput:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background: white;
    transform: translateY(-2px);
}

.send-btn {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    font-weight: 600;
    min-width: 80px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #b8941f, #d4af37);
}

.send-btn:active {
    transform: translateY(-1px);
}

.message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.char-count {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}

.emoji-btn {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1),
        rgba(245, 222, 179, 0.1)
    );
    border: 2px solid rgba(212, 175, 55, 0.3);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #d4af37;
    flex-shrink: 0;
    user-select: none;
}

.emoji-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.2),
        rgba(245, 222, 179, 0.2)
    );
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid #d4af37;
    backdrop-filter: blur(10px);
    position: relative;
}

.sidebar-section::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #d4af37, #f5deb3, #243a6b);
    border-radius: 23px;
    z-index: -1;
    opacity: 0.3;
}

.sidebar-section h3 {
    color: #243a6b;
    margin-bottom: 1.5rem;
    font-family: "Cinzel Decorative", serif;
    font-size: 1.3rem;
    text-align: center;
    position: relative;
}

.sidebar-section h3::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #f5deb3);
    border-radius: 1px;
}

.online-students {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.online-student {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1),
        rgba(245, 222, 179, 0.1)
    );
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.online-student:hover {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.15),
        rgba(245, 222, 179, 0.15)
    );
    transform: translateX(5px);
}

.online-indicator {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.chat-rules {
    list-style: none;
    padding: 0;
}

.chat-rules li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.chat-rules li::before {
    content: "☥";
    position: absolute;
    left: 0;
    top: 1rem;
    color: #d4af37;
    font-size: 0.8rem;
}

.chat-rules li:last-child {
    border-bottom: none;
}

/* Chat Messages */
.message {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    gap: 0.8rem;
}

.message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #d4af37;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.2rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    border-bottom-right-radius: 8px;
}

.other-message .message-content {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.15),
        rgba(245, 222, 179, 0.15)
    );
    color: #243a6b;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.system-message {
    justify-content: center;
    margin: 1rem 0;
}

.system-message .message-content {
    background: rgba(212, 175, 55, 0.1);
    color: #666;
    text-align: center;
    font-style: italic;
    border: 1px dashed rgba(212, 175, 55, 0.3);
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 15px;
    max-width: 70%;
    position: relative;
    animation: messageSlideIn 0.4s ease-out;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.sent {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 8px;
}

.chat-message.sent::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid #b8941f;
    border-top: 10px solid transparent;
}

.chat-message.received {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.15),
        rgba(245, 222, 179, 0.15)
    );
    color: #243a6b;
    margin-right: auto;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.chat-message.received::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 0;
    height: 0;
    border-right: 10px solid rgba(212, 175, 55, 0.3);
    border-top: 10px solid transparent;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
}

.message-author {
    font-weight: 600;
    color: inherit;
}

.message-time {
    opacity: 0.7;
    font-size: 0.75rem;
}

.message-content {
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.chat-message.sent .message-header {
    color: rgba(255, 255, 255, 0.9);
}

.chat-message.received .message-header {
    color: #666;
}

/* Online Students Styles */
.online-student {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.online-student:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(5px);
}

.student-avatar {
    position: relative;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #d4af37;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.student-info {
    flex: 1;
}

.student-name {
    display: block;
    font-weight: 600;
    color: #243a6b;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.student-status {
    display: block;
    font-size: 0.8rem;
    color: #4caf50;
    font-weight: 500;
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .chat-sidebar {
        order: -1;
    }

    .chat-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .grade-info {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .chat-messages {
        min-height: 500px;
        max-height: 70vh;
        padding: 1.5rem;
    }

    .chat-input-container {
        padding: 1.5rem;
    }

    .input-group {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    #messageInput {
        min-height: 50px;
        width: 100%;
    }

    .btns-td {
        display: flex;
        gap: 0.5rem;
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .sidebar-section {
        padding: 1.5rem;
    }

    .chat-message {
        max-width: 85%;
        padding: 0.8rem 1rem;
    }

    .message-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .chat-messages {
        min-height: 400px;
        max-height: 60vh;
        padding: 1rem;
    }

    .chat-input-container {
        padding: 1rem;
    }

    .sidebar-section {
        padding: 1rem;
    }

    .grade-badge {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .online-count {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

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

/* Emoji Picker Styles */
.emoji-picker {
    background: white;
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    max-width: 320px;
    backdrop-filter: blur(10px);
    animation: emojiPickerSlideIn 0.3s ease-out;
    margin-top: 10px;
    width: 100%;
}

@keyframes emojiPickerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.emoji-option {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-option:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

.emoji-option:active {
    transform: scale(0.95);
}

/* Dark mode for emoji picker */
body.dark-mode .emoji-picker {
    background: rgba(0, 0, 0, 0.9);
    border-color: #d4af37;
    color: #f5deb3;
}

body.dark-mode .emoji-option:hover {
    background: rgba(212, 175, 55, 0.3);
}

/* Course Detail Page Styles */
.course-detail-page {
    background: linear-gradient(135deg, #f5deb3 0%, #f4e4c1 100%);
    min-height: 100vh;
}

body.dark-mode.course-detail-page {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
}

.course-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

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

/* Course Header */
.course-header {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.2);
}

body.dark-mode .course-header {
    background: rgba(15, 23, 36, 0.9);
    border-color: rgba(212, 175, 55, 0.3);
}

.course-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.course-banner {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid #d4af37;
}

.course-details h1 {
    font-family: "Cinzel Decorative", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #243a6b;
    margin-bottom: 0.5rem;
}

body.dark-mode .course-details h1 {
    color: #f5deb3;
}

.course-details p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

body.dark-mode .course-details p {
    color: #b8c5d6;
}

.course-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.course-meta span {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1),
        rgba(245, 222, 179, 0.1)
    );
    color: #243a6b;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.course-meta span:hover {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

body.dark-mode .course-meta span {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
}

/* Course Content Wrapper */
.course-content-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    min-height: 600px;
}

/* Lectures Sidebar */
.lectures-sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.2);
    height: fit-content;
    max-height: 700px;
    overflow-y: auto;
}

body.dark-mode .lectures-sidebar {
    background: rgba(15, 23, 36, 0.9);
    border-color: rgba(212, 175, 55, 0.3);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.sidebar-header h3 {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #243a6b;
    margin: 0;
}

body.dark-mode .sidebar-header h3 {
    color: #f5deb3;
}

.toggle-sidebar {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.toggle-sidebar span {
    display: block;
    width: 20px;
    height: 2px;
    background: #243a6b;
    margin: 4px 0;
    transition: all 0.3s ease;
}

body.dark-mode .toggle-sidebar span {
    background: #f5deb3;
}

/* Lectures List */
.lectures-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lecture-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.5);
}

.lecture-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.lecture-item.active {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    border-color: #d4af37;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

body.dark-mode .lecture-item {
    background: rgba(15, 23, 36, 0.5);
}

body.dark-mode .lecture-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

body.dark-mode .lecture-item.active {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    border-color: #d4af37;
}

.lecture-thumbnail {
    position: relative;
    flex-shrink: 0;
}

.lecture-thumbnail img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.lecture-duration {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.lecture-info {
    flex: 1;
    min-width: 0;
}

.lecture-title {
    font-family: "Cinzel", serif;
    font-size: 1rem;
    font-weight: 600;
    color: #243a6b;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

body.dark-mode .lecture-title {
    color: #f5deb3;
}

.lecture-item.active .lecture-title {
    color: #243a6b;
}

body.dark-mode .lecture-item.active .lecture-title {
    color: #f5deb3;
}

.lecture-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

body.dark-mode .lecture-description {
    color: #b8c5d6;
}

.lecture-item.active .lecture-description {
    color: #243a6b;
}

body.dark-mode .lecture-item.active .lecture-description {
    color: #f5deb3;
}

/* Quiz Button Styles */
.quiz-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(36, 58, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.quiz-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.quiz-btn:hover {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.quiz-btn:hover::before {
    left: 100%;
}

.quiz-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.quiz-btn:hover .quiz-icon {
    transform: scale(1.1) rotate(5deg);
}

body.dark-mode .quiz-btn {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

body.dark-mode .quiz-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    box-shadow: 0 6px 20px rgba(36, 58, 107, 0.4);
}

/* Quiz Button in Video Area */
.video-info .quiz-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    margin-top: 1rem;
    align-self: flex-start;
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.video-info .quiz-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(36, 58, 107, 0.5);
    border-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .video-info .quiz-btn {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    border-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .video-info .quiz-btn:hover {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    border-color: rgba(212, 175, 55, 0.7);
}

/* Video Main Area */
.video-main-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.2);
}

body.dark-mode .video-main-area {
    background: rgba(15, 23, 36, 0.9);
    border-color: rgba(212, 175, 55, 0.3);
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-element {
    width: 100%;
    height: auto;
    min-height: 400px;
    display: block;
}

.video-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.2);
}

body.dark-mode .video-info {
    background: rgba(15, 23, 36, 0.8);
    border-color: rgba(212, 175, 55, 0.3);
}

.video-info h2 {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #243a6b;
    margin-bottom: 1rem;
}

body.dark-mode .video-info h2 {
    color: #f5deb3;
}

.video-info p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

body.dark-mode .video-info p {
    color: #b8c5d6;
}

/* Video Main Area */
.video-main-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.2);
}

body.dark-mode .video-main-area {
    background: rgba(15, 23, 36, 0.9);
    border-color: rgba(212, 175, 55, 0.3);
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-element {
    width: 100%;
    height: auto;
    min-height: 400px;
    display: block;
}

.video-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.2);
}

body.dark-mode .video-info {
    background: rgba(15, 23, 36, 0.8);
    border-color: rgba(212, 175, 55, 0.3);
}

.video-info h2 {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #243a6b;
    margin-bottom: 1rem;
}

body.dark-mode .video-info h2 {
    color: #f5deb3;
}

.video-info p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

body.dark-mode .video-info p {
    color: #b8c5d6;
}

/* Responsive Design for Course Detail */
@media (max-width: 1200px) {
    .course-content-wrapper {
        grid-template-columns: 300px 1fr;
        gap: 1.5rem;
    }

    .course-info {
        gap: 1.5rem;
    }

    .course-banner {
        width: 180px;
        height: 110px;
    }
}

@media (max-width: 992px) {
    .course-content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lectures-sidebar {
        order: 2;
        max-height: none;
    }

    .video-main-area {
        order: 1;
    }

    .toggle-sidebar {
        display: block;
    }

    .lectures-list.collapsed {
        display: none;
    }

    .course-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .course-banner {
        width: 250px;
        height: 150px;
    }
    /* 
    .course-meta {
        justify-content: center;
    } */
}

@media (max-width: 768px) {
    .course-main {
        padding: 1rem 0;
    }

    .course-container {
        padding: 0 15px;
    }

    .course-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .course-details h1 {
        font-size: 2rem;
    }

    .course-meta {
        gap: 1rem;
    }

    .course-meta span {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .video-main-area {
        padding: 1.5rem;
    }

    .video-info {
        padding: 1rem;
    }

    .video-info h2 {
        font-size: 1.5rem;
    }

    .lectures-sidebar {
        padding: 1rem;
    }

    .sidebar-header h3 {
        font-size: 1.3rem;
    }

    .lecture-item {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .lecture-thumbnail img {
        width: 70px;
        height: 50px;
    }

    .lecture-title {
        font-size: 0.9rem;
    }

    .lecture-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .course-header {
        padding: 1rem;
        flex-direction: column;
    }

    .course-details h1 {
        font-size: 1.8rem;
    }

    .course-banner {
        width: 200px;
        height: 120px;
    }

    .course-meta {
        flex-direction: column;
        /* align-items: center; */
        width: fit-content;
        gap: 0.8rem;
    }

    .video-main-area {
        padding: 1rem;
    }

    .video-info {
        padding: 0.8rem;
    }

    .video-info h2 {
        font-size: 1.3rem;
    }

    .lectures-sidebar {
        padding: 0.8rem;
    }

    .lecture-item {
        padding: 0.6rem;
        gap: 0.6rem;
    }

    .lecture-thumbnail img {
        width: 60px;
        height: 45px;
    }

    .lecture-title {
        font-size: 0.85rem;
    }

    .lecture-description {
        font-size: 0.75rem;
    }
}

/* Contact Page Styles */
.contact-page {
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 100%);
    position: relative;
}

.contact-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="12" fill="rgba(212, 175, 55, 0.03)" font-family="serif">☥</text></svg>');
    background-size: 300px 300px;
    background-position: 0 0;
    animation: pageBackgroundFloat 40s linear infinite;
    pointer-events: none;
    z-index: -1;
}

body.dark-mode .contact-page {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

body.dark-mode .contact-page::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="12" fill="rgba(212, 175, 55, 0.02)" font-family="serif">☥</text></svg>');
}

.contact-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 50%, #f5deb3 100%);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.05) 0%,
            transparent 50%
        );
    background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px;
    background-position: 0 0, 100px 100px, 200px 200px, 300px 300px;
    animation: backgroundFloat 20s ease-in-out infinite;
    pointer-events: none;
}

.contact-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="8" fill="rgba(212, 175, 55, 0.03)" font-family="serif">☥</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="6" fill="rgba(36, 58, 107, 0.02)" font-family="serif">𓃭</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="10" fill="rgba(212, 175, 55, 0.02)" font-family="serif">𓂀</text></svg>');
    background-size: 200px 200px, 150px 150px, 250px 250px;
    background-position: 0 0, 50px 50px, 100px 100px;
    animation: hieroglyphFloat 30s linear infinite;
    pointer-events: none;
}

body.dark-mode .contact-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #243a6b 100%);
}

body.dark-mode .contact-section::before {
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(212, 175, 55, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(36, 58, 107, 0.2) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(36, 58, 107, 0.15) 0%,
            transparent 50%
        );
}

body.dark-mode .contact-section::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="8" fill="rgba(212, 175, 55, 0.08)" font-family="serif">☥</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="6" fill="rgba(36, 58, 107, 0.06)" font-family="serif">𓃭</text></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="10" fill="rgba(212, 175, 55, 0.05)" font-family="serif">𓂀</text></svg>');
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.contact-header h1 {
    font-size: 3rem;
    color: #243a6b;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

body.dark-mode .contact-header h1 {
    color: #f5deb3;
}

body.dark-mode .contact-header p {
    color: #ccc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.contact-form-container,
.contact-info-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.contact-form-container::before,
.contact-info-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #f5deb3, #d4af37);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

body.dark-mode .contact-form-container,
body.dark-mode .contact-info-container {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.form-header,
.info-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h2,
.info-header h2 {
    font-size: 2rem;
    color: #243a6b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-header p,
.info-header p {
    color: #666;
    font-size: 1rem;
}

body.dark-mode .form-header h2,
body.dark-mode .info-header h2 {
    color: #f5deb3;
}

body.dark-mode .form-header p,
body.dark-mode .info-header p {
    color: #ccc;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #243a6b;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

body.dark-mode .form-group label {
    color: #f5deb3;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: rgba(45, 45, 45, 0.8);
    border-color: rgba(212, 175, 55, 0.4);
    color: #fff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    background: rgba(45, 45, 45, 0.95);
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(36, 58, 107, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 1.2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #243a6b;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.info-content h3 {
    color: #243a6b;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-content p {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

body.dark-mode .info-item {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .info-item:hover {
    background: rgba(212, 175, 55, 0.15);
}

body.dark-mode .info-content h3 {
    color: #f5deb3;
}

body.dark-mode .info-content p {
    color: #ccc;
}

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

.social-links h3 {
    color: #243a6b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877f2, #0d6efd);
}

.social-icon.twitter {
    background: linear-gradient(135deg, #1da1f2, #0ea5e9);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #e4405f, #f77737);
}

.social-icon.linkedin {
    background: linear-gradient(135deg, #0077b5, #0a66c2);
}

.social-icon.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .social-links h3 {
    color: #f5deb3;
}

/* Contact Page Responsive Design */
@media (max-width: 1200px) {
    .contact-content {
        gap: 2rem;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-header h1 {
        font-size: 2.5rem;
    }

    .form-header h2,
    .info-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 3rem 0;
    }

    .contact-header h1 {
        font-size: 2rem;
    }

    .contact-header p {
        font-size: 1rem;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 1.5rem;
    }

    .form-header h2,
    .info-header h2 {
        font-size: 1.5rem;
    }

    .info-item {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 2rem 0;
    }

    .contact-header h1 {
        font-size: 1.8rem;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 1rem;
    }

    .form-header h2,
    .info-header h2 {
        font-size: 1.3rem;
    }

    .submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .info-item {
        padding: 0.6rem;
        gap: 0.6rem;
    }

    .info-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Fix: Ensure scrolling works on login page in dark mode */
body.login-page.dark-mode {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    position: relative;
    background: #0b0f1a;
}

body.register-page .language-text,
body.login-page .language-text {
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
    color: #243a6b;
}

body.dark-mode.register-page .language-text,
body.dark-mode.login-page .language-text {
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
    color: #f5deb3;
}

/* lectures page */

.egyptian-wisdom-section-lectures {
    padding: 4rem 0;
    /* background: linear-gradient(135deg, #f5deb3 0%, #e6d3a3 100%); */
    position: relative;
    overflow: hidden;
}

/* Quiz Page Styles */
.quiz-main {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f4f0 0%, #e8dcc0 50%, #f5deb3 100%);
    min-height: 70vh;
}

.quiz-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.quiz-question-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(36, 58, 107, 0.08);
    padding: 2rem 1.5rem;
    position: relative;
    transition: box-shadow 0.2s;
}

.quiz-question-box:hover {
    box-shadow: 0 8px 32px rgba(36, 58, 107, 0.14);
}

.quiz-question {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.2rem;
    color: #243a6b;
    margin-bottom: 1rem;
    font-weight: 700;
}

.quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.quiz-choices label {
    font-size: 1.08rem;
    color: #243a6b;
    cursor: pointer;
    padding-left: 0.5rem;
}

.quiz-text-field {
    width: 100%;
    border: 1.5px solid #d4af37;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.08rem;
    font-family: "Cinzel", serif;
    background: #f8f9fa;
    color: #243a6b;
    margin-bottom: 1rem;
    resize: vertical;
}

.quiz-submit-btn {
    background: linear-gradient(90deg, #243a6b 0%, #243a6b 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    border: none;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(36, 58, 107, 0.08);
    width: fit-content;
    align-self: center;
}

.quiz-submit-btn:hover {
    /* background: linear-gradient(90deg, #243a6b 0%, #d4af37 100%); */
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.18);
}

body.dark-mode .quiz-main {
    background: linear-gradient(135deg, #0f1724 0%, #0b0f1a 100%);
    color: #e7eef8;
}

body.dark-mode .quiz-question-box {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
    border: 2px solid #d4af37;
}

body.dark-mode .quiz-choices label {
    color: #e7eef8;
}

body.dark-mode .quiz-question {
    color: #e7eef8;
}

body.dark-mode .quiz-text-field {
    background: #2d2d2d;
    color: #f5deb3;
    border-color: #d4af37;
}

body.dark-mode .quiz-submit-btn {
    background: linear-gradient(90deg, #d4af37 0%, #d4af37 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    border: none;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(36, 58, 107, 0.08);
}

/*
.quiz-timer {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #243a6b;
    margin-bottom: 1.5rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid #d4af37;
    border-radius: 25px;
    background: rgba(245, 222, 179, 0.2);
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body.dark-mode .quiz-timer {
    color: #f5deb3;
    border-color: #d4af37;
    background: rgba(36, 58, 107, 0.3);
} */

/* Quiz Timer Styles */
.quiz-timer {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #243a6b;
    margin: 1.5rem auto;
    padding: 0.8rem 2rem;
    border: 3px solid #d4af37;
    border-radius: 35px;
    background: linear-gradient(135deg, #fdf5e6, #f5deb3);
    display: block;
    width: fit-content;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    letter-spacing: 1px;
    font-family: "Cinzel Decorative", serif;
    position: relative;
}

/* Subtle golden glow */
.quiz-timer::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 40px;
    background: linear-gradient(90deg, #d4af37, #f5deb3, #243a6b, #d4af37);
    background-size: 300% 300%;
    animation: shimmer-border 6s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes shimmer-border {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Dark mode support */
body.dark-mode .quiz-timer {
    color: #f5deb3;
    border-color: #d4af37;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3);
}

/* Quiz Progress Bar */
.quiz-progress {
    width: 80%;
    max-width: 600px;
    height: 14px;
    background: rgba(245, 222, 179, 0.3);
    border: 2px solid #d4af37;
    border-radius: 10px;
    margin: 1.5rem auto 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #f5deb3);
    transition: width 0.4s ease;
    border-radius: 10px;
}

.quiz-progress-text {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #243a6b;
    margin-bottom: 1rem;
    font-family: "Cinzel Decorative", serif;
}

body.dark-mode .quiz-progress {
    background: rgba(36, 58, 107, 0.3);
    border-color: #d4af37;
}

body.dark-mode .quiz-progress-fill {
    background: linear-gradient(90deg, #d4af37, #b8941f);
}

body.dark-mode .quiz-progress-text {
    color: #f5deb3;
}

.quiz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.quiz-modal {
    background: linear-gradient(135deg, #f5deb3, #f4e4c1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

body.dark-mode .quiz-modal {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    border-color: rgba(212, 175, 55, 0.5);
}

.quiz-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.quiz-modal-header h3 {
    font-family: "Cinzel Decorative", serif;
    font-size: 1.5rem;
    color: #243a6b;
    margin: 0;
}

body.dark-mode .quiz-modal-header h3 {
    color: #f5deb3;
}

.close-quiz-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-quiz-modal:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #243a6b;
    transform: scale(1.1);
}

body.dark-mode .close-quiz-modal {
    color: #b8c5d6;
}

body.dark-mode .close-quiz-modal:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #f5deb3;
}

.quiz-info {
    margin-bottom: 2rem;
}

.quiz-info p {
    margin-bottom: 0.8rem;
    color: #333;
    font-size: 1rem;
}

body.dark-mode .quiz-info p {
    color: #e7eef8;
}

.quiz-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.start-quiz-btn,
.cancel-quiz-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.start-quiz-btn {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
}

.start-quiz-btn:hover {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.cancel-quiz-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.cancel-quiz-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

body.dark-mode .start-quiz-btn {
    background: linear-gradient(135deg, #d4af37, #f5deb3);
    color: #243a6b;
}

body.dark-mode .start-quiz-btn:hover {
    background: linear-gradient(135deg, #243a6b, #1a2a4a);
    color: #f5deb3;
}

@media (max-width: 768px) {
    .quiz-modal {
        margin: 1rem;
        padding: 1.5rem;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .start-quiz-btn,
    .cancel-quiz-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Restricted Access Page Styles (Improved) */
.restricted-access-container {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(36, 58, 107, 0.12);
    max-width: 420px;
    margin: 60px auto;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 2px solid #d4af37;
    position: relative;
}

.restricted-access-container .logo-image {
    width: 80px;
    margin-bottom: 18px;
}

.restricted-access-title {
    font-family: "Cinzel Decorative", serif;
    font-size: 2.1rem;
    color: #243a6b;
    margin-bottom: 1rem;
}

.restricted-access-message {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 2rem;
}

.restricted-btn-group {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 1.5rem;
}

.restricted-btn {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
    text-decoration: none;
    display: inline-block;
}

.restricted-btn:hover {
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.22);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #b8941f, #d4af37);
}

body.dark-mode .restricted-access-container {
    background: #1b2c50f7;
    border-color: #f5deb3;
}

body.dark-mode .restricted-access-title {
    color: #f5deb3;
}

body.dark-mode .restricted-access-message {
    color: #e7eef8;
}

body.dark-mode .restricted-btn {
    background: linear-gradient(135deg, #f5deb3, #d4af37);
    color: #243a6b;
}

body.dark-mode .restricted-btn:hover {
    background: linear-gradient(135deg, #fff5e3, #b8941f);
    /* color: #f5deb3; */
}

@media (max-width: 600px) {
    .restricted-access-container {
        max-width: 95vw;
        padding: 1.2rem 0.5rem;
        margin: 30px auto;
    }

    .restricted-btn-group {
        flex-direction: column;
        gap: 12px;
    }
}

.profile-card-exam {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #f5deb3;
    padding: 2rem;
    text-align: left;
    margin-top: 50px;
    margin-bottom: 50px;
    display: grid;
    gap: 1rem;
}

body.dark-mode .profile-card-exam {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
}

.session-detials {
    background: linear-gradient(135deg, #e9ce9d 0%, #ffffff 100%);
}

/* --- Chat layout fixes & UX tweaks --- */

/* Two-column layout; sidebar is part of the grid */
.chat-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    /* messages | sidebar */
    gap: 1.5rem;
    max-width: 1200px;
    /* tighter than 1400 for less “giant” look */
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

/* Left column stacks messages and the composer */
.chat-column {
    display: flex;
    min-height: 0;
    /* enables proper flex scrolling */
    flex-direction: column;
}

/* Messages panel: scrolls, no hard min/max that cause weird heights */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.96);
    gap: 1rem;
}

/* Bigger, cleaner bubbles */
.message-avatar {
    width: 46px;
    height: 46px;
}

.message-content {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-size: 1.05rem;
    /* bigger text */
    line-height: 1.6;
}

.message-header {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Composer sticks to viewport bottom; slimmer paddings */
.sticky-composer {
    bottom: 0;
    z-index: 5;
}

.chat-input-container {
    padding: 1rem 1.25rem;
    border: 1px solid #d4af37;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

#messageInput {
    min-height: 56px;
    font-size: 1.05rem;
}

/* Sidebar: no more “blank white” — give it a subtle card look */
.chat-sidebar {
    align-self: start;
    position: sticky;
    top: 1rem;
    /* sidebar stays visible while chatting */
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95),
        rgba(245, 222, 179, 0.55)
    );
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.chat-sidebar .sidebar-section {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 1rem;
}

/* Make rules and student list breathe */
.chat-rules li {
    margin: 0.4rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .chat-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chat-sidebar {
        order: 2;
        position: static;
    }
}

@media (max-width: 600px) {
    .message-content {
        font-size: 1.02rem;
    }

    .chat-messages {
        padding: 1rem;
    }

    .chat-input-container {
        padding: 0.85rem 1rem;
    }
}

/* Dark mode counterparts */
body.dark-mode .chat-messages,
body.dark-mode .chat-input-container,
body.dark-mode .chat-sidebar {
    background: rgba(0, 0, 0, 0.9);
    border-color: #d4af37;
    color: #f5deb3;
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #eae0c7;
}

.message {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1.4;
}

.message.error-general{
   position: absolute;
    top: 110px;
    right: 30px;
   z-index: 9999;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.success-general{
    position: absolute;
    top: 110px;
    right: 30px;
    z-index: 9999;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-author {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
    margin-top: 4px;
}

/* System message */
.system-message {
    background: rgba(212, 175, 55, 0.15);
    color: #243a6b;
    text-align: center;
    margin: 10px auto;
    border-radius: 10px;
    font-weight: 600;
}

/* Messages: user vs other */
.user-message {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: white;
    margin-left: auto;
}

.other-message {
    background: #ffffff;
    border: 1px solid #d4af37;
    color: #243a6b;
    margin-right: auto;
}

/* Input area */
.chat-input-container {
    flex-shrink: 0;
    background: #fff;
    padding: 8px 12px;
    border-top: 2px solid #d4af37;
}

/* .chat-form {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
    flex-flow: wrap;
    flex-flow: nowrap;
    align-items: center;
} */

#messageInput {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #eae0c7;
}

.send-btn {
    background: #243a6b;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #1a2a4a;
}

/* Dark mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5deb3;
}

body.dark-mode .chat-messages {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .user-message {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #fff;
}

body.dark-mode .other-message {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #f5deb3;
}

body.dark-mode .chat-input-container {
    background: #000;
    border-top: 2px solid #d4af37;
}

body.dark-mode #messageInput {
    background: #111;
    color: #f5deb3;
    border: 1px solid #d4af37;
}

/* Image upload button */
.image-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 5px;
}

.message img {
    max-width: 220px;
    border-radius: 10px;
    display: block;
}

/* style.css */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    /* Semi-transparent white background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: black;
}

.spinner {
    border: 8px solid #091018;
    border-top: 8px solid #b8941f;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .landing-page .header-content {
        justify-content: center;
    }
}

.scroll-to-bottom-btn {
    position: absolute;
    right: 24px;
    bottom: 125px;
    z-index: 10;
    background: #243a6b;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
    box-shadow: 0 2px 8px rgba(36, 58, 107, 0.15);
    cursor: pointer;
    display: flex;
    /* align-items: center; */
    justify-content: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    opacity: 0.92;
}

.scroll-to-bottom-btn:hover {
    background: #243a6b;
    color: #d4af37;
    box-shadow: 0 4px 16px rgba(36, 58, 107, 0.7);
}

.scroll-arrow {
    font-size: 2rem;
}

@media (max-width: 768px) {
    .scroll-to-bottom-btn {
        right: 24px;
        bottom: 230px;
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        align-content: center;
        flex-wrap: wrap;
    }

    .scroll-arrow {
        font-size: 1.2rem;
    }

    .chat-column {
        height: calc(100vh - 67.19px);
    }

    .chat-messages {
        max-height: -webkit-fill-available;
    }
}

body.dark-mode .scroll-to-bottom-btn {
    background: #12192a;
    color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.18);
}

body.dark-mode .scroll-to-bottom-btn:hover {
    background: #243a6b;
    /* color: #243a6b; */
}

@media (max-width: 480px) {
    .chat-messages {
        max-height: -webkit-fill-available;
    }
}

.delete-profile-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #d43737, #b81f1f);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(212 55 55 / 30%);
}

@media (max-width: 768px) {
    .delete-profile-btn {
        width: 100%;
    }
}

body.dark-mode .delete-profile-btn {
    background: linear-gradient(135deg, #d43737, #b81f1f);
    color: #060b11;
}

.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.delete-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 32px rgba(36, 58, 107, 0.18);
    text-align: center;
    min-width: 260px;
}

.delete-modal-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    align-items: center;
}

.delete-modal-actions button {
    width: auto;
    border-radius: 12px;
    border: none;
    color: #000;
}

body.dark-mode .delete-modal-actions button.btn {
    color: #000;
    background: #9e9e9e;
}

.delete-modal-actions button.btn {
    color: #fff;
    background: #243a6b;
}

.delete-modal-actions button.btn-delete {
    background: #b81f1f;
    /* color: #000; */
}

body.dark-mode .delete-modal-actions button.btn-delete {
    background: #d43737;
    color: #fff;
}

body.dark-mode .delete-modal-content {
    background: #12192a;
    color: #f5deb3;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.18);
}

/* Deleted message style */
.deleted-message {
    width: fit-content;
    color: #b0b0b0 !important;
    font-style: italic;
    background: #f5f5f5 !important;
    border: 1px dashed #ccc !important;
    opacity: 0.7;
}

body.dark-mode .deleted-message {
    color: #888 !important;
    background: #232323 !important;
    border-color: #444 !important;
}

@media (max-width: 600px) {
    .delete-modal-content {
        min-width: 0;
        width: 90vw;
        padding: 1.2rem 0.5rem;
        font-size: 1rem;
    }

    .delete-modal-actions {
        /* flex-direction: column; */
        gap: 0.7rem;
    }
}

body.dark-mode .deleted-message .message-content {
    background: #000;
    color: white;
}

.deleted-message .message-content {
    background: #fff;
    color: black;
}

.toast-success {
    visibility: hidden;
    min-width: 250px;
    background-color: #28a745; /* green for success */
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 15px 20px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

.toast-success.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    transform: translateY(-20px);
}

.toast {
    visibility: hidden;
    min-width: 250px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 18px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s, visibility 0.4s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

/* Responsive Fixes for Points History Page */
body.profile-page-points .profile-main-points {
    padding: 2rem 1rem;
}

body.profile-page-points .academic-stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Ensure stat-cards shrink nicely */
body.profile-page-points .stat-card {
    /* background: #fff;
    border: 2px solid #d4af37;
    border-radius: 12px; */
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.profile-page-points .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Fonts inside stat cards */
body.profile-page-points .stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    /* color: #243a6b; */
}

body.profile-page-points .stat-card .stat-label {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    /* color: #555; */
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    body.profile-page-points .profile-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    body.profile-page-points .profile-btns {
        flex-direction: column;
        width: 100%;
    }

    body.profile-page-points .profile-btns .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body.profile-page-points .stat-card {
        padding: 0.8rem;
    }

    body.profile-page-points .stat-card .stat-number {
        font-size: 1.2rem;
    }

    body.profile-page-points .stat-card .stat-label {
        font-size: 1rem;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 1200px) {
    .header-content {
        justify-content: space-around;
        padding: 10px;
    }
}

.student-points,
.student-points-side {
    display: inline-block;
    /* background: linear-gradient(90deg, #ffd700 60%, #fffbe6 100%); */
    color: #d4af37;
    font-weight: bold;
    border-radius: 18px;
    padding: 0.35em 1em;
    /* margin-left: 0.5em; */
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(124, 92, 0, 0.08);
    letter-spacing: 0.5px;
    vertical-align: middle;
    border: 1px solid #d4af37;
    transition: background 0.2s, color 0.2s;
}

/* Student points badge style (dark mode) */
body.dark-mode .student-points,
body.dark-mode .student-points-side {
    background: #44402a;
    color: rgb(255, 224, 102);
    box-shadow: rgba(255, 224, 102, 0.08) 0px 2px 8px;
    border: 1px solid rgba(255, 224, 102, 0.2);
}

@media (max-width: 768px) {
    .student-points {
        display: none;
    }

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

.plans-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #243a6b 0%, #1a2a4a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

body.dark-mode .plans-section {
    background: linear-gradient(135deg, #0f1419 0%, #1a1a1a 100%);
}

.plans-section .section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #d4af37;
    position: relative;
    z-index: 2;
}

.plans-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.plan-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 24px rgba(124, 92, 0, 0.1);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    width: 320px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;

    /* padding: 2rem; */
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px rgba(124, 92, 0, 0.18);
}

.plan-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.plan-sub {
    font-size: 0.95em;
    color: #bfa600;
    display: block;
    margin-top: 0.2em;
}

.plan-price {
    font-size: 1.5rem;
    color: #bfa600;
    font-weight: bold;
    margin-bottom: 1rem;
}

.plan-details {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    width: 100%;
}

.plan-details li {
    margin-bottom: 0.7em;
    font-size: 1.05em;
    position: relative;
    padding-left: 1.2em;
}

.plan-details li::before {
    content: "✔";
    color: #bfa600;
    position: absolute;
    left: 0;
    font-size: 1em;
}

.plan-btn {
    background: #607d8b;
    color: #fffcf4;
    border: none;
    border-radius: 12px;
    padding: 0.7em 2em;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: auto;
}

.plan-btn:hover {
}

.plans-note {
    margin-top: 2rem;
    text-align: center;
    color: #7c5c00;
    font-size: 1.05em;
}

body.dark-mode .plan-card {
    background: rgba(58, 58, 58, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
}

body.dark-mode .plan-card h3,
body.dark-mode .plan-details,
body.dark-mode .plans-note {
    color: #ffe066;
}

body.dark-mode .plan-price {
    color: #ffe066;
}

body.dark-mode .plan-btn {
    background: #0d0d0691;
    color: #e8d898;
}

body.dark-mode .plan-btn:hover {
    background: #ffe066;
    color: #44402a;
}

@media (max-width: 900px) {
    .plans-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .plan-card {
        width: 95%;
        max-width: 400px;
    }
}

.lectures-left-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #f5deb3;
    transition: all 0.3s ease;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    min-width: 260px;
    max-width: 320px;
    flex: 0 0 260px;
}


.lectures-left-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #d4af37;
}

.lectures-left-section::before {
    content: '𓂀';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1rem;
    color: #d4af37;
    opacity: 0.7;
}

body.dark-mode .lectures-left-section {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e7eef8;
    /* box-shadow: 0 8px 25px rgba(212, 175, 55, 0.10); */
}


/* Indicator styling (keep as is, matches stat-card) */
.lectures-left-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
    margin: 1.2em 0 0.5em 0;
    flex-wrap: wrap;
}

.lectures-left-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d4af37;
    background: #e7e4d4;
    border-radius: 12px;
    padding: 0.2em 0.8em;
    /* box-shadow: 0 1px 6px rgba(124, 92, 0, 0.08); */
}

body.dark-mode .lectures-left-number {
    background: #0000003d;
    color: #d4af37;
}

.lectures-left-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

body.dark-mode .lectures-left-label {
    color: #666;

}

.lectures-left-note {
    margin-top: 1em;
    color: #7c5c00;
    font-size: 1em;
}

body.dark-mode .lectures-left-note {
    color: #ffe066;
}

.lectures-left .title {
    color: #243a6b;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

body.dark-mode .lectures-left .title {
    color: #dbe9fb;
}

.circle-progress-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 1em auto 0.5em auto;
}

.circle-progress {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: #eee2b7;
    stroke-width: 12;
}

.circle-bar {
    fill: none;
    stroke: #395eb1e6;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 408.4;
    /* 2 * PI * 65 */
    stroke-dashoffset: 408.4;
    transition: stroke-dashoffset 1s ease;
}

.circle-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 18px;
    font-weight: bold;
    color: #565656;
    text-align: center;
    width: 100%;
}

.circle-progress-label {
    font-size: 0.9em;
    color: #565656;
    font-weight: normal;
}

body.dark-mode .circle-bg {
    stroke: #2d2d2d;
}

body.dark-mode .circle-bar {
    stroke: #ffe066;
}

body.dark-mode .circle-progress-text,
body.dark-mode .circle-progress-label {
    color: #ffe066;
}

.lectures-left .contain {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    padding-top: 5px;
    scroll-behavior: smooth;
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;

}



.lectures-left .contain::-webkit-scrollbar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 8px;
}

.lectures-left .contain::-webkit-scrollbar-thumb {
    background: #243a6bd9;
    border-radius: 8px;
}

body.dark-mode .lectures-left .contain::-webkit-scrollbar {
    height: 8px;
    background: #f5deb3;
    border-radius: 8px;
}

body.dark-mode .lectures-left .contain::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 8px;
}

.reply-box {
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #4a90e2;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 0.9em;
    /* color: #555; */
    cursor: pointer;
}

.user-message .reply-box {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #2c7be5;
}

.profile-btns {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 400px) {
    .profile-btns {
        flex-direction: column;
        align-items: center;
    }
}


.reply-preview {
    display: flex;
    align-items: center;
    background: #fffbe6;
    border-left: 4px solid #ffd700;
    border-radius: 8px;
    padding: 0.6em 1em;
    margin-bottom: 0.6em;
    font-size: 1em;
    box-shadow: 0 2px 8px rgba(124, 92, 0, 0.06);
    color: #7c5c00;
    position: relative;
    max-width: 95%;
    word-break: break-word;
    transition: background 0.2s;
}

.reply-preview #replyAuthor {
    font-weight: bold;
    color: #bfa600;
    margin-right: 0.3em;
}

.reply-preview #replyText {
    color: #243a6b;
}

.reply-preview button {
    background: none;
    border: none;
    color: #bfa600;
    font-size: 1.1em;
    margin-left: auto;
    cursor: pointer;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    transition: background 0.15s;
}

.reply-preview button:hover {
    background: #ffe066;
    color: #7c5c00;
}

body.dark-mode .reply-preview {
    background: #23210f;
    border-left: 4px solid #ffe066;
    color: #ffe066;
    box-shadow: 0 2px 8px rgba(255, 224, 102, 0.06);
}

body.dark-mode .reply-preview #replyAuthor {
    color: #ffe066;
}

body.dark-mode .reply-preview #replyText {
    color: #ffe066;
}

body.dark-mode .reply-preview button {
    color: #ffe066;
}

body.dark-mode .reply-preview button:hover {
    background: #44402a;
    color: #ffd700;
}
