/* 联系我们悬浮组件样式 */
.contact-float-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: move;
}

/* 悬浮按钮 */
.contact-float-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    z-index: 10002;
}

.contact-float-btn i {
    font-size: 24px;
}

.contact-float-btn span {
    display: none;
}

.contact-float-btn:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    transform: scale(1.05);
}


/* 弹窗 */
.contact-float-popup {
    position: fixed;
    left: -200px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    overflow: hidden;
}

.contact-float-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

/* 弹窗头部 */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.popup-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 弹窗内容 */
.popup-content {
    padding: 25px;
}

/* 二维码容器 */
.wechat-qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

/* 二维码图片 */
.wechat-qrcode-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    object-fit: contain;
    transition: opacity 0.3s ease;
    display: none;
}

/* 二维码占位符 */
.qrcode-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.qrcode-placeholder i {
    font-size: 60px;
    color: #07c160;
    margin-bottom: 10px;
}

.qrcode-placeholder p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.qrcode-placeholder:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* 当图片加载完成时显示图片，隐藏占位符 */
.wechat-qrcode-img.loaded {
    display: block;
}

.wechat-qrcode-img.loaded + .qrcode-placeholder {
    display: none;
}

/* 联系信息 */
.contact-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.contact-info p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info i {
    color: #007bff;
    margin-right: 8px;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-float-btn {
        width: 50px;
        height: 50px;
    }
    
    .contact-float-btn i {
        font-size: 20px;
    }
    
    .contact-float-popup {
        width: calc(100% - 40px);
        max-width: 320px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.contact-float-btn {
    animation: pulse 2s infinite;
}

/* 加载效果 */
.contact-float-container {
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}