/* تأثيرات عامة */
.fade-in {
    animation: fadeIn 0.1s ease-in;
    opacity: 0;
    animation-fill-mode: forwards;
}

.slide-in {
    animation: slideIn 0.1s ease-out;
}

.scale-in {
    animation: scaleIn 0.1s ease-out;
}

/* تحسين تأثيرات البطاقات */
.card-hover {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* تحسين تأثيرات الأزرار */
.button-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.button-hover:active {
    transform: translateY(0);
}

/* تأثيرات للقوائم المنسدلة */
.dropdown-animation {
    transition: all 0.2s ease-in-out;
    transform-origin: top;
}

/* تأثيرات للمودال */
.modal-animation {
    animation: modalIn 0.1 cubic-bezier(0.4, 0, 0.2, 1);
}

/* تحسين تأثيرات القائمة الجانبية */
.sidebar-animation {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تأثيرات للروابط في القائمة */
.nav-link {
    position: relative;
    transition: all 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* تحسين تأثيرات البطاقات الإحصائية */
.stats-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* تأثيرات للصور */
.image-hover {
    transition: all 0.1 ease;
}

.image-hover:hover {
    transform: scale(1.05);
}

/* تأثيرات للجداول */
.table-row {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-row:hover {
    background-color: rgba(0,0,0,0.03);
    transform: translateX(-5px);
}

/* تأثير الاهتزاز للأيقونات */
.icon-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* تأثير التكبير والتصغير */
.scale-bounce {
    animation: scaleBounce 0.1 ease;
}

/* تأثير الظهور التدريجي للعناصر */
.fade-out {
    animation: fadeOut 0.1 ease forwards;
}

/* تعريف الـ Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes modalIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes scaleBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .card-hover:hover,
    .stats-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .table-row:hover {
        transform: none;
    }
    
    .text-focus:hover {
        letter-spacing: normal;
    }
}

/* تأثيرات للعناصر التفاعلية */
.interactive-element {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: scale(1.02);
}

.interactive-element:active {
    transform: scale(0.98);
}

/* تأثيرات النصوص */
.text-focus {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-focus:hover {
    color: #16A34A;
    letter-spacing: 0.3px;
}

/* تأثيرات الإشعارات */
.notification {
    animation: notificationIn 0.1s ease-out forwards;
}

@keyframes notificationIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* تأثيرات التحميل */
.loading-spinner {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}