/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移除了固定文字区域样式，因为不再需要 */

/* 保留必要的基础样式 */

html, body {
    font-family: Arial, sans-serif;
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 确保整个文档可以滚动 */
html {
    overflow-y: auto;
}

body {
    overflow-y: visible;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 页面内容容器 - 让广告居中显示 */
.page-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible;
    /* 确保内容不会被固定元素遮挡 */
    padding-bottom: 50px; /* 添加底部padding确保最后一个广告完全可见 */
}

/* 响应式设计 - 广告容器自适应 */
@media (max-width: 480px) and (min-width: 320px) {
    .page-content {
        gap: 8px;
        padding: 15px;
        margin-top: 0 !important;
    }
    
    .ad-container {
        max-width: 95%;
        border-radius: 6px;
    }
    
    .show-middle {
        max-height: 200px;
        object-fit: cover;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .page-content {
        gap: 10px;
        padding: 20px;
        margin-top: 0 !important;
    }
    
    .ad-container {
        max-width: 90%;
        border-radius: 8px;
    }
    
    .show-middle {
        max-height: 250px;
        object-fit: cover;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .page-content {
        gap: 12px;
        padding: 25px;
        margin-top: 0 !important;
    }
    
    .ad-container {
        max-width: 85%;
        border-radius: 10px;
    }
    
    .show-middle {
        max-height: 300px;
        object-fit: cover;
    }
}

@media (max-width: 319px) {
    .page-content {
        gap: 5px;
        padding: 10px;
        margin-top: 0 !important;
    }
    
    .ad-container {
        max-width: 98%;
        border-radius: 4px;
    }
    
    .show-middle {
        max-height: 180px;
        object-fit: cover;
    }
}

/* 中间展示区域样式 */
.show-zs-middle {
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.show-zs-middle:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.show-middle {
    width: 100%;
    height: auto;
    display: block;
}

/* 点击提示覆盖层样式 - 缩小为原来的一半 */
.click-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px; /* 从15px 25px缩小 */
    border-radius: 6px; /* 从8px缩小 */
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    font-size: 14px; /* 从18px缩小 */
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

/* 点击提示图标样式 */
.click-hint-icon {
    font-size: 18px; /* 从24px缩小 */
}

/* 脉冲动画效果，增强提示显著性 */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
}

/* 响应式设计，针对移动设备优化提示文字大小 */
@media (max-width: 480px) {
    .click-hint {
        font-size: 12px; /* 从14px缩小 */
        padding: 6px 10px; /* 从12px 20px缩小 */
        white-space: normal;
        flex-direction: column;
        gap: 4px;
    }
    
    .click-hint-icon {
        font-size: 16px; /* 从20px缩小 */
    }
}

/* 微信开放区域基础样式 */
.erx-weixin-open,
.weixin-open-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

/* 广告横幅样式 - 简洁弹窗，只显示核心内容 */
.zs-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 380px;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    text-align: center;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
    max-height: 90vh;
    height: auto;
    /* 针对移动端的额外优化 */
    -webkit-tap-highlight-color: transparent;
}

/* 关闭按钮样式 - 修改为类选择器 */
.close-zs {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    /* 防止点击时的闪烁效果 */
    -webkit-tap-highlight-color: transparent;
}

.close-zs:hover {
    background-color: #e0e0e0;
}

/* 二维码图片样式 - 修改为类选择器 */
.qrcode {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    margin: 20px auto 24px;
    display: block;
    cursor: pointer;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    /* 确保完全居中 */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    /* 保持图片比例不变 */
    object-fit: contain;
}

.qrcode:hover {
    /* 移除缩放效果，避免覆盖下方文字 */
    transform: translateX(-50%);
    /* 可以添加其他视觉反馈，如边框或阴影变化 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 微信号样式 - 紧凑显示 */
.wechat-id {
    font-size: 22px;
    color: #333;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 15px 20px;
    /* 加粗字体并增强底色对比度 */
    font-weight: bold;
    background-color: #07c160; /* 使用微信绿色作为底色，更加明显 */
    color: white; /* 文字颜色改为白色，提高对比度 */
    border: 2px solid #06a855;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    word-break: break-all;
    line-height: 1.6;
    /* 居中显示 */
    text-align: center;
    /* 增加阴影效果，使其更突出 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* 增加最小宽度，确保显示更宽 */
    min-width: 280px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.wechat-id:hover {
    background-color: #06a855; /* 鼠标悬停时加深背景色 */
    border-color: #058c48;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式设计调整 */
@media (max-width: 480px) {
    .zs-banner {
        width: 85%;
        padding: 12px;
    }

    .qrcode {
        max-width: 100%;
        max-height: 200px;
        width: auto;
        height: auto;
    }

    .wechat-id {
        font-size: 18px;
        padding: 12px 15px;
        min-width: 90%;
        max-width: 100%;
    }
    
    .page-content {
        gap: 15px;
        padding: 15px;
    }
    
    .show-zs-middle {
        max-width: 100%;
    }
}

/* 点击提示覆盖层样式 - 更美观的设计 */
.click-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

/* 点击提示图标样式 */
.click-hint-icon {
    font-size: 16px;
    animation: bounce 2s infinite;
    color: #4CAF50; /* 使用微信绿色作为主题色 */
}

/* 弹跳动画效果，更生动 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* 鼠标悬停效果 - 仅在桌面设备上生效 */
@media (min-width: 768px) {
    .click-hint:hover {
        transform: translateX(-50%) translateY(-5px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    }
}

/* 响应式设计 - 手机设备优化 */
@media (max-width: 480px) {
    .click-hint {
        bottom: 15px;
        padding: 8px 15px;
        font-size: 12px;
        max-width: 90%;
        white-space: normal;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    
    .click-hint-icon {
        font-size: 14px;
    }
}

.zs-banner * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 扫描引导文本样式 - 最小化显示 */
.scan-guide {
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 15px;
    color: #07c160; /* 使用微信绿色，更加醒目 */
    line-height: 1.8;
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* 增加间距，使布局更清晰 */
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* 删除之前的.click-hint相关样式，替换为以下样式 */

/* 广告容器 - 包含图片和提示 */
.ad-container {
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    text-align: center;
}

.ad-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* 中间展示区域样式 - 移除之前的.click-hint相关样式 */
.show-zs-middle {
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.show-middle {
    width: 100%;
    height: auto;
    display: block;
}

/* 广告点击提示 - 放在图片下方 */
.ad-click-prompt {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.ad-click-prompt:hover {
    background-color: #45a049;
}

/* 为提示添加图标 */
.ad-click-prompt::before {
    content: "👆";
    font-size: 18px;
    display: inline-block;
    animation: float 2s ease-in-out infinite;
}

/* 浮动动画效果 */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
    100% {
        transform: translateY(0);
    }
}

/* 响应式设计 - 移动设备优化 */
@media (max-width: 480px) {
    .ad-container {
        max-width: 100%;
        margin-bottom: 5px; /* 适当增加间距以便于点击 */
        border-radius: 6px;
    }
    
    .ad-click-prompt {
        padding: 8px 12px;
        font-size: 12px;
        background-color: #45a049; /* 稍微深一点的绿色 */
    }
    
    .ad-click-prompt::before {
        font-size: 14px;
    }
    
    /* 调整移动设备上的内容容器间距 */
    .page-content {
        gap: 8px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 调整整体页面样式 */
    html, body {
        font-size: 14px;
        line-height: 1.3;
        overflow-x: hidden;
        overflow-y: auto;
        height: 100%;
    }
    
    /* 确保页面内容可以完整滚动 */
    .page-content {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    /* 优化广告图片显示 */
    .show-middle {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }
}