/* 客服悬浮按钮样式 */
.news-float-btn {
    position: fixed;
    bottom: var(--spacing-24);
    right: var(--spacing-8);
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.news-float-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 14px;
    cursor: pointer;
}

.news-float-btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--card-box-shadow);
    transform: translateY(-4px) scale(1.05);
}

.news-float-btn i {
    font-size: 24px;
    margin-bottom: 2px;
}

.news-float-btn:hover i {
    transform: scale(1.1);
}

.kefu-text {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.news-float-btn:hover .kefu-text {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.8);
    }

    100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
}

/* 客服弹窗样式 */
.kefu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kefu-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.kefu-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
}

.kefu-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.7) translateY(50px);
    transition: all 0.3s ease;
    z-index: 10001;
}

.kefu-modal.show .kefu-modal-content {
    transform: scale(1) translateY(0);
}

.kefu-modal-body {
    position: relative;
    height: 500px;
    background: #f8f9fa;
}

.oc_top_title .oc_top_close {
    display: none;
}

/* 加载动画 */
.kefu-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.kefu-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* iframe容器 */
.mainIframe-box {
    position: relative;
    width: 100%;
    height: 100%;
}

.mainIframe-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 防止页面滚动 */
body.modal-open {
    overflow: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .news-float-btn i {
        font-size: 20px;
    }

    .kefu-text {
        display: none;
    }

    .kefu-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .kefu-modal-header {
        padding: 15px 20px;
    }

    .kefu-modal-title {
        font-size: 16px;
    }

    .kefu-modal-body {
        height: 400px;
    }
}

@media (max-width: 480px) {

    .news-float-btn i {
        font-size: 18px;
    }

    .kefu-modal-content {
        width: 98%;
        border-radius: 10px;
    }

    .kefu-modal-body {
        height: 350px;
    }

    .kefu-modal-header {
        padding: 12px 15px;
    }

    .kefu-modal-title {
        font-size: 15px;
    }

    .kefu-modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .kefu-modal-content {
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    }
}