/* ========================================
   图片懒加载样式 - 渐进式模糊效果
   适用于所有页面的图片和图标
   性能优化 + SEO友好
   ======================================== */

/* 图片基础样式 */
img.site-icon,
img.ranking-icon,
img.mobile-ranking-icon,
.article-thumb img,
img.partner-banner-img,
.content-banner-card img {
    display: block;
    background-color: #f5f5f5;
}

/* 未加载状态 - 轻微模糊 + 灰度 */
img.site-icon:not(.loaded),
img.ranking-icon:not(.loaded),
img.mobile-ranking-icon:not(.loaded),
.article-thumb img:not(.loaded),
img.partner-banner-img:not(.loaded),
.content-banner-card img:not(.loaded) {
    filter: blur(8px) grayscale(100%);
    transform: scale(1.05);
    opacity: 0.6;
    transition: filter 0.4s ease-out, transform 0.4s ease-out, opacity 0.4s ease-out;
}

/* 加载完成状态 - 清晰显示 */
img.site-icon.loaded,
img.ranking-icon.loaded,
img.mobile-ranking-icon.loaded,
.article-thumb img.loaded,
img.partner-banner-img.loaded,
.content-banner-card img.loaded {
    filter: blur(0) grayscale(0);
    transform: scale(1);
    opacity: 1;
}

/* 文章缩略图容器 */
.article-thumb {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 8px;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 站点图标样式 */
img.site-icon,
img.ranking-icon,
img.mobile-ranking-icon {
    border-radius: 8px;
}

/* 性能优化 - 使用GPU加速 */
img.site-icon:not(.loaded),
img.ranking-icon:not(.loaded),
img.mobile-ranking-icon:not(.loaded),
.article-thumb img:not(.loaded),
img.partner-banner-img:not(.loaded),
.content-banner-card img:not(.loaded) {
    will-change: filter, transform, opacity;
}

/* 加载完成后移除will-change */
img.site-icon.loaded,
img.ranking-icon.loaded,
img.mobile-ranking-icon.loaded,
.article-thumb img.loaded,
img.partner-banner-img.loaded,
.content-banner-card img.loaded {
    will-change: auto;
}

/* 尊重用户偏好 - 禁用动画 */
@media (prefers-reduced-motion: reduce) {

    img.site-icon,
    img.ranking-icon,
    img.mobile-ranking-icon,
    .article-thumb img,
    img.partner-banner-img,
    .content-banner-card img {
        transition: none !important;
        filter: none !important;
        transform: none !important;
    }

    img.site-icon:not(.loaded),
    img.ranking-icon:not(.loaded),
    img.mobile-ranking-icon:not(.loaded),
    .article-thumb img:not(.loaded),
    img.partner-banner-img:not(.loaded),
    .content-banner-card img:not(.loaded) {
        opacity: 0.8;
    }
}

/* 移动端优化 - 减少模糊程度 */
@media (max-width: 768px) {

    img.site-icon:not(.loaded),
    img.ranking-icon:not(.loaded),
    img.mobile-ranking-icon:not(.loaded),
    .article-thumb img:not(.loaded),
    img.partner-banner-img:not(.loaded),
    .content-banner-card img:not(.loaded) {
        filter: blur(4px) grayscale(80%);
    }
}