/* 性能优化CSS */

/* GPU加速 */
.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* 优化的过渡效果 */
.smooth-transition {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.2s ease-out,
                box-shadow 0.2s ease-out;
}

/* 滚动优化 */
.scroll-optimized {
    contain: layout style paint;
    content-visibility: auto;
}

/* 减少重绘的变换 */
.no-repaint-transform {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* 动画性能优化 */
@media (prefers-reduced-motion: no-preference) {
    .animate-on-scroll {
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 硬件加速的渐变 */
.hardware-gradient {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,249,250,0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 优化的阴影 */
.optimized-shadow {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    filter: drop-shadow(0 2px 15px rgba(0,0,0,0.1));
}

/* 滚动容器优化 */
.scroll-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    contain: layout style paint;
} 