/*
  Abqarieno Platform Stylesheet
  Version: 2.5
  Author: Dr. Abdullah & Development Team
*/
/* style.css - ملف التصميم لكل الصفحات */

:root {
    --bg-color: #020204; /* عمق أكثر للسواد */
    --card-bg: #0f111a; /* لون مغاير للخلفية للحاويات */
    --neon-green: #00ff41;
    --neon-red: #ff0000;
    --neon-gold: #ffd700;
    --cute-pink: #ff85a2;
    --cute-rose: #ff4d6d;
    --cute-gradient: linear-gradient(135deg, #ff85a2, #ff4d6d);
    --text-white: #ffffff;
    --text-gray: #a0aec0; /* تفتيح الرمادي للوضوح */
    --border-color: rgba(255, 255, 255, 0.12); /* حدود واضحة في الظلام */
    /* Gemini Colors */
    --gemini-blue: #4285f4;
    --gemini-purple: #9b72f3;
    --gemini-pink: #d96570;
    --gemini-gradient: linear-gradient(135deg, #4285f4, #9b72f3, #d96570);
    /* Google Colors */
    --google-blue: #4285F4;
    --google-red: #EA4335;
    --google-yellow: #FBBC05;
    --google-green: #34A853;
}

/* إعدادات الوضع النهاري (Light Mode) */
body.light-mode {
    --bg-color: #f8fafc; 
    --card-bg: #ffffff;
    --text-white: #111111;
    --text-gray: #4a5568;
    --border-color: #cbd5e0; /* حدود أغمق قليلاً للوضوح */
}

/* إعدادات وضع القراءة المريح (Sepia Mode) */ 
body.sepia-mode {
    --bg-color: #f5e6d3;
    --card-bg: #fffdf5; 
    --text-white: #2d2418;
    --text-gray: #5d4d3b; 
    --border-color: #cbbba0;
    --neon-green: #2e8b57; /* أخضر داكن مريح */
    --neon-red: #c0392b; 
    --neon-gold: #d35400;
}
body.sepia-mode .navbar { background-color: rgba(245, 230, 211, 0.95); border-bottom: 1px solid #dccfb6; }
body.sepia-mode .admin-sidebar { background-color: #efe3d0; border-left: 1px solid #dccfb6; }
body.sepia-mode .admin-content { background: #f5e6d3; }
body.sepia-mode .question-item { background: #fffdf5; border-color: #dccfb6; }
body.sepia-mode .q-textarea { background: #fffdf5; color: #433422; border-color: #dccfb6; }

@keyframes kenburns-blur {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% { /* تحسين الحركة لتكون أخف على الموبايل */
        transform: scale(1.01);
    }
}

/* تحسين أداء السكرول العالمي */
html { scroll-behavior: smooth; }

/* --- Base & Reset --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
}

body, button, input, textarea, select {
    font-family: 'Cairo', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body { /* إضافة html هنا لضمان تطبيق overflow-x على كامل الصفحة */
    overflow-x: hidden; /* منع أي تجاوز أفقي */
    width: 100%; /* ضمان أن الصفحة تأخذ العرض الكامل */
}

/* تحسينات شاملة لأداء الصور والسرعة */
img {
    max-width: 100%;
    height: auto;
    display: block;
    content-visibility: auto; /* تحسين سرعة الرسم في المتصفح */
    image-rendering: -webkit-optimize-contrast; /* زيادة حدة الصور */
}

/* تأثير التحميل الذكي (Shimmer) للصور لزيادة الإحساس بالسرعة */
.doctor-img, .book-img img, .msg-media-img {
    background: linear-gradient(90deg, var(--card-bg) 25%, #1a1d27 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: image-loading-shimmer 2s infinite linear;
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-white); 
    direction: rtl;
    position: relative;
    padding-top: 75px; /* حجز مساحة للهيدر الثابت لضمان عدم تداخل المحتوى */
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #020204; /* لون خلفية ثابت وسريع بدلاً من الصورة المفقودة */
    z-index: -1;
    pointer-events: none;
    /* تحسين: إيقاف الأنيميشن الثقيل في الخلفية لزيادة سرعة الموبايل */
    transform: translateZ(0); 
    backface-visibility: hidden;
}

@keyframes image-loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* إلغاء الإطار الأزرق عند التركيز */
a:focus, button:focus, input:focus, textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center; /* توحيد المحاذاة الرأسية لجميع العناصر */
    padding: 12px 5%; /* زيادة بسيطة في الحشو للثبات */
    background-color: rgba(5, 5, 8, 0.95); /* خلفية داكنة وأقوى */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* حد سفلي أدق وأرقى */
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999; /* قيمة عالية جداً ليبقى فوق كل شيء */
    transition: background-color 0.3s ease;
}
body.light-mode .navbar { background-color: rgba(255, 255, 255, 0.85); border-bottom: 1px solid #ddd; }
.navbar:hover {
    background-color: rgba(10, 10, 15, 0.9);
}
body.light-mode .navbar:hover { background-color: rgba(255, 255, 255, 0.95); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo i { border: 1px solid rgba(255, 0, 0, 0.6); padding: 8px; border-radius: 50%; color: var(--text-white); animation: heartBeat 2.5s infinite; box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); transition: 0.3s; }
.logo:hover i {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--neon-red);
}
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.logo-text span { 
    font-weight: 700;
    display: block; 
    line-height: 1.2;
    font-size: 1.1rem; /* تكبير بسيط ليتناسب مع الخط الكوفي */
    font-family: 'Reem Kufi', sans-serif; /* تغيير الخط للخط الكوفي */
    color: var(--text-white);
}
.logo-text small { 
    color: var(--neon-green); 
    font-size: 0.8rem; /* تقريب الحجم من النص الرئيسي */
    letter-spacing: 0.5px; 
    text-shadow: 0 0 5px var(--neon-green);
    font-family: 'Cairo', sans-serif;
}

.nav-links { display: flex; gap: 30px; }
.nav-links a { 
    font-weight: 700; 
    color: var(--text-gray); 
    position: relative; 
    padding: 5px 0; 
    font-size: 1rem; /* نفس حجم نص اللوجو */
    font-family: 'Cairo', sans-serif;
}
.nav-links a.active { color: var(--text-white); text-shadow: 0 0 5px var(--neon-green); }
.nav-links a:hover { color: var(--text-white); }

/* زر الانضمام الاحترافي المطور (Ultra Pro) */
.nav-login-btn {
    background: linear-gradient(135deg, #00ff41, #00d2ff);
    color: #000 !important;
    padding: 10px 25px;
    border-radius: 50px; /* شكل كبسولة احترافي */
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.nav-login-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: 0.5s;
}
.nav-login-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
}
.nav-login-btn:hover::before { left: 100%; }
.nav-login-btn i { font-size: 1rem; }

/* تأثير التوهج للفت الانتباه عند الحاجة للتسجيل */
.login-glow-trigger {
    animation: login-attention 0.5s ease-in-out 4 !important; /* 0.5 * 4 = 2 seconds */
}
@keyframes login-attention {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 50px rgba(0, 255, 65, 1), 0 0 20px #fff; transform: scale(1.15); }
}

/* الأيقونة المتطايرة (Floating AI Widget) */
.ai-floating-widget {
    position: fixed;
    bottom: 40px; /* رفع الأيقونة قليلاً */
    left: 30px; /* تظهر في اليسار لتجنب تعارضها مع أزرار الموبايل الشائعة في اليمين */
    width: 55px; 
    height: 55px;
    background: radial-gradient(circle at top left, #1a1a1a, #000);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2147483647; /* أعلى قيمة ممكنة لضمان البقاء فوق الفوتر وكل العناصر */
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.2);
    border: 2px solid var(--neon-gold);
    animation: ai-hover-bounce 4s ease-in-out infinite;
    transition: 0.3s;
    text-decoration: none !important;
    backdrop-filter: blur(5px);
}
/* تأثير النبض الخارق خلف الروبوت */
.ai-floating-widget::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
    animation: ai-pulse-aura 2s infinite; 
    pointer-events: none;
    border: 1px solid var(--neon-gold);
}
@keyframes ai-pulse-aura {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.7); opacity: 0; }
}

.ai-floating-widget:hover { 
    transform: scale(1.1) rotate(5deg); 
    transform: scale(1.08) rotate(5deg); 
    box-shadow: 0 0 30px var(--neon-gold); 
}

.ai-3d-black-icon {
    font-size: 1.3rem;
    color: #050505;
    /* تأثير الـ 3D للأيقونة السوداء */
    filter: drop-shadow(1px 1px 0px #444) 
            drop-shadow(2px 2px 1px rgba(0,0,0,0.8));
    margin-bottom: 1px;
    transition: 0.3s;
}

.ai-floating-widget:hover .ai-3d-black-icon {
    filter: drop-shadow(0 0 8px var(--neon-gold));
}

.ai-text-kufi {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    margin-bottom: -5px;
    letter-spacing: 0px;
}

.ai-mini-icon {
    font-size: 0.5rem;
    color: var(--neon-green);
    filter: drop-shadow(0 0 5px var(--neon-green));
    animation: ai-flicker 2s infinite;
}

@keyframes ai-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- حاوية شات عبقرينو الاحترافية --- */
.abqarieno-chat-window {
    position: fixed;
    bottom: 110px; /* رفع النافذة لتبتعد عن حواف الشاشة وأزرار الموبايل */
    left: 20px;
    width: 400px;
    height: 600px;
    max-width: calc(100vw - 40px); /* ضمان عدم الخروج عن الشاشة أفقياً */
    max-height: calc(100vh - 120px); /* ضمان عدم الخروج عن الشاشة رأسياً */
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: none; /* مخفية افتراضياً */
    flex-direction: column;
    z-index: 1000000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: chat-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* وضعية الفتح في منتصف الصفحة (عند الضغط من الهيدر) */
.abqarieno-chat-window.center-mode {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 850px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 0 200vw rgba(0,0,0,0.85), 0 30px 100px rgba(0,0,0,1);
    border-radius: 32px;
    animation: chat-center-entrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.abqarieno-chat-window.active { display: flex; }

@keyframes chat-slide-in {
    from { opacity: 0; transform: translateY(30px) scale(0.9); } /* هذا خاص بوضع الفتح الجانبي */
    to { opacity: 1; transform: translateY(0) scale(1); } /* هذا خاص بوضع الفتح الجانبي */
}

@keyframes chat-center-entrance {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.chat-header-pro {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* زر الإغلاق الاحترافي */
.chat-close-btn-pro {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-secondary);
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* New CSS for Clear History Button */
.chat-clear-history-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chat-clear-history-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: var(--neon-red);
    border-color: var(--neon-red);
}

.chat-close-btn-pro:hover {
    background: var(--neon-red);
    color: white;
    transform: rotate(90deg);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px var(--neon-red);
}

.chat-header-pro .info { display: flex; align-items: center; gap: 12px; }
.chat-header-pro .logo-mini {
    width: 35px; height: 35px;
    background: var(--neon-gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #000; font-size: 1.1rem;
}

#ai-chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-gold) transparent;
}
#ai-chat-box::-webkit-scrollbar { width: 5px; }
#ai-chat-box::-webkit-scrollbar-thumb { background: var(--neon-gold); border-radius: 10px; }

.ai-msg, .user-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
    word-break: break-word;
}

.ai-msg {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 25px 25px 25px 8px;
    color: #f0f0f0;
    transition: all 0.3s ease;
}

/* تأثير الشيمر (Gemini Loading Style) */
.ai-msg.thinking {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer-load 1.5s infinite;
}

@keyframes shimmer-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* تنسيقات Markdown داخل الرسائل */
.ai-msg strong { color: var(--neon-gold); }
.ai-msg ul, .ai-msg ol { padding-right: 20px; margin: 10px 0; }
.ai-msg li { margin-bottom: 5px; color: #ddd; }
.ai-msg h1, .ai-msg h2 { 
    color: var(--neon-red); 
    font-family: 'Reem Kufi', sans-serif; 
    margin: 20px 0 10px;
    border-bottom: 1px solid rgba(255, 0, 60, 0.2);
    padding-bottom: 5px;
    font-size: 1.4rem;
}

.ai-msg h3 {
    color: var(--neon-green);
    font-family: 'Reem Kufi', sans-serif;
    margin: 15px 0 8px;
    font-size: 1.15rem;
}

/* ميزة زر النسخ الاحترافي */
.copy-btn-ai {
    position: absolute;
    bottom: -25px;
    right: 5px;
    background: transparent;
    border: none;
    color: var(--admin-text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.copy-btn-ai:hover { color: var(--neon-gold); }

.user-msg {
    align-self: flex-end;
    background: linear-gradient(135deg, #00ff88, #00bd68);
    color: #000;
    font-weight: 800;
    border-radius: 25px 25px 8px 25px;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

.ai-input-area {
    padding: 12px 15px;
    background: rgba(5, 7, 12, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 15px;
    color: #fff;
    outline: none;
    transition: 0.3s;
    font-size: 1rem;
}
.ai-input-area input:focus { 
    border-color: var(--neon-green); 
    background: rgba(255, 255, 255, 0.05);
}

.ai-send-btn {
    background: var(--neon-gold);
    border: none;
    width: 38px; height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #000; transition: 0.3s;
}
.ai-send-btn:hover { transform: scale(1.1); filter: brightness(1.1); }

@media (max-width: 768px) {
    .abqarieno-chat-window {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        height: calc(100% - 100px) !important;
        max-height: calc(100% - 100px) !important;
        bottom: 20px !important;
        left: 10px !important;
        border-radius: 25px !important;
        z-index: 2000000;
    }
    .abqarieno-chat-window.active { animation: chat-mobile-up 0.4s ease forwards; }
    .abqarieno-chat-window.center-mode {
        transform: none;
        animation: chat-mobile-up 0.4s ease forwards;
    }
    .ai-input-area {
        padding-bottom: calc(25px + env(safe-area-inset-bottom, 15px)); /* رفع علبة الإرسال أكثر لتجنب الاختفاء */
    }
    @keyframes chat-mobile-up {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .chat-clear-history-btn { padding: 6px 10px; font-size: 0.7rem; }
    .chat-close-btn-pro { width: 30px; height: 30px; font-size: 1rem; }
}

@keyframes ai-hover-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.nav-links a { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--neon-green);
    transition: width 0.3s ease-out;
    box-shadow: 0 0 8px var(--neon-green);
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 50%;
}
.menu-btn { 
    display: none; 
    font-size: 1.8rem; 
    color: var(--neon-gold); 
    cursor: pointer; 
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s; /* حركة سريعة جداً */
    -webkit-tap-highlight-color: transparent; /* إزالة الضوء الأزرق عند اللمس */
    user-select: none;
}
.menu-btn:active { transform: scale(0.8); color: var(--neon-green); } /* تأثير ضغط قوي */

.btn-main { background: var(--neon-red); color: white; padding: 8px 25px; border-radius: 20px; font-weight: bold; box-shadow: 0 0 10px rgba(255,0,0,0.4); }

.btn-nav-special {
    background: var(--neon-gold);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    font-size: 0.9rem;
    white-space: nowrap;
}
.btn-nav-special:hover {
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 217, 0, 0.63);
}

.page-header { text-align: center; margin: 60px 0 40px; }
.subtitle { color: var(--neon-red); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; font-size: 0.9rem; }
.main-title { font-size: 2.5rem; font-weight: 900; }
.container { width: 92%; max-width: 1300px; margin: 0 auto; padding: clamp(60px, 10vh, 100px) 0; }

.scroll-animate {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    content-visibility: auto; 
    perspective: 1000px;
}
.scroll-animate.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lightSweep {
    0% { left: -150%; }
    25% { left: 100%; }
    100% { left: 100%; }
}

@keyframes heartBeat {
    0%, 28%, 70%, 100% { transform: scale(1); }
    14%, 42% { transform: scale(1.2); }
}


.hero { 
    min-height: auto;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center; text-align: center;
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vh, 50px) 0 clamp(40px, 8vh, 80px);
}
.hero::before {
    display: none;
}
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.particles span {
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    background: rgba(0, 255, 65, 0.15); /* أخضر */
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
    animation: moveParticles 20s linear infinite;
    bottom: -150px;
    border-radius: 50%;
    will-change: transform;
}
.particles span:nth-child(even) {
    background: rgba(0, 210, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}
.particles span:nth-child(1) { left: 25%; width: 40px; height: 40px; animation-delay: 0s; }
.particles span:nth-child(2) { left: 10%; width: 10px; height: 10px; animation-delay: 2s; animation-duration: 12s; }
.particles span:nth-child(3) { left: 70%; width: 10px; height: 10px; animation-delay: 4s; }
.particles span:nth-child(4) { left: 40%; width: 30px; height: 30px; animation-delay: 0s; animation-duration: 18s; }
.particles span:nth-child(5) { left: 65%; width: 10px; height: 10px; animation-delay: 0s; }
.particles span:nth-child(6) { left: 75%; width: 55px; height: 55px; animation-delay: 3s; }
.particles span:nth-child(7) { left: 35%; width: 75px; height: 75px; animation-delay: 7s; }
.particles span:nth-child(8) { left: 50%; width: 12px; height: 12px; animation-delay: 15s; animation-duration: 45s; }
.particles span:nth-child(9) { left: 20%; width: 8px; height: 8px; animation-delay: 2s; animation-duration: 35s; }
.particles span:nth-child(10) { left: 85%; width: 75px; height: 75px; animation-delay: 0s; animation-duration: 11s; }

@keyframes moveParticles {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1.2; margin-bottom: 20px; }
.neon-green-text { color: var(--neon-green); text-shadow: 0 0 20px rgba(0,255,65,0.4); }
.neon-gold-text { color: var(--neon-gold); text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
.hero-desc { max-width: 600px; color: var(--text-gray); margin-bottom: 30px; font-size: 1rem; line-height: 1.6; }

.hero-btns { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap;
}

.btn-green, .btn-gold-3d, .btn-outline {
    min-width: 180px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    top: 0;
    z-index: 1;
    gap: 10px;
}

.btn-green:hover, .btn-gold-3d:hover, .btn-outline:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

.btn-green:active, .btn-gold-3d:active, .btn-outline:active {
    transform: translateY(1px);
    transition: 0.1s;
}

.btn-green { 
    background: var(--neon-green); 
    color: black; 
    box-shadow: 0 10px 25px rgba(0, 255, 65, 0.3);
}

.btn-gold-3d {
    background: var(--neon-gold);
    color: black;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.btn-outline { 
    background: rgba(20, 0, 0, 0.8); 
    border: 2px solid var(--neon-red); 
    color: var(--neon-red); 
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.2);
}

@keyframes rgb-glow-animation {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* --- نظام الأخبار المطور 2028 (العائم) --- */
.news-float-btn {
    position: fixed; top: 100px; right: 20px;
    background: rgba(10, 10, 15, 0.9); border: 1px solid var(--neon-green);
    color: white; padding: 10px 20px; border-radius: 50px;
    cursor: pointer; z-index: 999; display: none; align-items: center; gap: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2); transition: 0.3s;
}
.news-float-btn:hover { transform: scale(1.05); border-color: #fff; }
.news-badge {
    position: absolute; top: -5px; right: -5px; width: 12px; height: 12px;
    background: #ff0000; border-radius: 50%; display: none;
    box-shadow: 0 0 10px #ff0000; animation: pulse-red 1s infinite;
}
.news-badge.active { display: block; }

.news-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.news-modal-overlay.open { opacity: 1; visibility: visible; }
.news-modal {
    background: #0f0f13; width: 90%; max-width: 450px; border-radius: 20px;
    border: 1px solid var(--neon-green); padding: 20px; max-height: 80vh;
    display: flex; flex-direction: column;
}
.news-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.news-list { overflow-y: auto; flex: 1; }
.news-item { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 12px; margin-bottom: 10px; border-right: 3px solid #333; }
.news-item.new { border-right-color: var(--neon-red); background: rgba(255,0,0,0.05); }
.btn-mark-read { background: var(--neon-green); border: none; padding: 10px; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 15px; }

.fire-toast {
    position: fixed; top: 90px; left: 20px; background: #000;
    border: 1px solid #ff4500; border-right: 5px solid #ff4500;
    padding: 15px; border-radius: 12px; z-index: 10001;
    transform: translateX(-150%); transition: 0.5s;
    display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.fire-toast.show { transform: translateX(0); }
.fire-toast img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; }

.btn-green::after, .btn-outline::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 16px; /* match button */
    z-index: -1;
    animation: rgb-glow-animation 4s linear infinite;
}
.btn-green::after {
    box-shadow: 0 10px 25px rgba(0,255,65,0.5);
}
.btn-outline::after {
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.3);
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: right;
}

.grid-container { display: grid; gap: clamp(25px, 4vw, 45px); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-box { 
    position: relative;
    background: rgba(10, 10, 15, 0.94); /* تعتيم أعلى لزيادة الفخامة والثبات والقوة */
    backdrop-filter: blur(10px); /* تقليل حدة الضبابية لزيادة سرعة التمرير */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12); 
    padding: 45px 30px; 
    text-align: center; 
    border-radius: 30px; 
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    content-visibility: auto; /* يحسن سرعة الرسم الأولي للمتصفح */
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.feature-box:hover { 
    transform: translateY(-12px) scale(1.02); 
    border-color: var(--neon-red);
    box-shadow: 0 25px 50px rgba(255, 0, 0, 0.15);
}

.feature-box.green:hover { border-color: var(--neon-green); box-shadow: 0 25px 50px rgba(0, 255, 65, 0.15); }
.feature-box i { font-size: 3rem; margin-bottom: 20px; transition: 0.3s; position: relative; z-index: 2; }
.feature-box:hover i { transform: scale(1.15); }
.feature-box.green i { color: var(--neon-green); }
.feature-box h3 { margin-bottom: 12px; font-weight: 900; font-size: 1.4rem; position: relative; z-index: 2; }
.feature-box p { position: relative; z-index: 2; }

.book-card { background: var(--card-bg); border: 1px solid #222; border-radius: 15px; overflow: hidden; position: relative; }
.book-img { height: 250px; background: #1a1a1a; position: relative; display: flex; align-items: center; justify-content: center; color: #555; }
.book-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 15px; right: 15px; background: var(--neon-red); padding: 5px 10px; border-radius: 15px; font-size: 0.8rem; font-weight: bold; }
.book-info { padding: 20px; }
.book-info h3 { margin-bottom: 10px; }
.book-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
.price { font-size: 1.2rem; font-weight: bold; }
.lock-icon { color: #555; }

.video-card { background: var(--card-bg); border-radius: 15px; overflow: hidden; }
.vid-thumb { height: 220px; background: #222; position: relative; display: flex; align-items: center; justify-content: center; }
.vid-thumb iframe { width: 100%; height: 100%; border: none; }
.play-btn { width: 50px; height: 50px; background: var(--neon-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: black; font-size: 1.2rem; box-shadow: 0 0 15px var(--neon-green); }
.vid-info { padding: 20px; }
.vid-cat { color: var(--neon-green); font-size: 0.8rem; }

/* --- ستايلات النصوص الرفيعة الموحدة للسرعة --- */
.thin-layout { font-weight: 300; }
.thin-layout .main-title { font-weight: 400; font-size: 1.5rem; letter-spacing: 0; }
.thin-layout .subtitle { font-size: 0.7rem; opacity: 0.8; }
.thin-layout .video-card h3 { font-size: 1rem; font-weight: 400; }
.thin-layout .video-card p { font-size: 0.75rem; font-weight: 300; line-height: 1.4; color: #aaa; }
.thin-layout .vid-cat { font-size: 0.65rem; text-transform: uppercase; font-weight: 400; }
/* ------------------------------------------- */

.review-card { background: #080808; border: 1px solid #222; padding: 30px; border-radius: 15px; position: relative; }
.user-head { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.avatar { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: white; }
.stars { color: var(--neon-green); margin-bottom: 15px; }
.review-text { font-style: italic; color: #ccc; line-height: 1.6; }

.contact-wrapper { display: flex; gap: 50px; align-items: center; }
.contact-form { flex: 1.5; background: #0c0c0c; padding: 40px; border-radius: 20px; border: 1px solid #222; }
.form-input { width: 100%; padding: 15px; margin-bottom: 15px; background: #1a1a1a; border: none; border-radius: 8px; color: white; outline: none; }
.form-input:focus { border: 1px solid var(--neon-green); }
.contact-info-side { flex: 1; text-align: right; }
.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; justify-content: flex-end; }
.icon-box { width: 40px; height: 40px; border: 1px solid #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--neon-green); }

.sci-books-hero {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-image: linear-gradient(rgba(2, 2, 2, 0.7), rgba(2, 2, 2, 0.9)), url('https://images.unsplash.com/photo-1530026405186-ed1f139313f8?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.schedule-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    padding: 10px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.schedule-table th, .schedule-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.schedule-table thead th {
    color: var(--neon-green);
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom-width: 2px;
    border-bottom-color: var(--neon-green);
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

.schedule-table tbody tr:hover {
    background-color: #050505;
}

.status-badge { padding: 5px 12px; border-radius: 15px; font-size: 0.8rem; font-weight: bold; color: white; background-color: #444; }
.status-badge.live { background-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red); animation: pulse-live 1.5s infinite; }
.status-badge.upcoming { background-color: var(--neon-gold); color: black; }

@keyframes pulse-live {
    0% { transform: scale(1); box-shadow: 0 0 10px var(--neon-red); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px var(--neon-red); }
    100% { transform: scale(1); box-shadow: 0 0 10px var(--neon-red); }
}
footer {
    background-color: #000;
    padding: 40px 5%;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}
.footer-logo-area {
    flex: 1;
    min-width: 250px;
}
.footer-logo-area .logo {
    margin-bottom: 15px;
}
.footer-logo-area p {
    color: var(--text-gray);
    font-size: 0.9rem;
    max-width: 300px;
}
.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-links a:hover {
    color: var(--neon-green);
}
.footer-socials {
    display: flex;
    gap: 15px;
}
.footer-socials a {
    color: var(--text-gray);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}
.footer-socials a:hover {
    color: var(--neon-green);
    border-color: var(--neon-green);
    transform: translateY(-3px);
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #666;
}
.footer-bottom i {
    color: var(--neon-red);
}

@media (min-width: 769px) {
    .nav-special-mobile {
        display: none;
    }
}

@media (max-width: 992px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .hero-desc { font-size: 0.9rem; padding: 0 20px; line-height: 1.5; }
    .hero-btns { flex-direction: column; width: 100%; padding: 0 20px; align-items: center; }
    .hero-btns > * { width: 100%; max-width: 350px; }
    .btn-green, .btn-outline, .btn-gold-3d { width: 100%; }
    
    .contact-wrapper { flex-direction: column-reverse; }
    .contact-form, .contact-info-side { width: 100%; padding: 20px; }

    .navbar .btn-main, .navbar .btn-nav-special {
        display: none;
    }
    
    .btn-nav-install span {
        display: none;
    }
    .btn-nav-install {
        padding: 8px;
        border-radius: 50%;
        width: 35px; height: 35px; justify-content: center;
    }

    .schedule-container {
        overflow-x: auto;
    }
    .schedule-table {
        min-width: 600px; /* force scroll on small screens */
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .footer-logo-area p {
        margin: 0 auto;
    }
    .footer-links {
        justify-content: center;
    }

    /* Reset mobile styles since it's now inside hero-image */
    .latest-news-strip {
        width: 100%;
        max-width: 100%;
    }
    .news-card {
        max-width: 100%;
    }
    .news-card-content p {
        -webkit-line-clamp: 3; /* Allow more text on mobile */
        min-height: 0;
    }
    
    .menu-btn { display: block; z-index: 1001; }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 20px;
        right: auto;
        width: auto;
        min-width: 200px;
        height: auto;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding: 25px;
        border-radius: 15px;
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid var(--neon-green);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }

    .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }

    .nav-links a {
        font-family: 'Cairo', sans-serif; /* توحيد الخط في الموبايل أيضاً */
        font-size: 1.1rem;
        color: white;
        padding: 5px 10px;
        width: 100%;
        text-align: center;
        border-bottom: none;
        opacity: 0;
    }

    .nav-links a:hover, .nav-links a.active {
        color: var(--neon-green);
        text-shadow: 0 0 15px var(--neon-green);
        border-bottom: none;
    }

    .nav-links.active li a { animation: fadeInUp 0.3s ease-out forwards; }
    .nav-links.active li:nth-child(1) a { animation-delay: 0.05s; }
    .nav-links.active li:nth-child(2) a { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(3) a { animation-delay: 0.15s; }
    .nav-links.active li:nth-child(4) a { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(5) a { animation-delay: 0.25s; }
    .nav-links.active li:nth-child(6) a { animation-delay: 0.3s; }
}

.fire-toast {
    position: fixed; top: 90px; left: 20px;
    background: rgba(15, 5, 5, 0.95);
    border: 1px solid #ff4500;
    border-right: 4px solid #ff4500;
    color: white; padding: 15px 20px; border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.2);
    z-index: 99999; transform: translateX(-200%); 
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex; align-items: center; gap: 15px;
    cursor: pointer; direction: rtl; backdrop-filter: blur(10px);
}
.fire-toast.show { transform: translateX(0); }
.fire-toast i { font-size: 1.8rem; color: #ff4500; animation: flame 1s infinite alternate; filter: drop-shadow(0 0 10px #ff4500); }
.fire-toast h4 { margin: 0; font-size: 0.95rem; color: #fff; font-weight: bold; }
.fire-toast small { color: #aaa; font-size: 0.75rem; }
@keyframes flame { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 20px #ff4500; } }
.fire-toast img {
    width: 45px; height: 45px; object-fit: cover;
    border-radius: 8px; border: 1px solid #ff4500;
    display: none;
}
.fire-toast img.show { display: block; }

.nav-links a[href="contact.html"] { position: relative; }
.nav-links a[href="contact.html"].has-new::before {
    content: ''; position: absolute; top: 0px; right: -5px;
    width: 8px; height: 8px; background: #ff0000; border-radius: 50%;
    box-shadow: 0 0 10px #ff0000; animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } }
.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    gap: clamp(40px, 8vw, 100px);
    z-index: 2;
    padding-top: 0;
}

.hero-image {
    flex: 0 0 auto; /* منع الحاوية من التمدد العشوائي */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 450px;
    height: auto;
    flex-direction: column;
    gap: 0;
    z-index: 1;
    
    /* --- New Container Styles --- */
    padding: 3px; /* سمك الشعاع الدوار */
    border-radius: 30px; /* حواف ناعمة بدلاً من الشكل العشوائي للحفاظ على الصورة */
    transition: all 0.5s ease;
    overflow: hidden; /* لإخفاء أجزاء الشعاع الدوار */
    background: rgba(255, 255, 255, 0.02); /* خلفية خفيفة جداً */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero-image:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    transform: translateY(-5px);
}

/* الشعاع الدوار (الذيل المضيء القصير) */
.hero-image::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 150%; /* تقليل الحجم لتحسين أداء الرندر */
    aspect-ratio: 1 / 1; /* إجبار العنصر على أن يكون مربعاً لضمان دوران مركزي دقيق */
    background: conic-gradient(
        transparent 270deg, /* جزء شفاف كبير لجعل الشعاع قصيراً */
        transparent 290deg,
        var(--neon-green) 340deg, /* ذيل الشعاع */
        #fff 360deg /* رأس الشعاع المضيء */
    );
    animation: rotate-glow 4s linear infinite;
    z-index: -2; /* خلف كل شيء */
    transform: translate(-50%, -50%); /* التوسيط */
}

/* الطبقة الداخلية السوداء لإظهار الحواف فقط */
.hero-image::after {
    content: '';
    position: absolute;
    inset: 3px; /* يجب أن تطابق الـ padding للأب لترك مسافة للشعاع */
    background: var(--bg-color); /* لون مطابق لخلفية الموقع */
    border-radius: 28px; /* أقل قليلاً من الأب */
    z-index: -1;
    display: block; /* التأكد من ظهوره */
}

.doctor-img {
    width: 100%;
    max-width: 450px; /* تحديد عرض الصورة لتكون متناسقة مع الشعاع */
    height: auto;
    max-height: 80vh; /* زيادة الارتفاع قليلاً */
    object-fit: contain;
    
    /* تأثيرات بسيطة للصورة */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    
    /* إزالة التلاشي السفلي لأن الحاوية تقوم بالمهمة */
    -webkit-mask-image: none;
    mask-image: none;
    
    transition: transform 0.4s ease, filter 0.4s ease;
    z-index: 2; /* فوق طبقة الحافة */
    border-radius: 28px; /* ليتخذ شكل الحاوية الداخلية */
}

/* تم إزالة أنيميشن الطفو للصورة نفسها لثبات أفضل داخل الإطار، الحاوية هي التي ستطفو إذا أردنا */

@keyframes pulse-glow {
    from { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes rotate-glow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        margin-top: 0;
        width: 100%;
        gap: 30px;
    }
    .hero-text {
        align-items: center;
        text-align: center;
    }

    .hero-text {
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .doctor-img {
        max-height: 60vh;
        margin-bottom: 10px;
        padding: 0;
        filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.2));
    }
}

.news-float-btn {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid var(--neon-green);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    transition: 0.3s;
    backdrop-filter: blur(5px);
}
.news-float-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 255, 65, 0.4); }
.news-float-btn i { color: var(--neon-green); font-size: 1.2rem; }
.news-badge {
    position: absolute; top: -5px; right: -5px;
    width: 12px; height: 12px; background: #ff0000;
    border-radius: 50%; box-shadow: 0 0 10px #ff0000;
    animation: pulse-red 1s infinite; display: none;
}
.news-badge.active { display: block; }
.news-float-btn.glowing {
    animation: glow-pulse 1.5s infinite alternate;
    border-color: #fff;
}
.btn-nav-install {
    background: linear-gradient(45deg, var(--neon-gold), #ffaa00);
    color: #000;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer; 
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transition: 0.3s;
    border: 1px solid #fff;
    margin-left: 5px;
    animation: install-pulse 2s infinite;
}
/* زر تبديل الوضع */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 5px;
}
.theme-toggle:hover { color: var(--neon-green); border-color: var(--neon-green); transform: rotate(15deg); }
.btn-nav-install:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); animation: none; }
@keyframes install-pulse {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), 0 0 0 0 rgba(255, 170, 0, 0.7); }
    70% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), 0 0 0 10px rgba(255, 170, 0, 0); }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), 0 0 0 0 rgba(255, 170, 0, 0); }
}

/* Master Switch Button */
.master-switch-btn {
    background: transparent; border: 1px solid #444; color: #666;
    width: 35px; height: 35px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; margin-left: 5px;
}
.master-switch-btn:hover { color: var(--master-neon); border-color: var(--master-neon); transform: rotate(15deg); }

@keyframes glow-pulse {
    from { box-shadow: 0 0 5px var(--neon-green); }
    to { box-shadow: 0 0 25px var(--neon-green), 0 0 10px #fff; }
}

.news-modal-overlay {
    position: fixed; 
    top: 150px;
    right: 20px; 
    width: auto; height: auto;
    background: transparent; z-index: 10000;
    display: block;
    opacity: 0; visibility: hidden; transition: 0.3s; 
}
.news-modal-overlay.open { opacity: 1; visibility: visible; }

.news-modal {
    background: #0f0f13; width: 300px;
    border-radius: 20px; border: 1px solid var(--neon-green);
    padding: 15px; position: relative; max-height: 60vh;
    display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: translateY(20px); transition: 0.3s;
}
.news-modal-overlay.open .news-modal { transform: translateY(0); }

.news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.news-header h3 { color: var(--neon-green); margin: 0; display: flex; align-items: center; gap: 10px; }
.close-news { cursor: pointer; color: #888; font-size: 1.2rem; transition: 0.3s; }
.close-news:hover { color: #fff; }

.news-list { overflow-y: auto; flex: 1; padding-right: 5px; }
.news-item {
    background: rgba(255,255,255,0.03); padding: 15px; border-radius: 10px;
    margin-bottom: 10px; border-right: 3px solid #333; transition: 0.3s;
}
.news-item.new { border-right-color: var(--neon-red); background: rgba(255, 0, 0, 0.05); }
.news-date { font-size: 0.7rem; color: #666; display: block; margin-bottom: 5px; }
.news-text { font-size: 0.95rem; line-height: 1.5; color: #ddd; }
.news-link { display: inline-block; margin-top: 8px; font-size: 0.8rem; color: var(--neon-green); text-decoration: underline; }

.btn-mark-read {
    background: transparent; border: 1px solid var(--neon-green);
    color: var(--neon-green); padding: 8px; width: 100%;
    border-radius: 8px; margin-top: 10px; cursor: pointer;
    font-weight: bold; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-mark-read:hover { background: var(--neon-green); color: #000; }

/* --- Quiz Player Styles --- */
.quiz-player-container {
    display: flex;
    justify-content: center;
    align-items: center; /* التوسيط يعطي شعوراً بالفخامة والاحترافية */
    min-height: calc(100vh - 150px);
    padding: clamp(10px, 3vw, 20px); /* حشو متجاوب للحاوية الكبرى */
    width: 100%; /* ضمان أن الحاوية تأخذ العرض الكامل */
    box-sizing: border-box; /* التأكد من أن الحشو والحدود داخل العرض المحدد */
    overflow-x: hidden; /* منع أي تجاوز أفقي داخل هذه الحاوية */
}

.quiz-card-player {
    width: 100%;
    max-width: 850px;
    min-height: 500px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(20px, 4vw, 35px); /* حواف متجاوبة */
    padding: clamp(15px, 5vw, 40px); /* تقليل الحشو في الموبايل لزيادة المساحة */
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6); /* ظل أقوى */
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
}

.quiz-progress-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-gold));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px var(--neon-green);
}

.quiz-info-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 3vw, 20px);
    margin: clamp(20px, 5vw, 30px) 0;
    background: rgba(255,255,255,0.02);
    padding: clamp(15px, 4vw, 25px); /* جعل الحشو متجاوباً */
    border: 1px solid rgba(255,255,255,0.05);
}

.info-item i { color: var(--neon-gold); font-size: 1.5rem; margin-bottom: 10px; display: block; text-shadow: 0 0 10px var(--neon-gold); }
.info-item span { color: var(--text-gray); font-size: 0.9rem; }
.info-item h4 { font-size: 1.2rem; color: #fff; }

.info-item i { 
    color: var(--neon-gold); 
    font-size: clamp(1.2rem, 3.5vw, 1.5rem); /* حجم خط متجاوب */
    margin-bottom: clamp(5px, 2vw, 10px); /* هامش متجاوب */
    display: block; 
}
.info-item span { 
    color: var(--text-gray); 
    font-size: clamp(0.8rem, 2.2vw, 0.9rem); /* حجم خط متجاوب */
}
.info-item h4 { 
    font-size: clamp(1rem, 2.8vw, 1.2rem); /* حجم خط متجاوب */
    color: #fff; 
}

.btn-confirm-start {
    background: var(--neon-green);
    color: #000;
    padding: clamp(12px, 4vw, 15px) clamp(30px, 8vw, 50px); /* حشو متجاوب */
    border-radius: clamp(10px, 3vw, 15px); /* حواف متجاوبة */
    font-size: clamp(1rem, 3vw, 1.2rem); /* حجم خط متجاوب */
    font-weight: 900; border: none; cursor: pointer;
    box-shadow: 0 clamp(6px, 2vw, 8px) 0 #009926, 0 clamp(10px, 4vw, 15px) clamp(15px, 5vw, 25px) rgba(0, 255, 65, 0.2);
    transition: all 0.2s; position: relative; top: 0;
}
.btn-confirm-start:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #009926, 0 20px 30px rgba(0, 255, 65, 0.3); }
.btn-confirm-start:active { top: 6px; box-shadow: 0 2px 0 #009926; }

.question-text {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 700;
    color: #fff;
}

.options-grid {
    display: grid;
    gap: 15px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 18px 25px;
    border-radius: 15px;
    text-align: right;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 600;
    user-select: none;
}
.option-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--neon-gold); color: #fff; transform: translateX(-5px); }
.option-btn.selected { background: rgba(0, 255, 65, 0.1); border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 20px rgba(0,255,65,0.1); }

/* --- نظام التنقل الاحترافي (Native App Transitions) --- */
#top-loader {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-gold), var(--neon-red));
    z-index: 100001;
    width: 0;
    transition: width 0.4s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 10px var(--neon-green);
}

#app-content {
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.page-fade-out {
    opacity: 0;
    transform: scale(0.98); /* تصغير خفيف جداً بدلاً من الإزاحة ليعطي شعور العمق */
}

/* --- نقل أنماط المعمل لتكون عالمية (لضمان عملها عند التنقل السلس) --- */
.model-card {
    background: rgba(20, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 24px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(15px);
    aspect-ratio: 4 / 5;
}
.model-card:hover { transform: translateY(-10px); border-color: #ffd700; box-shadow: 0 20px 40px rgba(255, 0, 60, 0.15); }

/* تأثير النبض أثناء تحميل المجسم */
.model-card.loaded:not(.ready) .model-overlay {
    background: rgba(0, 255, 65, 0.05);
    animation: model-pulse 1.5s infinite ease-in-out;
}

model-viewer { width: 100% !important; height: 100% !important; background-color: transparent; outline: none; }

.info-panel { padding: 20px; background: rgba(0, 0, 0, 0.2); border-top: 1px solid rgba(128, 128, 128, 0.1); display: flex; justify-content: space-between; align-items: center; }
.ar-button { background: transparent; color: #ffd700; border: 1px solid #ffd700; padding: 10px 20px; border-radius: 12px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.ar-button:hover { background: #ff003c; color: white; border-color: #ff003c; }

@keyframes model-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.fullscreen-btn {
    position: absolute; top: 15px; left: 15px; width: 40px; height: 40px;
    background: rgba(0, 0, 0, 0.8); border: 1px solid #ffd700; border-radius: 50%;
    color: #ffd700; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center;
}

/* تحسين ثبات الهيدر */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 10000; /* رفع الطبقة لضمان بقائه فوق كل شيء */
}

/* --- Lightbox (عارض الصور) --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92); /* خلفية داكنة جداً */
    backdrop-filter: blur(20px); /* طبقة ضبابية قوية للاحترافية */
    -webkit-backdrop-filter: blur(20px);
    z-index: 100000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-content {
    position: relative;
    max-width: 95%; max-height: 90%;
    display: flex; justify-content: center; align-items: center;
    transform: scale(0.9); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lightbox-overlay.active .lightbox-content { transform: scale(1); }

.lightbox-content img {
    max-width: 100%; max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 60px rgba(0, 255, 65, 0.15);
    cursor: zoom-in;
    transition: transform 0.1s ease-out; /* حركة ناعمة مع الماوس */
}
.lightbox-content video {
    max-width: 100%; max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 60px rgba(0, 255, 65, 0.15);
    outline: none;
}

.close-lightbox {
    position: absolute; top: 30px; right: 30px;
    font-size: 3rem; color: #fff; cursor: pointer;
    transition: 0.3s; z-index: 100001;
}
.close-lightbox:hover { color: var(--neon-red); transform: rotate(90deg) scale(1.1); }

/* --- Admin Dashboard Styles --- */
.admin-body { background: #020204; color: #e0e0e0; font-family: 'Cairo', sans-serif; overflow-x: hidden; }
.admin-container { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: #0a0a0f; border-left: 1px solid #222; padding: 20px; display: flex; flex-direction: column; gap: 20px; position: fixed; right: 0; height: 100%; z-index: 100; }
.admin-content { flex: 1; margin-right: 250px; padding: 30px; background: radial-gradient(circle at 10% 10%, rgba(0, 255, 65, 0.03), transparent 40%); }

.admin-top-nav {
    background: #0f0f13; border: 1px solid #222; border-radius: 10px; padding: 10px 20px;
    margin-bottom: 25px; display: flex; gap: 15px; flex-wrap: wrap; align-items: center;
}
.admin-top-nav a { color: #888; font-size: 0.9rem; font-weight: bold; transition: 0.3s; }
.admin-top-nav a:hover { color: var(--neon-green); }
.admin-top-nav .home-btn { background: var(--neon-green); color: #000; padding: 5px 15px; border-radius: 5px; }
.admin-top-nav .home-btn:hover { background: #00cc33; color: #000; }

.admin-logo { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #222; margin-bottom: 10px; }
.admin-logo i { font-size: 2rem; color: var(--neon-red); animation: heartBeat 2s infinite; }
.admin-menu-item { padding: 12px 15px; border-radius: 10px; color: #888; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 10px; font-weight: bold; }
.admin-menu-item:hover, .admin-menu-item.active { background: rgba(0, 255, 65, 0.1); color: var(--neon-green); }
.admin-menu-item i { width: 25px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #0f0f13; border: 1px solid #222; padding: 20px; border-radius: 15px; position: relative; overflow: hidden; transition: 0.3s; }
.stat-card:hover { transform: translateY(-5px); border-color: var(--neon-green); box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1); }
.stat-card h3 { font-size: 0.9rem; color: #888; margin-bottom: 10px; }
.stat-card .number { font-size: 2.5rem; font-weight: 900; color: #fff; }
.stat-card .icon-bg { position: absolute; top: 20px; left: 20px; font-size: 3rem; opacity: 0.1; color: #fff; }
.stat-card.red .number { color: var(--neon-red); }
.stat-card.gold .number { color: var(--neon-gold); }

.chart-container { background: #0f0f13; border: 1px solid #222; border-radius: 15px; padding: 20px; margin-bottom: 30px; height: 350px; position: relative; }

.panel-section { background: #0f0f13; border: 1px solid #222; border-radius: 15px; padding: 25px; margin-bottom: 30px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #222; padding-bottom: 15px; }
.panel-title { font-size: 1.2rem; font-weight: bold; color: #fff; display: flex; align-items: center; gap: 10px; }

.users-table { width: 100%; border-collapse: collapse; }
.users-table th { text-align: right; color: #888; padding: 15px; font-size: 0.85rem; border-bottom: 1px solid #333; }
.users-table td { padding: 15px; border-bottom: 1px solid #222; color: #ddd; font-size: 0.95rem; }
.users-table tr:hover { background: rgba(255,255,255,0.02); }
.user-status { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 5px; }
.status-online { background: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
.status-offline { background: #555; }

.action-btn { padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.8rem; font-weight: bold; transition: 0.3s; }
.btn-ban { background: rgba(255, 0, 0, 0.1); color: var(--neon-red); border: 1px solid var(--neon-red); }
.btn-ban:hover { background: var(--neon-red); color: #fff; }
.btn-info { background: rgba(0, 210, 255, 0.1); color: #00d2ff; border: 1px solid #00d2ff; margin-left: 5px; }
.btn-info:hover { background: #00d2ff; color: #000; }
.btn-delete { background: rgba(255, 50, 50, 0.15); color: #ff5555; border: 1px solid #ff5555; margin-right: 5px; }
.btn-delete:hover { background: #ff5555; color: #fff; }

/* Media in Chat & News */
.msg-video {
    max-width: 100%; width: 100%; max-height: 300px;
    border-radius: 10px; border: 1px solid #333;
    margin-top: 10px; background: #000; display: block;
}
.msg-audio {
    width: 100%; max-width: 300px; margin-top: 10px;
    height: 40px; border-radius: 20px;
}
/* Custom Audio Player Colors (Webkit) */
audio::-webkit-media-controls-panel { background-color: #f1f1f1; }
audio::-webkit-media-controls-play-button { background-color: #fff; border-radius: 50%; }

.broadcast-box textarea { width: 100%; background: #050508; border: 1px solid #333; color: #fff; padding: 15px; border-radius: 10px; resize: vertical; min-height: 100px; margin-bottom: 15px; }
.broadcast-box textarea:focus { border-color: var(--neon-green); outline: none; }

@media (max-width: 768px) {
    .admin-sidebar { width: 70px; padding: 10px; }
    .admin-menu-item span { display: none; }
    .admin-menu-item { justify-content: center; }
    .admin-content { margin-right: 70px; padding: 15px; }
    .stat-grid { grid-template-columns: 1fr; }
}

/* Footer Admin Link */
.admin-footer-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: #333; font-size: 0.8rem; text-decoration: none;
    opacity: 0.5; transition: 0.3s; margin-top: 20px;
}
.admin-footer-link:hover { color: var(--neon-red); opacity: 1; }

/* --- Subscription & Pricing Styles --- */
.admin-controls {
    margin-bottom: 30px;
}
.search-box {
    position: relative;
    max-width: 400px;
}
.search-box input {
    width: 100%; background: #0f0f13; border: 1px solid #333;
    padding: 12px 40px 12px 15px; border-radius: 30px; color: #fff; outline: none;
}
.search-box input:focus { border-color: var(--neon-green); }
.search-box i {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #666;
}

.admin-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.admin-user-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.admin-user-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
}
.admin-user-card.banned {
    border-color: var(--neon-red);
    background: rgba(255, 0, 0, 0.05);
}

.admin-user-card .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--neon-green);
    margin: 0 auto 10px;
    object-fit: cover;
    background: #222;
    cursor: zoom-in;
    transition: transform 0.3s;
}
.admin-user-card .avatar:hover { transform: scale(1.1); border-color: #fff; }

.admin-user-card h3 { color: var(--text-white); font-size: 1rem; margin-bottom: 5px; }
.admin-user-card p {
    color: var(--text-gray); font-size: 0.8rem; margin-bottom: 4px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.admin-user-card p i { color: var(--neon-green); }

.card-actions {
    display: flex; gap: 8px; justify-content: center; margin-top: 12px;
}
.btn-action {
    padding: 5px 10px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; font-size: 0.75rem; transition: 0.3s;
}
.btn-action.ban { background: rgba(255, 0, 0, 0.1); color: var(--neon-red); border: 1px solid var(--neon-red); }
.btn-action.ban:hover { background: var(--neon-red); color: #fff; }

.btn-action.unban { background: rgba(0, 255, 65, 0.1); color: var(--neon-green); border: 1px solid var(--neon-green); }
.btn-action.unban:hover { background: var(--neon-green); color: #000; }

.btn-action.delete { background: #222; color: #666; border: 1px solid #444; }
.btn-action.delete:hover { background: #fff; color: #000; }


.pricing-card {
    background: #0f0f13; border: 1px solid #333; border-radius: 20px; padding: 30px;
    width: 300px; text-align: center; position: relative; overflow: hidden; transition: 0.3s;
}
.pricing-card:hover { transform: translateY(-10px); border-color: var(--neon-green); box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1); }
.pricing-card.featured { border-color: var(--neon-gold); box-shadow: 0 0 20px rgba(255, 215, 0, 0.1); }
.pricing-card.featured::before {
    content: 'الأكثر طلباً'; position: absolute; top: 15px; right: -30px;
    background: var(--neon-gold); color: #000; padding: 5px 40px; transform: rotate(45deg); font-weight: bold; font-size: 0.8rem;
}
.price-tag { font-size: 2.5rem; font-weight: 900; color: #fff; margin: 20px 0; }
.price-tag small { font-size: 1rem; color: #888; font-weight: normal; }
.plan-features { list-style: none; padding: 0; margin-bottom: 30px; text-align: right; }
.plan-features li { margin-bottom: 10px; color: #ccc; }
.plan-features li i { color: var(--neon-green); margin-left: 10px; }
.btn-subscribe {
    display: block; width: 100%; padding: 12px; border-radius: 10px; border: none;
    font-weight: bold; cursor: pointer; transition: 0.3s; text-decoration: none;
}
.btn-subscribe.green { background: var(--neon-green); color: #000; }
.btn-subscribe.gold { background: var(--neon-gold); color: #000; }
.btn-subscribe:hover { transform: scale(1.05); }

.payment-form-container {
    max-width: 600px; margin: 40px auto; background: #111; padding: 30px; border-radius: 15px; border: 1px solid #333;
}
.payment-methods { display: flex; gap: 15px; margin-bottom: 20px; justify-content: center; }
.pay-method {
    background: #222; padding: 10px 20px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: 0.3s;
}
.pay-method.active, .pay-method:hover { border-color: var(--neon-green); background: rgba(0, 255, 65, 0.1); }
.pay-method img { height: 30px; }

/* Admin Requests Table */
.req-card { background: #1a1a20; padding: 15px; border-radius: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid var(--neon-gold); }
.req-info h4 { margin: 0 0 5px 0; color: #fff; }
.req-info p { margin: 0; color: #888; font-size: 0.9rem; }
.req-actions { display: flex; gap: 10px; }
.btn-approve { background: var(--neon-green); color: #000; border: none; padding: 5px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; }
.btn-reject { background: var(--neon-red); color: #fff; border: none; padding: 5px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; }

/* --- Edit User Modal --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background-color: #111; margin: 10% auto; padding: 30px; border: 1px solid var(--neon-green); width: 90%; max-width: 500px; border-radius: 15px; color: #fff; position: relative; box-shadow: 0 0 20px rgba(0, 255, 65, 0.2); animation: fadeInUp 0.4s ease; }
.close-modal { color: #aaa; float: left; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--neon-red); }
.modal-input-group { margin-bottom: 15px; text-align: right; }
.modal-input-group label { display: block; margin-bottom: 8px; color: var(--neon-green); font-weight: bold; font-size: 0.9rem; }
.modal-input-group input, .modal-input-group select { width: 100%; padding: 12px; background: #222; border: 1px solid #444; color: #fff; border-radius: 8px; outline: none; transition: 0.3s; }
.modal-input-group input:focus, .modal-input-group select:focus { border-color: var(--neon-green); }

/* --- Profile Page V2 Styles --- */
.profile-v2-container {
    max-width: 700px;
    margin: 50px auto;
    background: #0f0f13;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.profile-v2-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.profile-v2-avatar {
    width: 90px;
    height: 90px;
    background: #222;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--neon-green);
    flex-shrink: 0;
}
.profile-v2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-v2-avatar .upload-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 35%;
    background: rgba(0,0,0,0.7); color: #fff; display: flex;
    align-items: center; justify-content: center; font-size: 0.8rem;
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.profile-v2-avatar:hover .upload-overlay { opacity: 1; }
.profile-v2-info h2 { font-size: 1.8rem; margin-bottom: 5px; }
.profile-v2-info p { color: #888; font-size: 0.9rem; }

.profile-v2-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1a1a20;
    border-radius: 12px;
    margin-bottom: 15px;
}
.detail-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-weight: bold;
}
.detail-item-label i { color: var(--neon-green); width: 20px; text-align: center; }
.detail-item-value { font-size: 1rem; color: #fff; }
.detail-item-value input, .detail-item-value select {
    background: #050508;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    outline: none;
}
.detail-item-value input:focus, .detail-item-value select:focus { border-color: var(--neon-green); }
.profile-save-btn {
    width: 100%;
    background: var(--neon-green);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 20px;
    transition: 0.3s;
}
.profile-save-btn:hover { background: #00cc33; }
/* ... (الأكواد السابقة كما هي) ... */

/* --- Auth Page Styles (New) --- */
.auth-body {
    background: #000;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('6.jpeg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
}
@keyframes gradientMove { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

.auth-logo i { font-size: 3rem; color: var(--neon-red); margin-bottom: 10px; animation: heartBeat 2s infinite; }
.auth-title { font-size: 1.8rem; color: #fff; margin-bottom: 5px; font-weight: 900; }
.auth-subtitle { color: #888; font-size: 0.9rem; margin-bottom: 30px; }

.input-group { position: relative; margin-bottom: 20px; text-align: right; }
.input-group input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    background: #050508;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}
.input-group input:focus { border-color: var(--neon-green); box-shadow: 0 0 10px rgba(0, 255, 65, 0.1); }
.input-group i {
    position: absolute;
    top: 50%; right: 15px;
    transform: translateY(-50%);
    color: #666;
    transition: 0.3s;
}
.input-group input:focus + i { color: var(--neon-green); }

.auth-btn {
    width: 100%;
    padding: 15px;
    background: var(--neon-green);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}
.auth-btn:hover { background: #00cc33; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3); }

.google-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.google-btn:hover { background: #f1f1f1; transform: translateY(-2px); }

.toggle-auth { margin-top: 20px; color: #888; font-size: 0.9rem; }
.toggle-auth a { color: var(--neon-green); font-weight: bold; cursor: pointer; text-decoration: underline; }

.error-msg {
    color: var(--neon-red);
    background: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: none;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.features-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 10000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.features-modal-overlay.open { opacity: 1; visibility: visible; }
.features-modal {
    background: radial-gradient(circle at center, #101015 0%, #050508 100%);
    width: 90%; max-width: 850px; border-radius: 30px;
    border: 1px solid rgba(0, 255, 65, 0.3); padding: 30px; max-height: 85vh;
    overflow-y: auto; position: relative; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 30px rgba(0,255,65,0.1);
    z-index: 10001;
    transform: scale(0.8) translateY(20px);
    transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.features-modal-overlay.open .features-modal {
    transform: scale(1) translateY(0);
}

.features-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.close-features {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.close-features:hover {
    background: var(--neon-red);
    border-color: var(--neon-red);
    transform: rotate(90deg);
    box-shadow: 0 0 15px var(--neon-red);
}

.features-modal .particles { z-index: 0; }
.features-modal .features-grid, .features-modal .news-header, .features-modal button { position: relative; z-index: 1; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-green);
    transform: translateY(-5px);
}

.feature-card i { font-size: 2rem; margin-bottom: 20px; display: block; }
.feature-card h3 { color: #fff; margin-bottom: 12px; font-size: 1.2rem; font-weight: 700; }
.feature-card p { color: #aaa; font-size: 0.95rem; line-height: 1.7; margin-bottom: 25px; flex-grow: 1; }

.btn-card-3d {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    position: relative;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-card-3d:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 5px 0 #009926;
    border-color: #00ff41;
}
.btn-card-3d:active { top: 5px; box-shadow: 0 0 0 transparent; }

.icon-lib { color: var(--neon-green); text-shadow: 0 0 15px rgba(0, 255, 65, 0.3); }
.icon-3d { color: var(--neon-gold); text-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }
.icon-eval { color: var(--neon-red); text-shadow: 0 0 15px rgba(255, 0, 0, 0.3); }
.icon-comm { color: #00d2ff; text-shadow: 0 0 15px rgba(0, 210, 255, 0.3); }
.icon-tech { color: #a29bfe; text-shadow: 0 0 15px rgba(162, 155, 254, 0.3); }
.icon-sec { color: #ff7b72; text-shadow: 0 0 15px rgba(255, 123, 114, 0.3); }

/* تحسينات الموبايل للنافذة */
@media (max-width: 768px) {
    .features-modal {
        width: 95%;
        
        height: auto;
        max-height: 90vh;
        border-radius: 20px;
        padding: 30px 15px 15px;
        border: 1px solid rgba(0, 255, 65, 0.3);
    }
    .features-header h3 { font-size: 1.1rem; }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .feature-card {
        padding: 20px;
        background: rgba(255, 255, 255, 0.05);
    }
}
/* حل مشكلة ضيق مساحة النص في الموبايل في معاينة الأسئلة */
@media (max-width: 768px) {
    .question-item-content {
        flex-direction: column !important;
        display: flex !important;
        gap: 15px !important;
    }

    .question-item-text {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* --- Professional Cache & Footer Buttons --- */
.btn-clear-cache {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex; /* تم التغيير لضمان عدم تمدد الزرار بعرض الشاشة إجبارياً */
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-clear-cache:hover {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    border-color: #ffa500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.1);
}

/* نافذة اختيار الجنس الذكية */
.gender-selection-card {
    background: linear-gradient(165deg, rgba(15, 15, 25, 0.95), rgba(5, 5, 10, 0.98));
    text-align: center;
    padding: 50px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.gender-btns-container {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 30px;
}
.gender-option-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 35px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}
.gender-option-btn i {
    font-size: 3rem !important;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 10px currentColor);
}

/* طابع الولد (الأخضر النيون) */
.gender-option-btn.boy {
    color: var(--neon-green);
}
.gender-option-btn.boy:hover {
    background: rgba(0, 255, 65, 0.05);
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2), inset 0 0 15px rgba(0, 255, 65, 0.1);
    transform: translateY(-10px) scale(1.02);
}

/* طابع البنت (الذهبي/الوردي الملكي) */
.gender-option-btn.girl {
    color: var(--neon-gold);
}
.gender-option-btn.girl:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: var(--neon-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
    transform: translateY(-10px) scale(1.02);
}

/* ثيم البنات الكيوت */
.girl-mode-active {
    --neon-green: #ff85a2 !important;
    --neon-gold: #ff4d6d !important;
    --neon-red: #ff0055 !important;
    --glass-border: rgba(255, 133, 162, 0.3);
}

.girl-mode-active .profile-card, 
.girl-mode-active .step-card {
    border-color: var(--cute-pink) !important;
    box-shadow: 0 20px 50px rgba(255, 77, 109, 0.3), inset 0 0 20px rgba(255, 133, 162, 0.1) !important;
}

.girl-mode-active .custom-input:focus {
    border-color: var(--cute-rose) !important;
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.2) !important;
}

.girl-mode-active .avatar-upload {
    border-color: var(--cute-pink) !important;
    background: rgba(255, 133, 162, 0.05) !important;
}

.girl-mode-active .avatar-upload i {
    color: var(--cute-rose) !important;
}

.girl-mode-active .btn-next {
    background: var(--cute-gradient) !important;
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(255, 77, 109, 0.4) !important;
}

.girl-mode-active h2 { color: var(--cute-pink) !important; }
.girl-mode-active i { color: var(--cute-pink) !important; }

/* أنيميشن اللمعان السحري */
.sparkle {
    position: absolute;
    width: 6px; height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--cute-pink);
    animation: sparkle-fade 1s linear forwards;
}
@keyframes sparkle-fade { 0% { transform: scale(0) rotate(0deg); opacity: 1; } 100% { transform: scale(1.5) rotate(180deg); opacity: 0; } }

/* أنيميشن القلوب المتطايرة */
@keyframes cute-float { 0% { transform: translateY(0) scale(1); opacity: 0; } 50% { opacity: 0.8; } 100% { transform: translateY(-100px) scale(1.5); opacity: 0; } }

.gender-option-btn span {
    font-weight: 900;
    font-size: 1.1rem;
    font-family: 'Reem Kufi', sans-serif;
}

/* --- تصميم باكيدجات الفيديوهات في الصفحة الرئيسية --- */
.package-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 8px;
    text-align: center;
    position: relative;
    background: linear-gradient(165deg, rgba(10, 12, 20, 0.98), rgba(5, 7, 12, 0.99));
    contain: content; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    will-change: transform;
}

.package-glass-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: var(--neon-green);
    box-shadow: 0 15px 40px rgba(0, 255, 65, 0.15);
}

.free-ribbon-top {
    position: absolute; top: 0; right: 0;
    background: var(--neon-green); color: #000;
    padding: 8px 30px; font-size: 0.85rem; font-weight: 900;
    border-radius: 0 0 0 25px; z-index: 5;
}

.package-banner {
    width: 100%; border-radius: 14px; margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-package-pro {
    width: 100%; height: 42px; border-radius: 10px; cursor: pointer;
    border: none; font-family: 'Cairo', sans-serif; font-weight: 900;
    font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: 0.3s; color: #000; position: relative;
}

.btn-package-pro:hover { transform: translateY(-4px); filter: brightness(1.1); }
.btn-package-pro:active { transform: translateY(2px); }

.btn-grade-1 {
    background: linear-gradient(180deg, #00ff88 0%, #00bd68 100%);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
}

.btn-grade-2 {
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e0 100%);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-grade-3 {
    background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.special-gold { border-color: rgba(255, 215, 0, 0.3) !important; }

/* --- تصميم العداد التنازلي الاحترافي --- */
.review-timer-wrapper {
    text-align: center;
    margin-bottom: 30px;
    /* عزل كامل لمنع تأثير تحديث الساعة على أداء الصفحة */
    contain: strict;
    min-height: 120px;
    width: 100%;
    display: block;
}
.timer-title {
    font-size: 0.75rem;
    color: var(--neon-gold);
    font-weight: 900;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 1px;
}
.countdown-flex {
    display: inline-flex;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}
.cd-item {
    display: flex;
    flex-direction: column;
    min-width: 45px;
}
.cd-val { font-size: 1.2rem; font-weight: 900; color: var(--neon-green); text-shadow: 0 0 10px rgba(0, 255, 65, 0.3); line-height: 1; }
.cd-lbl { font-size: 0.55rem; color: #666; margin-top: 4px; font-weight: bold; }
.timer-sep { color: rgba(255,255,255,0.1); font-weight: 900; padding-top: 2px; }

/* --- زر المبرمج الاحترافي (Gemini Style) --- */
.developer-btn {
    background: var(--gemini-gradient);
    color: white !important;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(155, 114, 243, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    font-size: 0.85rem;
    text-decoration: none !important;
}

.developer-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s;
}

.developer-btn:hover::before { left: 100%; }
.developer-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(155, 114, 243, 0.6);
    filter: brightness(1.1);
}