/* 通用样式基础 */
.mp3zh-hidden {
    display: none !important;
}

/* 1. 微信交流群弹窗（修复关闭错乱问题） */
.mp3zh-wechat-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

/* 弹窗激活状态 */
.mp3zh-wechat-popup-overlay.mp3zh-active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.mp3zh-wechat-popup {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 320px;
    padding: 25px 20px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

/* 弹窗激活时的动画 */
.mp3zh-wechat-popup-overlay.mp3zh-active .mp3zh-wechat-popup {
    transform: translateY(0);
}

/* 关闭按钮 */
.mp3zh-popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.mp3zh-popup-close-btn:hover {
    background-color: #f1f1f1;
}

/* 二维码容器 */
.mp3zh-wechat-qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.mp3zh-wechat-qrcode img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 8px;
}

/* 弹窗标题和描述 */
.mp3zh-wechat-popup h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
    margin-top: 0;
}

.mp3zh-wechat-popup p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 关闭按钮样式 */
.mp3zh-close-popup {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3B82F6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mp3zh-close-popup:hover {
    background-color: #2563EB;
}

/* 2. 默认显示的微信客服窗口 */
.mp3zh-persistent-wechat {
    position: fixed;
    right: 20px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 9997;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 微信客服窗口关闭按钮 */
.mp3zh-float-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

.mp3zh-float-close i {
    color: #666;
    font-size: 14px;
}

/* 微信客服窗口内容容器 */
.mp3zh-float-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 220px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

/* 微信客服二维码样式 */
.mp3zh-float-qrcode {
    margin-bottom: 15px;
}

.mp3zh-float-qrcode img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 8px;
}

/* 微信客服文字样式 */
.mp3zh-float-content h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.mp3zh-float-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 3. 带竖排文字的进群领教程按钮 */
.mp3zh-tutorial-trigger {
    position: fixed;
    right: 15px;
    top: 60%;
    transform: translateY(-50%);
    background-color: #25D366; /* 微信绿 */
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 9996;
    transition: transform 0.3s ease, box-shadow 0.2s ease;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 竖排文字样式 */
.mp3zh-tutorial-trigger span {
    writing-mode: vertical-rl; /* 垂直排列文字 */
    text-orientation: upright; /* 文字直立显示 */
    font-size: 14px;
    letter-spacing: 2px; /* 增加字间距 */
    margin-top: 8px;
}

/* 图标样式 */
.mp3zh-tutorial-trigger i {
    font-size: 20px;
}

/* 按钮悬停效果 */
.mp3zh-tutorial-trigger:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

/* 4. 进群领教程弹窗 */
.mp3zh-tutorial-popup {
    position: fixed;
    right: 90px; /* 按钮右侧 */
    top: 60%;
    transform: translateY(-50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    z-index: 9995;
    transition: all 0.3s ease;
}

.mp3zh-tutorial-popup.mp3zh-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* 弹窗内容容器 */
.mp3zh-popup-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 220px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

/* 弹窗关闭按钮 */
.mp3zh-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mp3zh-popup-close i {
    color: #666;
    font-size: 14px;
}

/* 弹窗二维码样式 */
.mp3zh-popup-qrcode {
    margin-bottom: 15px;
}

.mp3zh-popup-qrcode img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 8px;
}

/* 弹窗文字样式 */
.mp3zh-popup-content h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.mp3zh-popup-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 5. FAQ折叠功能样式 */
.mp3zh-faq-item {
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.mp3zh-faq-toggle {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background-color: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mp3zh-faq-toggle:hover {
    background-color: #f8fafc;
}

.mp3zh-faq-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

.mp3zh-faq-content:not(.mp3zh-hidden) {
    opacity: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
    max-height: 500px;
}

.mp3zh-faq-icon {
    transition: transform 0.3s ease;
}

.mp3zh-rotate-180 {
    transform: rotate(180deg);
}

/* 6. 视频弹窗样式 */
.mp3zh-video-popup {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mp3zh-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.mp3zh-video-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.mp3zh-video-element {
    width: 100%;
    border-radius: 8px;
}

/* 7. 导航栏滚动效果 */
.mp3zh-shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.mp3zh-shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 微信弹窗响应式 */
    .mp3zh-wechat-popup {
        max-width: 280px;
        padding: 20px 15px;
    }
    
    .mp3zh-wechat-qrcode img {
        width: 160px;
        height: 160px;
    }
    
    /* 微信客服窗口和弹窗响应式 */
    .mp3zh-float-content,
    .mp3zh-popup-content {
        width: 180px;
        padding: 15px 10px;
    }
    
    .mp3zh-float-qrcode img,
    .mp3zh-popup-qrcode img {
        width: 140px;
        height: 140px;
    }
    
    .mp3zh-float-content h4,
    .mp3zh-popup-content h4,
    .mp3zh-wechat-popup h3 {
        font-size: 14px;
    }
    
    .mp3zh-float-content p,
    .mp3zh-popup-content p,
    .mp3zh-wechat-popup p {
        font-size: 12px;
    }
    
    /* 进群按钮响应式 */
    .mp3zh-tutorial-trigger {
        padding: 10px 6px;
    }
    
    .mp3zh-tutorial-trigger i {
        font-size: 18px;
    }
    
    .mp3zh-tutorial-trigger span {
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    /* 弹窗位置调整 */
    .mp3zh-tutorial-popup {
        right: 70px;
    }
}
