/* ========== 右侧悬浮客服 稳定版 ========== */
.float-service {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

/* 客服按钮 */
.service-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(90deg, #00aaff, #0066ff);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 3px 15px rgba(0,170,255,0.3);
    animation: servicePulse 2s infinite;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

@keyframes servicePulse {
    0% { box-shadow: 0 0 0 0 rgba(0,170,255,0.5); }
    70% { box-shadow: 0 0 0 15px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* 弹出层 —— 修复抖动核心 */
.service-panel {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    transform-origin: right center;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease-out;
}

/* 悬浮 —— 稳定不抖动，active优先级更高保证点击生效 */
.float-service:hover .service-panel,
body .float-service.active .service-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(-50%) scale(1);
    right: 65px;
}

/* 联系方式 */
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.contact-item:last-child {
    border-bottom: none;
}
.contact-item i {
    font-size: 18px;
    color: #00aaff;
    width: 20px;
    text-align: center;
}
.contact-item a {
    color: #333;
    text-decoration: none;
}
.contact-item a:hover {
    color: #00aaff;
}

/* 微信 */
.wechat-area {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.wechat-area img {
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
}
.wechat-area p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 移动端 */
@media (max-width: 768px) {
    .float-service {
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: none;
    }
    .service-panel {
        bottom: 70px;
        top: auto;
        right: 0;
        transform-origin: bottom right;
        transform: translateY(0) scale(0.9);
    }
    body .float-service:hover .service-panel,
    body .float-service.active .service-panel {
        right: 0;
        transform: translateY(0) scale(1);
    }
}
