
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-50px) rotate(-2deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(50px) rotate(2deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInRotate {
    from {
        opacity: 0;
        transform: rotate(-5deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.97);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes flipInX {
    from {
        opacity: 0;
        transform: perspective(400px) rotateX(-90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateX(0);
    }
}

/* تأثير الدخول للشعار */
.main-header {
    animation: slideInFromTop 1s ease-out;
}

.main-logo {
    animation: bounceIn 1.2s ease-out 0.3s backwards;
}

/* تأثير الدخول للشريط الجانبي */
.sidebar {
    animation: fadeInRight 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* تأثير الدخول للمحتوى الرئيسي */
.main-content {
    animation: fadeInLeft 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s backwards;
}

/* تأثير الدخول لقسم الترحيب */
.welcome-section {
    animation: fadeInScale 0.8s ease-out 0.4s backwards;
}

.user-greeting {
    animation: fadeInUp 0.7s ease-out 0.6s backwards;
}

.user-avatar-placeholder {
    animation: bounceIn 1s ease-out 0.8s backwards;
}

/* تأثير الدخول لصندوق الوقت */
.date-time-display {
    animation: fadeInScale 0.7s ease-out 0.5s backwards;
}

.session-timer-box {
    animation: fadeInRotate 0.8s ease-out 0.7s backwards;
}

/* تأثير الدخول لعناوين الأقسام */
.sidebar-title {
    animation: fadeInRight 0.6s ease-out backwards;
    transform-origin: right center;
}

.sidebar-section:nth-child(1) .sidebar-title { animation-delay: 0.9s; }
.sidebar-section:nth-child(2) .sidebar-title { animation-delay: 1s; }
.sidebar-section:nth-child(3) .sidebar-title { animation-delay: 1.1s; }
.sidebar-section:nth-child(4) .sidebar-title { animation-delay: 1.2s; }
.sidebar-section:nth-child(5) .sidebar-title { animation-delay: 1.3s; }

/* تأثير الدخول لأزرار الإجراءات السريعة - بشكل أكثر تفصيلاً */
.action-btn {
    animation: fadeInScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* القسم الأول - إدارة المهام */
.sidebar-section:nth-child(1) .action-btn:nth-child(2) { animation-delay: 1s; }
.sidebar-section:nth-child(1) .action-btn:nth-child(3) { animation-delay: 1.05s; }
.sidebar-section:nth-child(1) #tasksNotificationBadge { animation-delay: 1.1s; }

/* القسم الثاني - القضايا */
.sidebar-section:nth-child(2) .action-btn:nth-child(2) { animation-delay: 1.15s; }
.sidebar-section:nth-child(2) .action-btn:nth-child(3) { animation-delay: 1.2s; }
.sidebar-section:nth-child(2) .action-btn:nth-child(4) { animation-delay: 1.25s; }
.sidebar-section:nth-child(2) .action-btn:nth-child(5) { animation-delay: 1.3s; }

/* القسم الثالث - التصدير */
.sidebar-section:nth-child(3) .action-btn:nth-child(2) { animation-delay: 1.35s; }
.sidebar-section:nth-child(3) .action-btn:nth-child(3) { animation-delay: 1.4s; }
.sidebar-section:nth-child(3) .action-btn:nth-child(4) { animation-delay: 1.45s; }

/* القسم الرابع - المدفوعات */
.sidebar-section:nth-child(4) .action-btn:nth-child(2) { animation-delay: 1.5s; }
.sidebar-section:nth-child(4) .action-btn:nth-child(3) { animation-delay: 1.55s; }
.sidebar-section:nth-child(4) .action-btn:nth-child(4) { animation-delay: 1.6s; }

/* القسم الخامس - إعدادات الموقع */
.sidebar-section:nth-child(5) .action-btn:nth-child(2) { animation-delay: 1.65s; }
.sidebar-section:nth-child(5) .action-btn:nth-child(3) { animation-delay: 1.7s; }

/* القسم السادس - الميزات القادمة */
.sidebar-section:nth-child(6) .action-btn:nth-child(2) { animation-delay: 1.75s; }
.sidebar-section:nth-child(6) .action-btn:nth-child(3) { animation-delay: 1.8s; }

/* تأثير الدخول لمربعات العد */
.case-count-cards {
    animation: fadeInUp 0.8s ease-out 1.85s backwards;
}

.case-count-card {
    animation: bounceIn 0.7s ease-out backwards;
}

.case-count-card:nth-child(1) { animation-delay: 1.9s; }
.case-count-card:nth-child(2) { animation-delay: 2s; }

.case-count-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* تأثير الدخول لمربعات المبالغ */
.amount-cards {
    animation: fadeInUp 0.8s ease-out 2.05s backwards;
}

.amount-card {
    animation: flipInX 0.8s ease-out backwards;
}

.amount-card:nth-child(1) { animation-delay: 2.1s; }
.amount-card:nth-child(2) { animation-delay: 2.2s; }
.amount-card:nth-child(3) { animation-delay: 2.3s; }

.amount-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease;
}

/* تأثير الدخول لزر تسجيل الخروج */
.logout-btn {
    animation: fadeInScale 0.7s ease-out 2.4s backwards;
}

.logout-btn:hover {
    transform: translateY(-3px) scale(1.05);
    transition: all 0.3s ease;
}

/* تأثير الدخول لرأس المحتوى */
.content-header {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.page-title {
    animation: fadeInScale 0.8s ease-out 0.5s backwards;
}

.page-subtitle {
    animation: fadeInUp 0.7s ease-out 0.6s backwards;
}

/* تأثير الدخول لأقسام القضايا */
.cases-grid {
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.case-section {
    animation: fadeInScale 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

.case-section:nth-child(1) { animation-delay: 0.7s; }
.case-section:nth-child(2) { animation-delay: 0.9s; }

/* تأثير الدخول لرأس القسم */
.section-header {
    animation: fadeInRight 0.7s ease-out backwards;
}

.case-section:nth-child(1) .section-header { animation-delay: 0.75s; }
.case-section:nth-child(2) .section-header { animation-delay: 0.95s; }

.section-icon {
    animation: bounceIn 0.8s ease-out backwards;
}

.case-section:nth-child(1) .section-icon { animation-delay: 0.8s; }
.case-section:nth-child(2) .section-icon { animation-delay: 1s; }

/* تأثير الدخول لمربعات القضايا - تفصيل أكثر */
.case-item {
    animation: fadeInUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.case-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15) !important;
}

/* القضايا النشطة - تأخير متدرج */
.case-section:nth-child(1) .case-item:nth-child(1) { animation-delay: 0.85s; }
.case-section:nth-child(1) .case-item:nth-child(2) { animation-delay: 0.95s; }
.case-section:nth-child(1) .case-item:nth-child(3) { animation-delay: 1.05s; }
.case-section:nth-child(1) .case-item:nth-child(4) { animation-delay: 1.15s; }
.case-section:nth-child(1) .case-item:nth-child(5) { animation-delay: 1.25s; }
.case-section:nth-child(1) .case-item:nth-child(6) { animation-delay: 1.35s; }
.case-section:nth-child(1) .case-item:nth-child(7) { animation-delay: 1.45s; }
.case-section:nth-child(1) .case-item:nth-child(8) { animation-delay: 1.55s; }
.case-section:nth-child(1) .case-item:nth-child(9) { animation-delay: 1.65s; }
.case-section:nth-child(1) .case-item:nth-child(10) { animation-delay: 1.75s; }

/* القضايا المكتملة - تأخير متدرج */
.case-section:nth-child(2) .case-item:nth-child(1) { animation-delay: 1.05s; }
.case-section:nth-child(2) .case-item:nth-child(2) { animation-delay: 1.15s; }
.case-section:nth-child(2) .case-item:nth-child(3) { animation-delay: 1.25s; }
.case-section:nth-child(2) .case-item:nth-child(4) { animation-delay: 1.35s; }
.case-section:nth-child(2) .case-item:nth-child(5) { animation-delay: 1.45s; }
.case-section:nth-child(2) .case-item:nth-child(6) { animation-delay: 1.55s; }
.case-section:nth-child(2) .case-item:nth-child(7) { animation-delay: 1.65s; }
.case-section:nth-child(2) .case-item:nth-child(8) { animation-delay: 1.75s; }
.case-section:nth-child(2) .case-item:nth-child(9) { animation-delay: 1.85s; }
.case-section:nth-child(2) .case-item:nth-child(10) { animation-delay: 1.95s; }

/* تأثير الدخول للحالة الفارغة */
.empty-state {
    animation: fadeInScale 0.8s ease-out 1.2s backwards;
}

/* تأثير الدخول للشريط السفلي للموبايل */
.mobile-bottom-bar {
    animation: fadeInUp 0.8s ease-out 2.5s backwards;
}

.bottom-bar-item {
    animation: bounceIn 0.6s ease-out backwards;
}

.bottom-bar-item:nth-child(1) { animation-delay: 2.6s; }
.bottom-bar-item:nth-child(2) { animation-delay: 2.65s; }
.bottom-bar-item:nth-child(3) { animation-delay: 2.7s; }
.bottom-bar-item:nth-child(4) { animation-delay: 2.75s; }
.bottom-bar-item:nth-child(5) { animation-delay: 2.8s; }

/* تأثير الدخول للتذييل */
.footer-copyright {
    animation: fadeInUp 0.8s ease-out 2.9s backwards;
}

/* تأثير خاص لشارة الإشعارات */
#tasksNotificationBadge {
    animation: bounceIn 1s ease-out 1.1s backwards;
}

#tasksNotificationBadge:hover {
    transform: translateY(-4px) scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#pendingTasksCount {
    animation: pulse 2s infinite 2s;
}

/* تأثيرات إضافية للعناصر التفاعلية */
.case-btn:hover {
    transform: translateY(-2px) scale(1.05);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.section-count {
    animation: bounceIn 0.7s ease-out backwards;
}

.case-section:nth-child(1) .section-count { animation-delay: 0.85s; }
.case-section:nth-child(2) .section-count { animation-delay: 1.05s; }

/* تأثيرات الخروج - بسيطة وأنيقة */
@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.fade-out {
    animation: fadeOutScale 0.4s ease-out forwards;
}

.fade-out-down {
    animation: fadeOutDown 0.3s ease-out forwards;
}