/* ملف للتأثيرات المتقدمة المضافة */

/* تنسيق خاص لبادج الإشعارات */
.notification-badge {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #FF3B30;
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    z-index: 10;
}

/* تنسيقات زر الإشعارات */
.notification-bell-btn {
    position: relative;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-bell-btn:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* تأثير الرسائل */
.notification-card {
    border-right: 4px solid transparent;
    transition: all 0.3s ease;
}

.notification-card:hover {
    transform: translateX(-5px);
    border-right-color: #3b82f6;
}

.notification-card.unread {
    background-color: rgba(59, 130, 246, 0.05);
}

.notification-time {
    font-size: 0.8rem;
    color: #64748b;
}

.notification-message {
    margin-bottom: 0.5rem;
}

/* تأثير قائمة الإشعارات */
.notifications-container {
    max-height: 500px;
    overflow-y: auto;
}

.notifications-container::-webkit-scrollbar {
    width: 6px;
}

.notifications-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.notifications-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.notifications-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* تأثيرات للرسوم البيانية */
.chart-container {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* تأثيرات للخلفية المتحركة */
.wave-background {
    position: relative;
    overflow: hidden;
}

.wave-background::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' opacity='.25' fill='%233b82f6'/%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' opacity='.5' fill='%233b82f6'/%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%233b82f6' opacity='.75'/%3E%3C/svg%3E");
    background-size: cover;
    z-index: -1;
}

/* تأثيرات للأزرار الفريدة */
.btn-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    transform: translateZ(-5px);
    filter: brightness(0.8);
}

.btn-3d:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.25);
}

/* تأثير التوهج للعناصر */
.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.8) 0%, transparent 50%);
    opacity: 0;
    mix-blend-mode: overlay;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glow-effect:hover::after {
    opacity: 0.7;
}

/* تأثير النمو للصور */
.scale-on-hover {
    overflow: hidden;
}

.scale-on-hover img {
    transition: transform 0.4s ease;
}

.scale-on-hover:hover img {
    transform: scale(1.1);
}

/* تأثير الارتداد للعناصر */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce-hover:hover {
    animation: bounce 0.6s ease;
}

/* تأثير التلاشي لتحميل البيانات */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* تأثير التوهج للأزرار - متقدم */
.btn-pulse {
    position: relative;
    overflow: hidden;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-pulse:hover::before {
    opacity: 0.2;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* تأثير الظل العميق للبطاقات */
.deep-shadow {
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 6px 6px rgba(0, 0, 0, 0.06),
        0 0 100px rgba(59, 130, 246, 0.1) inset;
    transition: all 0.3s ease;
}

.deep-shadow:hover {
    box-shadow: 
        0 20px 30px rgba(0, 0, 0, 0.15),
        0 10px 10px rgba(0, 0, 0, 0.08),
        0 0 120px rgba(59, 130, 246, 0.15) inset;
}

/* تأثير تدرج الشفافية للبطاقات */
.gradient-border {
    position: relative;
    border: none !important;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* تأثير النص المتوهج */
.text-glow {
    transition: all 0.3s ease;
}

.text-glow:hover {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    color: var(--primary-color);
}

/* تأثيرات لحالة التحميل */
.skeleton-loader {
    background: linear-gradient(90deg, var(--light-bg-2) 25%, var(--light-bg) 50%, var(--light-bg-2) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* تأثير خلفية متحركة */
.animated-gradient-bg {
    background: linear-gradient(270deg, var(--primary-light), var(--accent-color), var(--primary-color));
    background-size: 600% 600%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* تأثيرات التمرير لتحميل المحتوى */
.scroll-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.scroll-fade.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* تأثيرات متقدمة للإحصائيات */
.stat-counter {
    position: relative;
    counter-reset: stat var(--count, 0);
}

.stat-counter::after {
    content: counter(stat);
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from { counter-increment: stat 0; }
    to { counter-increment: stat var(--target); }
}

/* تأثير لمتابعة المؤشر */
.cursor-glow {
    position: relative;
}

.cursor-glow::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.cursor-glow:hover::before {
    opacity: 1;
}

/* الوضع الليلي المخصص */
html[data-theme='dark'] .cursor-glow::before {
    background: radial-gradient(circle, rgba(147, 197, 253, 0.4) 0%, transparent 70%);
}

html[data-theme='dark'] .skeleton-loader {
    background: linear-gradient(90deg, var(--light-bg) 25%, var(--light-bg-2) 50%, var(--light-bg) 75%);
}

/* تأثير كرتوني للعناصر */
.cartoon-effect {
    filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.cartoon-effect:hover {
    transform: translate(-3px, -3px);
    filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, 0.1));
}

/* تأثير خط مشع تحت العناصر */
.radial-underline {
    position: relative;
}

.radial-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.radial-underline:hover::after {
    transform: scaleX(1);
}

/* تأثير للجداول - صف الجدول المميز */
.table-row-highlight {
    position: relative;
    transition: all 0.3s ease;
}

.table-row-highlight:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateX(-5px);
}

.table-row-highlight td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.table-row-highlight:hover td:first-child::before {
    transform: scaleY(1);
}

/* تنسيق للتوولتيب مع دعم RTL */
[data-tooltip-rtl] {
    position: relative;
}

[data-tooltip-rtl]::after {
    content: attr(data-tooltip-rtl);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%) translateY(-5px);
    background: var(--dark-text);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    text-align: right;
    direction: rtl;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-tooltip-rtl]:hover::after {
    opacity: 1;
    transform: translateX(50%) translateY(-10px);
}
