/* --- Light Mode Specific Colors and Styles --- */
body.light-theme {
    --bg-black: #ffffff; /* خلفية بيضاء ناصعة */
    --text-white: #212529; /* نص داكن جداً */
    --text-gray: #495057; /* نص رمادي متوسط */
    --glass: rgba(255, 255, 255, 0.8); /* خلفية زجاجية فاتحة */
    --glass-border: rgba(0, 0, 0, 0.1); /* حدود داكنة خفيفة */

    /* Adjust primary and accent for light mode for better contrast */
    --primary: #007bff; /* A standard blue that works well on light backgrounds */
    --primary-dim: rgba(0, 123, 255, 0.15); /* Adjusted dim for new primary */
    --primary-glow: rgba(0, 123, 255, 0.3); /* Adjusted glow for new primary */
    --secondary: #6f42c1; /* A purple that works well on light backgrounds */
    --accent: #fd7e14; /* An orange that works well on light backgrounds */

    /* ألوان خاصة لعناصر معينة في النمط الفاتح */
    --contact-card-bg-start: #e9ecef; /* بداية تدرج بطاقة الاتصال */
    --contact-card-bg-end: #f8f9fa; /* نهاية تدرج بطاقة الاتصال */
}

/* تعديلات خاصة لبعض العناصر في النمط الفاتح */
body.light-theme .contact-card-premium {
    background: linear-gradient(145deg, var(--contact-card-bg-start) 0%, var(--contact-card-bg-end) 100%);
}

body.light-theme .terminal-window {
    background: #f0f2f5; /* خلفية فاتحة لنافذة الأوامر */
    border-color: rgba(0,0,0,0.1);
}
body.light-theme .terminal-header {
    background: #e9ecef;
    border-color: rgba(0,0,0,0.1);
}
body.light-theme .t-output {
    color: #343a40; /* نص داكن لمخرجات الأوامر */
}
body.light-theme .t-input {
    color: #212529; /* نص داكن لمدخلات الأوامر */
}
body.light-theme .t-prompt {
    color: var(--primary); /* لون أساسي للموجه */
}
body.light-theme .t-keyword {
    color: var(--primary); /* لون أساسي للكلمات المفتاحية */
}

body.light-theme .toast {
    background: rgba(255, 255, 255, 0.9); /* خلفية فاتحة للإشعارات */
    border-color: rgba(0,0,0,0.1);
    border-left-color: var(--primary);
}
body.light-theme .toast-title {
    color: var(--text-white);
}
body.light-theme .toast-msg {
    color: var(--text-gray);
}

body.light-theme .preloader {
    background: #ffffff; /* خلفية فاتحة للـ Preloader */
}
body.light-theme .loader-text {
    color: #212529; /* نص داكن للـ Preloader */
}

/* تعديل ألوان الخريطة لتناسب النمط الفاتح */
body.light-theme .leaflet-container {
    background: #f0f2f5 !important;
}

body.light-theme .leaflet-bar a {
    background-color: #e9ecef !important;
    color: var(--primary) !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
}

/* Autofill fix for light mode */
body.light-theme .field-v3 input:-webkit-autofill,
body.light-theme .field-v3 input:-webkit-autofill:hover,
body.light-theme .field-v3 input:-webkit-autofill:focus,
body.light-theme .field-v3 textarea:-webkit-autofill,
body.light-theme .field-v3 textarea:-webkit-autofill:hover,
body.light-theme .field-v3 textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-white) !important; /* لون النص الداكن */
    -webkit-box-shadow: 0 0 0px 1000px var(--glass) inset !important; /* خلفية شفافة فاتحة */
}

/* Adjust floating card text and background color for light mode */
body.light-theme .floating-card {
    background: #ffffff !important; /* خلفية بيضاء صلبة لبطاقات floating-card في وضع الشمس */
    border-color: rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

body.light-theme .floating-card span {
    color: #000000 !important; /* لون نص أسود لبطاقات floating-card في وضع الشمس */
}

/* Adjust "Get in Touch" button for light mode */
body.light-theme .btn-premium {
    background: #ffffff !important; /* خلفية بيضاء للزر */
    color: #000000 !important; /* نص أسود للزر */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

/* Adjust sticky header for light mode */
body.light-theme .header.sticky {
    background: rgba(255, 255, 255, 0.85) !important; /* خلفية بيضاء شفافة */
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

/* Adjust navbar links for light mode (ensure they are readable) */
body.light-theme .navbar a {
    color: var(--text-gray) !important; /* استخدام لون النص الرمادي الداكن المحدد لوضع الإضاءة */
}

body.light-theme .navbar a:hover,
body.light-theme .navbar a.active {
    color: var(--primary) !important; /* لون أساسي لوضع الإضاءة عند التحويم/النشاط */
}

/* Adjust active navbar background for light mode */
body.light-theme .navbar.active {
    background: var(--bg-black) !important; /* خلفية بيضاء صلبة لشريط التنقل النشط في الوضع الفاتح */
    backdrop-filter: blur(10px) !important; /* يمكن إضافة تمويه خفيف إذا كان مرغوبًا */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}


/* Adjust map container and overlay for light mode */
body.light-theme #map-container {
    background: #ffffff !important; /* خلفية بيضاء للخريطة */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

body.light-theme .map-overlay-info {
    background: rgba(255, 255, 255, 0.9) !important; /* خلفية بيضاء شفافة للتراكب */
    color: #000000 !important; /* نص أسود للتراكب */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

/* Adjust custom context menu for light mode */
body.light-theme .custom-context-menu {
    background: rgba(255, 255, 255, 0.9) !important; /* خلفية بيضاء شفافة */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important; /* ظل فاتح */
}

body.light-theme .custom-context-menu .menu-item {
    color: #495057 !important; /* نص رمادي داكن */
}

body.light-theme .custom-context-menu .menu-item:hover {
    background: rgba(0, 123, 255, 0.1) !important; /* خلفية زرقاء فاتحة عند التحويم */
    color: #007bff !important; /* نص أزرق */
}

body.light-theme .custom-context-menu .menu-divider {
    background: rgba(0, 0, 0, 0.1) !important; /* فاصل رمادي فاتح */
}

/* Lab Modal Light Mode Styles */
body.light-theme .lab-modal .lab-content {
    background: #ffffff !important; /* خلفية بيضاء */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1) !important; /* ظل فاتح */
}

body.light-theme .lab-modal .lab-header h3 {
    color: #212529 !important; /* نص داكن */
}

body.light-theme .lab-modal .lab-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

body.light-theme .lab-modal .close-lab {
    color: #495057 !important; /* نص رمادي داكن */
}

body.light-theme .lab-modal .close-lab:hover {
    color: var(--primary) !important; /* لون أساسي عند التحويم */
}

body.light-theme .lab-modal .lab-item-premium {
    background: #f8f9fa !important; /* خلفية فاتحة للعنصر */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important; /* ظل فاتح */
}

body.light-theme .lab-modal .lab-item-premium:hover {
    background: rgba(0, 123, 255, 0.05) !important; /* خلفية زرقاء فاتحة عند التحويم */
    border-color: var(--primary) !important; /* حدود بلون أساسي */
}

body.light-theme .lab-modal .lab-item-premium .lab-icon {
    color: var(--primary) !important; /* لون أساسي للأيقونة */
}

body.light-theme .lab-modal .lab-item-premium h4 {
    color: #212529 !important; /* نص داكن */
}

body.light-theme .lab-modal .lab-item-premium p {
    color: #495057 !important; /* نص رمادي داكن */
}

/* Terminal Light Mode Styles */
body.light-theme .terminal-toggle {
    background: #ffffff !important; /* خلفية بيضاء */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
    color: #212529 !important; /* نص داكن */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* ظل فاتح */
}

body.light-theme .terminal-toggle:hover {
    background: var(--primary) !important; /* لون أساسي عند التحويم */
    color: #ffffff !important; /* نص أبيض */
}

body.light-theme .terminal-window {
    background: #f0f2f5 !important; /* خلفية فاتحة */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.1) !important; /* ظل فاتح */
}

body.light-theme .terminal-window::before {
    /* Remove or lighten the matrix effect for light mode */
    background: none !important; /* إزالة تأثير خطوط المسح */
}

body.light-theme .terminal-header {
    background: #e9ecef !important; /* خلفية فاتحة */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; /* حدود فاتحة */
}

body.light-theme .t-title {
    color: #6c757d !important; /* نص رمادي */
}

body.light-theme .terminal-body {
    color: #343a40 !important; /* نص داكن */
}

body.light-theme .terminal-body::-webkit-scrollbar-thumb {
    background: #adb5bd !important; /* مقبض شريط تمرير رمادي فاتح */
}

body.light-theme .t-prompt {
    color: var(--primary) !important; /* لون أساسي */
}

body.light-theme .t-input {
    color: #212529 !important; /* نص داكن */
}

body.light-theme .t-output {
    color: #495057 !important; /* نص رمادي داكن */
}

body.light-theme .t-keyword {
    color: var(--primary) !important; /* لون أساسي */
}