/* 客服弹窗 - 极致玻璃拟态设计 */

/* 全局动画关键帧 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* 遮罩层 - 清晰玻璃 */
.cs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(20, 15, 10, 0.40) 30%,
        rgba(10, 8, 5, 0.38) 70%,
        rgba(0, 0, 0, 0.35) 100%
    );
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    z-index: 9999998 !important;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-modal-overlay.active {
    display: block;
    opacity: 1;
}

/* 弹窗主容器 */
.cs-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 90%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    z-index: 9999999 !important;
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cs-modal::-webkit-scrollbar {
    display: none;
}

.cs-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 玻璃质感容器 - 清晰玻璃 */
.cs-modal-content {
    background: linear-gradient(
        135deg,
        rgba(20, 15, 10, 0.45) 0%,
        rgba(30, 22, 15, 0.40) 50%,
        rgba(25, 18, 12, 0.42) 100%
    );
    backdrop-filter: blur(20px) saturate(150%) brightness(0.95);
    -webkit-backdrop-filter: blur(20px) saturate(150%) brightness(0.95);
    border-radius: 22px;
    padding: 26px 22px 22px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(255, 215, 0, 0.3),
        inset 0 2px 4px rgba(255, 215, 0, 0.35),
        inset 0 -2px 4px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 215, 0, 0.6);
    position: relative;
    overflow: hidden;
}

/* 金色光泽效果 */
.cs-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(
        180deg,
        rgba(255, 215, 0, 0.12) 0%,
        rgba(255, 165, 0, 0.06) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* 底部金色光晕 */
.cs-modal-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 100px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 215, 0, 0.12) 0%,
        rgba(255, 165, 0, 0.06) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
}

/* 关闭按钮 - 清晰玻璃 */
.cs-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(50, 40, 30, 0.4) 0%,
        rgba(40, 30, 20, 0.35) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 215, 0, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    color: #FFD700;
    z-index: 10;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 215, 0, 0.4);
}

.cs-modal-close:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 100, 100, 0.95) 0%,
        rgba(255, 50, 80, 0.9) 100%
    );
    color: white;
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 100, 100, 0.6);
    box-shadow: 
        0 6px 20px rgba(255, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 标题 - 金色渐变文字 */
.cs-modal-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(
        135deg,
        #FFD700 0%,
        #FFA500 50%,
        #FF8C00 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 15px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

/* 客服项目容器 - 清晰玻璃卡片 */
.cs-item {
    background: linear-gradient(
        135deg,
        rgba(40, 30, 20, 0.35) 0%,
        rgba(35, 25, 18, 0.30) 100%
    );
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 11px;
    border: 1.5px solid rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 215, 0, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* 金色扫光效果 */
.cs-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.3) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.cs-item:hover::before {
    left: 100%;
}

.cs-item:hover {
    transform: translateY(-4px) scale(1.01);
    background: linear-gradient(
        135deg,
        rgba(45, 35, 25, 0.45) 0%,
        rgba(40, 30, 23, 0.40) 100%
    );
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.35),
        0 6px 18px rgba(255, 215, 0, 0.4),
        inset 0 2px 4px rgba(255, 215, 0, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.7);
}

.cs-item:last-child {
    margin-bottom: 0;
}

/* 客服项目标题 */
.cs-item-title {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.cs-item-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    font-size: 19px;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.4));
}

/* 图标图片样式 */
.cs-item-icon-img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.4));
    transition: all 0.3s ease;
}

.cs-item:hover .cs-item-icon-img {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 8px rgba(255, 215, 0, 0.6));
}

/* 按钮样式 - 玻璃拟态 */
.cs-btn {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 按钮波纹效果 */
.cs-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transform: translate(-50%, -50%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-btn:active::before {
    width: 400px;
    height: 400px;
}

/* 按钮金色光泽效果 */
.cs-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.35) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.cs-btn:hover::after {
    left: 150%;
}

/* 统一按钮配色 - 深色玻璃质感 */
.cs-btn-qq-group,
.cs-btn-qq,
.cs-btn-wechat,
.cs-btn-wework {
    background: linear-gradient(
        135deg,
        rgba(60, 45, 30, 0.6) 0%,
        rgba(50, 38, 25, 0.55) 50%,
        rgba(45, 35, 22, 0.58) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #FFD700;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 3px 10px rgba(255, 215, 0, 0.15),
        inset 0 2px 4px rgba(255, 215, 0, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.cs-btn-qq-group:hover,
.cs-btn-qq:hover,
.cs-btn-wechat:hover,
.cs-btn-wework:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(
        135deg,
        rgba(70, 55, 40, 0.7) 0%,
        rgba(60, 48, 35, 0.65) 50%,
        rgba(55, 45, 32, 0.68) 100%
    );
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(255, 215, 0, 0.25),
        inset 0 2px 4px rgba(255, 215, 0, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.cs-btn-qq-group:active,
.cs-btn-qq:active,
.cs-btn-wechat:active,
.cs-btn-wework:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(255, 215, 0, 0.2),
        inset 0 2px 4px rgba(255, 215, 0, 0.25);
}

/* 微信二维码 - 玻璃卡片 */
.cs-qrcode-container {
    text-align: center;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

.cs-qrcode-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 8px;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.cs-qrcode-img:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.18),
        0 6px 18px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    border-color: rgba(150, 200, 255, 0.6);
}

.cs-qrcode-hint {
    font-size: 11px;
    color: #D4AF37;
    margin-top: 7px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
}

/* 复制成功提示 - 玻璃拟态 */
.cs-copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(
        135deg,
        rgba(30, 30, 40, 0.98) 0%,
        rgba(20, 20, 30, 0.95) 100%
    );
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    color: white;
    padding: 18px 40px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    z-index: 99999999 !important;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.5px;
}

.cs-copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 二维码放大查看 - 深色玻璃 */
.cs-qrcode-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(20, 20, 40, 0.92) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    z-index: 99999998 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cs-qrcode-viewer.active {
    display: flex;
    opacity: 1;
}

.cs-qrcode-viewer-img {
    max-width: 85%;
    max-height: 75%;
    border-radius: 24px;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.6),
        0 15px 45px rgba(0, 0, 0, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px rgba(255, 255, 255, 0.8);
    background: white;
    padding: 12px;
    border: 3px solid rgba(255, 215, 0, 0.6);
    animation: qrcodeFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

/* 二维码提示文字 */
.cs-qrcode-viewer-hint {
    color: #FFD700;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

@keyframes qrcodeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cs-qrcode-viewer-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(240, 240, 250, 0.2) 100%
    );
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.cs-qrcode-viewer-close:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 100, 100, 0.9) 0%,
        rgba(255, 50, 80, 0.85) 100%
    );
    transform: rotate(90deg) scale(1.1);
    box-shadow: 
        0 8px 30px rgba(255, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 移动端优化 - 保持玻璃质感 */
@media (max-width: 768px) {
    .cs-modal {
        width: 94%;
        max-height: 82vh;
    }

    .cs-modal-content {
        padding: 30px 20px 26px;
        border-radius: 24px;
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
    }

    .cs-modal-title {
        font-size: 22px;
        margin-bottom: 22px;
    }

    .cs-item {
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 18px;
    }

    .cs-item-title {
        font-size: 16px;
    }

    .cs-btn {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 12px;
    }

    .cs-qrcode-img {
        max-width: 180px;
        padding: 6px;
    }

    .cs-modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 16px;
        right: 16px;
    }

    .cs-qrcode-viewer-img {
        max-width: 90%;
        max-height: 90%;
        padding: 10px;
    }
    
    .cs-qrcode-viewer-close {
        width: 42px;
        height: 42px;
        font-size: 24px;
        top: 20px;
        right: 20px;
    }
}

/* 超小屏幕优化 - 保持精致 */
@media (max-width: 375px) {
    .cs-modal {
        width: 96%;
    }

    .cs-modal-content {
        padding: 26px 18px 22px;
        border-radius: 22px;
    }

    .cs-modal-title {
        font-size: 20px;
    }

    .cs-item {
        padding: 16px;
        border-radius: 16px;
    }

    .cs-qrcode-img {
        max-width: 160px;
        padding: 5px;
    }
    
    .cs-btn {
        padding: 13px 16px;
        font-size: 14px;
    }
}


