/* === متغيرات الألوان والخطوط === */
:root { 
    --main-font: 'Poppins', sans-serif;
    --primary-color: #52A6E6;
}
html[lang="ar"] { 
    --main-font: 'Cairo', sans-serif; 
}

/* === التنسيقات الأساسية === */
html {
    scroll-behavior: smooth; /* تمرير سلس للصفحة */
}

body {
    font-family: var(--main-font);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    /* تم إزالة منع التحديد (user-select: none) لتحسين تجربة المستخدم وسهولة النسخ */
}

/* تخصيص لون تحديد النص ليتماشى مع هوية الموقع */
::selection {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* === الظلال والتأثيرات عند التمرير (Hover) === */
.card-shadow { 
    box-shadow: 0 10px 25px -5px rgba(82, 166, 230, 0.15); 
}

.hover-card-shadow { 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease; 
}

.hover-card-shadow:hover { 
    box-shadow: 0 20px 40px -10px rgba(85, 111, 199, 0.2); 
    transform: translateY(-5px) scale(1.015); /* قفزة خفيفة واحترافية للبطاقة */
}

/* === التدرجات اللونية (Gradients) === */
.gradient-text { 
    background: linear-gradient(135deg, #556FC7 0%, #D9338B 50%, #E53A87 100%); 
    -webkit-background-clip: text; 
    background-clip: text;
    -webkit-text-fill-color: transparent; 
}

.bg-gradient-custom { 
    background: linear-gradient(135deg, #52A6E6, #8B4DAE, #52A6E6); 
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite; /* حركة مستمرة لجذب الانتباه */
}

.bg-gradient-accent { 
    background: linear-gradient(135deg, #E53A87, #D9338B); 
}

/* === تخصيص شريط التمرير المتوافق مع الوضع الليلي === */
::-webkit-scrollbar { 
    width: 6px; /* شريط نحيف وعصري */
}
::-webkit-scrollbar-track { 
    background: transparent; 
}
::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 10px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: var(--primary-color); 
}

/* شريط التمرير في الوضع الليلي */
.dark ::-webkit-scrollbar-thumb { 
    background: #475569; 
}
.dark ::-webkit-scrollbar-thumb:hover { 
    background: var(--primary-color); 
}

/* === الحركات والأنيميشن (Animations) === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-fade-in { 
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}

/* حركة تدرج الألوان المخصص */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === تأثير اللمعان الاحترافي لبطاقات التحميل (Shimmer Effect) === */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-card {
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 1000px 100%; 
    animation-duration: 1.5s;
    animation-fill-mode: forwards; 
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
}

/* تأثير اللمعان في الوضع الليلي */
.dark .skeleton-card {
    background: #1f2937;
    background-image: linear-gradient(to right, #1f2937 0%, #374151 20%, #1f2937 40%, #1f2937 100%);
}

/* === تأثير الزجاج العاكس (Glassmorphism) للعناصر العائمة === */
.glass-effect {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .glass-effect {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
