/* انیمیشن‌های بهینه‌شده با GPU acceleration */

/* کلاس برای انیمیشن ورود */
.storex-animate-in {
    animation: storexFadeInUp 0.4s ease-out forwards;
}

@keyframes storexFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* بهینه‌سازی انیمیشن‌ها با will-change */
.storex-storage-card,
.storex-history-item {
    will-change: transform, opacity;
}

/* حذف will-change بعد از انیمیشن */
.storex-animate-in {
    will-change: auto;
}

/* انیمیشن hover بهینه */
.storex-storage-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.storex-storage-card:hover {
    transform: translate3d(0, -5px, 0);
}

/* Skeleton loading برای بهبود تجربه کاربری */
.storex-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: storexSkeleton 1.5s ease-in-out infinite;
}

@keyframes storexSkeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* بهینه‌سازی برای reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Lazy loading placeholder */
.storex-lazy-loading {
    min-height: 200px;
    background: #f5f5f5;
    position: relative;
}

.storex-lazy-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: storexSpin 1s linear infinite;
}

@keyframes storexSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
