﻿/* dark-mode.css - النسخة النهائية الكاملة بعد التصحيح الأخير */

/* تفعيل الوضع الداكن عند إضافة class="dark" على body */
body.dark {
    /* المتغيرات الأساسية للوضع الداكن */
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --background: #111827;
    --background-light: #1f2937;
    --text: #f3f4f6;
    --text-light: #9ca3af;
    --border: #374151;
    --card-bg: #1f2937;
}

    /* Default.aspx */
    body.dark .hero {
        background: var(--background-light);
    }

    body.dark .card {
        background: var(--card-bg);
        border-color: var(--border);
    }

    body.dark .hero-title .name {
        background: linear-gradient(135deg, #60a5fa, #93c5fd);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    body.dark .section-title,
    body.dark .card-title,
    body.dark .card-text {
        color: var(--text);
    }

    body.dark .cta-section {
        background: linear-gradient(135deg, var(--primary-dark), #1e293b);
    }

    body.dark .btn-light {
        background: var(--card-bg);
        color: var(--primary);
    }

    body.dark .btn-outline-light {
        color: var(--text-light);
        border-color: var(--text-light);
    }

        body.dark .btn-outline-light:hover {
            background: var(--text-light);
            color: var(--background);
        }

/* fm_lesson.aspx - الخلفية في الوضع الفاتح (بدون خلفية) */
.main-lesson {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: start;
    justify-content: center;
    background: #f9fafb; /* لون خلفية فاتح فقط بدون صورة أو تدرج */
}

/* fm_lesson.aspx - الخلفية في الوضع الداكن فقط */
body.dark .main-lesson {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-image: url(../images/sky2.png), linear-gradient(360deg, #084f8e, #083466 0%);
    background-color: #f9fafb;
    background-size: 40%;
}

/* باقي عناصر fm_lesson.aspx في الوضع الداكن */
body.dark .sidebar-contents,
body.dark .main-content-lesson {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

body.dark .accordion-button {
    background: var(--card-bg);
    color: var(--text);
}

    body.dark .accordion-button:not(.collapsed) {
        background: var(--primary);
        color: white;
    }

/* تصحيح list-group-item في الوضع الداكن */
body.dark #accordionUnits .list-group-item {
    background: #2d3748 !important;
    border-color: #4b5563 !important;
    color: #e2e8f0 !important;
}

    /* Hover على list-group-item في الوضع الداكن */
    body.dark #accordionUnits .list-group-item:hover {
        background: #374151 !important;
        color: #60a5fa !important;
        border-color: #60a5fa !important;
        transform: translateX(4px);
    }

    /* العنصر المختار (selected-item) في الوضع الداكن */
    body.dark #accordionUnits .list-group-item.selected-item {
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }

/* تغيير لون fill للـ SVG داخل list-group-icon في الوضع الداكن */
body.dark .list-group-icon svg {
    fill: #60a5fa !important;
}

/* Hover على الـ SVG عند hover على العنصر */
body.dark #accordionUnits .list-group-item:hover .list-group-icon svg {
    fill: #60a5fa !important;
}

/* للعنصر المختار */
body.dark #accordionUnits .list-group-item.selected-item .list-group-icon svg {
    fill: #60a5fa !important;
}

body.dark .playerbartitle h2 {
    color: var(--text);
}

    body.dark .playerbartitle h2::before {
        background: var(--primary);
    }

body.dark .btn-secondarye {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

body.dark .list-item-with-circle a {
    color: var(--text);
}

    body.dark .list-item-with-circle a:hover {
        color: var(--primary);
    }

/* fm_profile.aspx */
body.dark .profile-main-container {
    background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
}

body.dark .profile-header,
body.dark .card-profile {
    background: rgba(31, 41, 55, 0.8);
    border-color: var(--border);
}

body.dark .profile-title,
body.dark .card-title {
    color: var(--text);
}

body.dark .name-text,
body.dark .info-label {
    color: var(--text-light);
}

body.dark .status-badge {
    opacity: 0.9;
}

/* النافبار والعناصر العامة */
body.dark header {
    background-color: #1e293b;
}

body.dark .navigation a {
    color: #cbd5e1;
}

    body.dark .navigation a:hover,
    body.dark .navigation a:focus {
        color: white;
    }

body.dark .logo {
    color: #60a5fa;
}

/* تصحيح قائمة الهامبرغر في الوضع الداكن */
body.dark .navigation {
    background: #1f2937 !important;
}

    body.dark .navigation a {
        color: #cbd5e1 !important;
    }

        body.dark .navigation a:hover {
            background: #374151 !important;
            color: white !important;
        }

/* خطوط الهامبرغر في الوضع الداكن */
body.dark .hamburger-icon span {
    background-color: #cbd5e1 !important;
}

body.dark .hamburger-icon.active span {
    background-color: white !important;
}

/* Dropdown Menu (القائمة المنسدلة في النافبار) */
body.dark .dropdown-menu {
    background: #1f2937;
    border-color: #374151;
}

body.dark .dropdown-item {
    color: #cbd5e1;
}

    body.dark .dropdown-item:hover,
    body.dark .dropdown-item:focus {
        background: #374151;
        color: white;
    }

body.dark .dropdown-divider {
    border-color: #374151;
}

body.dark .course-link {
    color: #60a5fa !important;
}

    body.dark .course-link:hover {
        color: white !important;
        background: #374151;
    }

/* تصحيح زر Dropdown الخاص بـ Profile في الوضع الداكن */
body.dark .btn-secondary.dropdown-toggle {
    background-color: #374151 !important;
    color: #cbd5e1 !important;
    border: none !important;
}

    body.dark .btn-secondary.dropdown-toggle:hover,
    body.dark .btn-secondary.dropdown-toggle:focus {
        background-color: #4b5563 !important;
        color: white !important;
    }

    body.dark .btn-secondary.dropdown-toggle svg {
        stroke: #cbd5e1 !important;
    }

    body.dark .btn-secondary.dropdown-toggle:hover svg,
    body.dark .btn-secondary.dropdown-toggle:focus svg {
        stroke: white !important;
    }

/* إخفاء السهم في زر Dropdown الخاص بـ Profile */
.dropdown-toggle svg {
    display: none;
}

/* تصحيح الوضع الداكن لصفحات Auth (signup, login, recovery) */
body.dark .auth-container {
    background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
}

body.dark .auth-content {
    background: transparent;
    box-shadow: none;
}

body.dark .auth-branding {
    background: linear-gradient(135deg, #1e40af 0%, #1e293b 100%);
}

body.dark .auth-form-container {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark .form-input {
    background: rgba(55, 65, 81, 0.8);
    border-color: #4b5563;
    color: #f3f4f6;
}

    body.dark .form-input::placeholder {
        color: #9ca3af;
    }

    body.dark .form-input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
        background: rgba(55, 65, 81, 1);
    }

body.dark .input-suffix {
    color: #9ca3af;
}

body.dark .toggle-password {
    color: #9ca3af;
}

    body.dark .toggle-password:hover {
        color: #60a5fa;
    }

body.dark .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

body.dark .auth-redirect a {
    color: #60a5fa;
}

    body.dark .auth-redirect a:hover {
        color: #93c5fd;
    }

body.dark .brand-subtitle,
body.dark .brand-features .feature {
    color: #cbd5e1;
}

/* تأثيرات دوائر الخلفية في الوضع الداكن */
body.dark .floating-element {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}

/* Footer في الوضع الداكن */
body.dark footer {
    background: #111827;
    border-top-color: #374151;
}

body.dark .footer-heading,
body.dark .footer-link,
body.dark .footer-contact,
body.dark .footer-copyright {
    color: #cbd5e1;
}

    body.dark .footer-link:hover {
        color: var(--primary);
    }

.desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

/* جعل زر الوضع الداكن داخل القائمة متناسقاً على الموبايل */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 89%;
        justify-content: center;
        margin: 1rem 0 0.5rem 0;
    }

    .dark-mode-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.3);
    }

    body.dark .dark-mode-btn {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(96, 165, 250, 0.5);
    }

    .dark-mode-btn:hover {
        background: var(--primary) !important;
        border-color: var(--primary) !important;
        color: white !important;
    }
}


