/* Performance Optimizer CSS for W3W GAME */

/* 懒加载图片样式 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: #f0f0f0;
    min-height: 100px;
}

.lazy-image.loaded {
    opacity: 1;
}

/* 游戏加载指示器 */
.game-loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 10;
}

.game-loading-indicator p {
    margin-top: 15px;
    font-size: 16px;
}

/* 加载动画 */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 游戏卡片悬停效果优化 */
.game-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 内容区域渲染优化 */
.content-area {
    will-change: contents;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 图片占位符 */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 100px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 优化模态框动画 */
.game-modal {
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    will-change: opacity, visibility;
}

.game-modal.show {
    opacity: 1;
    visibility: visible;
}

/* 优化滚动性能 */
.sidebar, .right-sidebar {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 优化banner动画 */
.banner-slide {
    will-change: opacity;
    transition: opacity 0.5s ease-out;
}