/* 首页样式：简体中文, 移动端 */

/* 移动端样式 (宽度小于等于768px) */
@media (max-width: 768px) {
    /* 1. 汉堡菜单和侧边栏 */
    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 300px;
        height: calc(100vh - 60px);
        background-color: #f9f9f9;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* 2. 整体布局 */
    /* 使用最高优先级的选择器来确保样式生效 */
    .screen {
        /* 移除固定高度，让内容决定高度 */
        height: auto;
        
        /* 设置每个分屏之间的底部间距 */
        margin-bottom: 10px;
        
        /* 保持其他布局样式不变 */
        width: 100%;
        margin: 0 auto 10px; /* 结合了底部间距和居中 */
        padding: 0;
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }
    
    /* 3. 文字样式 */
    /* 一级标题 */
    h1 {
        font-size: 48px;
        line-height: 1.1;
        margin-bottom: 20px;
        text-align: center;
        color: #000000;
    }
    
    /* 二级标题 */
    h2 {
        font-size: 32px;
        line-height: 1.4;
        margin-bottom: 0;
        text-align: center;
        color: #000000;
    }
    
    /* 三级标题 */
    h3 {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 16px;
        text-align: center;
        color: #000000;
    }
    
    /* 段落 */
    p {
        font-size: 18px;
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        /* 关键改动：统一设置上下间距，并保持左右居中 */
        margin: 10px auto;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* 4. 图片容器和图片样式 */
    /* 使用精确的选择器来确保样式生效 */
    .image-content-container-screen1 figure,
    .image-content-container-screen2 figure,
    .image-content-container-screen3 figure,
    .image-content-container-screen4 figure,
    .image-content-container-screen5 figure {
        /* 设置 figure 容器的固定尺寸 */
        width: 375px;
        height: 500px;
        
        /* 使用 Flexbox 布局来居中内容 */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
        /* 确保在页面中居中显示 */
        margin: 0 auto;
        padding: 0;
    }
    
    .image-content-container-screen1 figure img,
    .image-content-container-screen2 figure img,
    .image-content-container-screen3 figure img,
    .image-content-container-screen4 figure img,
    .image-content-container-screen5 figure img {
        /* 图片按比例缩放以适应容器 */
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* 5. 图片说明 (figcaption) */
    .image-content-container-screen1 figcaption,
    .image-content-container-screen2 figcaption,
    .image-content-container-screen3 figcaption,
    .image-content-container-screen4 figcaption,
    .image-content-container-screen5 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    /* 第一屏独立样式 */
    .screen1 {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

    .image-content-container-screen1 figure {
        width: 375px;
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0;
    }

    .image-content-container-screen1 figure img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .image-content-container-screen1 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    .text-content-container-screen1 p {
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        margin-top: 20px;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }

    /* 第二屏独立样式 */
    .screen2 {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

    .image-content-container-screen2 figure {
        width: 375px;
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0;
    }

    .image-content-container-screen2 figure img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .image-content-container-screen2 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    .text-content-container-screen2 p {
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        margin-top: 20px;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }

    /* 第三屏独立样式 */
    .screen3 {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

    .image-content-container-screen3 figure {
        width: 375px;
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0;
    }

    .image-content-container-screen3 figure img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .image-content-container-screen3 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    .text-content-container-screen3 p {
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        margin-top: 20px;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }

    /* 第四屏独立样式 */
    .screen4 {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

    .image-content-container-screen4 figure {
        width: 375px;
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0;
    }

    .image-content-container-screen4 figure img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .image-content-container-screen4 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    .text-content-container-screen4 p {
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        margin-top: 20px;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }

    /* 第五屏独立样式 */
    .screen5 {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        box-sizing: border-box;
    }

    .image-content-container-screen5 figure {
        width: 375px;
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        padding: 0;
    }

    .image-content-container-screen5 figure img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .image-content-container-screen5 figcaption {
        font-size: 12px;
        color: #666666;
        text-align: center;
        margin-top: 10px;
    }

    .text-content-container-screen5 p {
        line-height: 1.6;
        text-indent: 2em;
        color: #000000;
        text-align: left;
        margin-top: 20px;
       /* 设置一个通用的最大宽度，并自动居中 */
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
    }
}
/* ====================================
   图片懒加载优化样式 - 完全匹配你的HTML结构
   添加到你的 mobile.css 和 desktop.css 文件末尾
   ==================================== */

/* 基础图片过渡效果 */
.image-content-container-screen1 img,
.image-content-container-screen2 img,
.image-content-container-screen3 img,
.image-content-container-screen4 img,
.image-content-container-screen5 img {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* 懒加载中的图片样式 */
.image-content-container-screen2 img.lazy-loading,
.image-content-container-screen3 img.lazy-loading,
.image-content-container-screen4 img.lazy-loading,
.image-content-container-screen5 img.lazy-loading {
    opacity: 0.7;
    filter: blur(1px);
    /* 添加加载动画背景 */
    background-color: #f5f5f5;
    background-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: loading-shimmer 1.5s infinite;
}

/* 图片加载完成后的样式 */
.image-content-container-screen2 img.lazy-loaded,
.image-content-container-screen3 img.lazy-loaded,
.image-content-container-screen4 img.lazy-loaded,
.image-content-container-screen5 img.lazy-loaded {
    opacity: 1;
    filter: none;
    animation: none;
    background: none;
}

/* 图片加载失败的样式 */
.image-content-container-screen2 img.lazy-error,
.image-content-container-screen3 img.lazy-error,
.image-content-container-screen4 img.lazy-error,
.image-content-container-screen5 img.lazy-error {
    opacity: 0.5;
    background-color: #f0f0f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' fill='%23999' font-size='12'%3E加载失败%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    animation: none;
}

/* 首屏图片（立即加载，不使用懒加载） */
.image-content-container-screen1 img.hero-image {
    /* 确保首屏图片立即显示 */
    opacity: 1;
    filter: none;
}

/* 加载动画关键帧 */
@keyframes loading-shimmer {
    0% { 
        background-position: -200px 0; 
    }
    100% { 
        background-position: calc(200px + 100%) 0; 
    }
}

/* ====================================
   移动端特定样式 (max-width: 768px)
   ==================================== */
@media (max-width: 768px) {
    /* 移动端图片容器在加载时的占位 - 匹配你的375x500尺寸 */
    .image-content-container-screen2 img.lazy-loading,
    .image-content-container-screen3 img.lazy-loading,
    .image-content-container-screen4 img.lazy-loading,
    .image-content-container-screen5 img.lazy-loading {
        min-height: 500px; /* 匹配你CSS中的移动端高度 */
        width: 375px;      /* 匹配你CSS中的移动端宽度 */
    }
}

/* ====================================
   桌面端特定样式 (min-width: 769px)  
   ==================================== */
@media (min-width: 769px) {
    /* 桌面端图片容器在加载时的占位 - 匹配你的720x700尺寸 */
    .image-content-container-screen2 img.lazy-loading,
    .image-content-container-screen3 img.lazy-loading,
    .image-content-container-screen4 img.lazy-loading,
    .image-content-container-screen5 img.lazy-loading {
        min-height: 700px; /* 匹配你CSS中的桌面端高度 */
        width: 720px;      /* 匹配你CSS中的桌面端宽度 */
    }
}

/* ====================================
   等待懒加载的图片样式
   ==================================== */
.image-content-container-screen2 img.awaiting-lazy-load,
.image-content-container-screen3 img.awaiting-lazy-load,
.image-content-container-screen4 img.awaiting-lazy-load,
.image-content-container-screen5 img.awaiting-lazy-load {
    /* 等待main.js加载JSON时的样式 */
    background-color: #f8f8f8;
    opacity: 0.8;
}

