/**
 * 图片加载失败样式
 * 美化占位符显示
 */

/* 图片加载中状态 - 移除动画避免抖动 */
img:not(.image-loaded):not([src^="data:"]) {
    background: #f0f0f0;
    background-size: 100% 100%;
    animation: none;
}

/* 图片加载失败占位符 */
img.image-fallback {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
    opacity: 0.8;
}

/* 图片加载成功 - 移除动画避免抖动 */
img.image-loaded {
    animation: none;
    opacity: 1;
}

/* Logo特殊处理 */
img[alt*="Logo"],
img[alt*="logo"],
img[src*="logo"] {
    max-width: 200px;
    height: auto;
}

/* 背景图片加载失败的容器 */
[style*="background-image"][style*="linear-gradient"] {
    position: relative;
}

[style*="background-image"][style*="linear-gradient"]::before {
    content: '背景图片使用备选样式';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 图片容器 */
.image-container {
    position: relative;
    overflow: hidden;
}

/* 图片加载提示 */
.image-loading-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none;
    z-index: 10;
}

/* 隐藏加载失败的小图标 */
img[alt=""]:not([src^="data:"]) {
    min-width: 20px;
    min-height: 20px;
}

/* 优化视频海报图片 */
video[poster] {
    background-color: #000;
}

/* Aviva品牌色调 */
.aviva-placeholder {
    background: linear-gradient(135deg, #004fb6 0%, #0066cc 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 图片懒加载效果 - 移除过渡避免抖动 */
img[loading="lazy"] {
    opacity: 1;
    transition: none;
}

img[loading="lazy"].image-loaded {
    opacity: 1;
}

