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

/* CSS变量定义，方便统一管理和适配不同设备 */
:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --white: #fff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.3);
    --radius: 8px;
    --radius-full: 50%;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 适配刘海屏和底部安全区域 */
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 0);
    overflow: hidden;
}

/* 解决iOS点击延迟问题 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 容器样式 */
.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* iframe容器样式 - 允许内容滚动并居中显示 */
.iframe-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    z-index: 1;
}

/* 修复iframe在桌面浏览器上右侧空白问题 */
.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    min-width: 100%;
    max-width: 100%;
}

/* 微信X5内核特殊样式 */
@media screen and (max-width: 768px) {
    /* 在微信X5内核中强制使用横屏模式 */
    body {
        -webkit-writing-mode: horizontal-tb;
        writing-mode: horizontal-tb;
    }
}

/* 弹窗基础样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    z-index: 10000;
    display: none;
    box-shadow: var(--shadow-lg);
    max-width: 90%;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.popup-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
}

.notes ul {
    list-style-type: none;
    padding-left: 20px;
}

.notes li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
}

.notes li:before {
    content: attr(data-content);
    position: absolute;
    left: 0;
    color: #1a73e8;
    font-weight: bold;
}

/* 音乐组件样式 */
.music-player {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top, 0));
    right: 20px;
    background-color: #f0f0f0;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    /* 微信环境下可能需要调整位置以避开顶部栏 */
}

.music-player:hover {
    transform: scale(1.1);
    background-color: #e6e6e6;
}

/* 音乐播放图标容器 */
.music-icon-container {
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 播放按钮样式 */
.play-button {
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid white;
    margin-left: 2px;
}

/* 暂停按钮样式 */
.pause-button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pause-button::before,
.pause-button::after {
    content: '';
    width: 8px;
    height: 20px;
    background-color: white;
    border-radius: 1px;
}

/* 播放状态动画 */
.music-player.playing .music-icon-container {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 弹窗样式 */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    max-width: 500px;
    width: 90%;
}

.popup.show {
    display: block;
}

.popup-content {
    text-align: center;
}

.popup-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 16px; /* 控制文字大小 */
}

/* 只控制第179-183行的文字大小 */
.popup-content p:nth-of-type(2),
.popup-content p:nth-of-type(3),
.popup-content p:nth-of-type(4),
.popup-content p:nth-of-type(5),
.popup-content p:nth-of-type(6) {
    font-size: 16px; /* 只针对这几行设置不同的字体大小 */
}

/* 弹窗底部样式 */
.popup-footer {
    margin-top: 20px;
    text-align: center;
}

/* 弹窗按钮样式 */
.popup-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.popup-button:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.popup h3 {
    margin-bottom: 20px;
    color: #1a73e8;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.popup-close:hover {
    color: #333;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.overlay.show {
    display: block;
}

/* 客服组件样式 */
.customer-service {
    position: fixed;
    top: 35%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.service-button {
    background-color: var(--primary-color);
    color: white;
    width: 45px;
    height: 120px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    /* 微信环境下可能需要调整位置以避开右侧栏 */
    font-size: 16px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    /* 只保留缩放动效，光晕效果通过伪元素实现 */
    animation: pulse 2s ease-in-out infinite;
}

/* 使用伪元素实现光晕效果，避免影响按钮本身的点击事件 */
.service-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    z-index: -1;
    animation: glow 2s ease-in-out infinite alternate;
}

/* 光晕动画 */
@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(26, 115, 232, 0.7), 0 0 10px rgba(26, 115, 232, 0.5);
    }
    to {
        box-shadow: 0 0 10px rgba(26, 115, 232, 0.9), 0 0 20px rgba(26, 115, 232, 0.7);
    }
}

/* 脉冲缩放动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.service-button:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

/* 联系客服文字样式 */
.service-text {
    font-size: 20px;
    font-weight: 600;
    writing-mode: vertical-rl;
}

/* 微信环境下为防止误触，增加点击区域 */
.wechat-environment .service-button {
    width: 55px;
    height: 130px;
    font-size: 20px;
    border-radius: 22px;
}
.wechat-environment .service-text {
    font-size: 20px;
}

.service-qrcode {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    text-align: center;
    min-width: 200px;
    /* 微信环境下增加卡片阴影效果 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    /* 微信环境下增加圆角 */
    border-radius: 12px;
    /* 确保二维码容器在最上层 */
    z-index: 2000;
    /* 修复可能的显示问题 */
    opacity: 1;
    pointer-events: auto;
    /* 移除可能的隐藏属性 */
    visibility: visible;
    /* 确保不被裁剪 */
    overflow: visible;
}

.service-qrcode.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.qrcode-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
}

.scan-tip {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.wechat-id {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

@media (max-width: 768px) {
    h1 {
        font-size: 24px;
        font-weight: 600;
    }
    
    .notes h2 {
        font-size: 18px;
        font-weight: 600;
    }
    
    /* 修改iframe容器高度以适应移动设备 */
    .iframe-container {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 微信环境下iframe容器高度调整 */
    .wechat-environment .iframe-container {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .music-player {
        width: 60px;
        height: 60px;
        top: calc(15px + env(safe-area-inset-top, 0));
        right: 15px;
    }
    
    .music-icon-container {
        width: 40px;
        height: 40px;
    }
    
    .play-button {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 16px solid white;
    }
    
    .service-button {
        width: 40px;
        height: 100px;
        right: 10px;
        font-size: 14px;
        border-radius: 18px;
    }
    .service-text {
        font-size: 12px;
    }
    
    /* 微信环境下的客服按钮进一步增大 */
    .wechat-environment .service-button {
        width: 50px;
        height: 110px;
        font-size: 15px;
        border-radius: 20px;
    }
    .wechat-environment .service-text {
        font-size: 13px;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
    
    .service-qrcode {
        right: 70px;
        min-width: 180px;
        padding: 15px;
    }
    
    .qrcode-image {
        width: 130px;
        height: 130px;
    }
    

    
    /* 弹窗适配 */
    .popup {
        width: 95%;
        max-width: none;
        padding: 20px;
    }
    
    /* 优化文本显示 */
    p, li {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* iframe容器样式 - 允许内容滚动并居中显示 */
.iframe-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    z-index: 1;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 容器样式 */
.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* 头部样式 */
header {
    padding: 20px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    position: relative;
}