/* 漂浮客服样式 */
.floating-service {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    transition: all 0.3s ease;
}

/* 移动端调整位置 */
@media (max-width: 767px) {
    .floating-service {
        right: 15px;
        bottom: 70px;
    }
}

/* 客服图标按钮 */
.service-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.service-btn:active {
    transform: translateY(0) scale(0.95);
}

/* 呼吸动画效果 */
.service-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* 提示文字 */
.service-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.service-btn:hover + .service-tooltip {
    opacity: 1;
}

/* 二维码弹窗 */
.qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.qrcode-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 二维码容器 */
.qrcode-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    max-width: 90%;
    animation: slideUp 0.3s ease;
}

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

/* 关闭按钮 */
.qrcode-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    transition: all 0.2s ease;
}

.qrcode-close:hover {
    background: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}

/* 标题 */
.qrcode-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 副标题 */
.qrcode-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* 二维码图片 */
.qrcode-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.qrcode-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 默认二维码占位符 */
.qrcode-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 6px;
    color: #999;
}

.qrcode-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.qrcode-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* 底部提示 */
.qrcode-footer {
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}

.qrcode-footer i {
    color: #667eea;
    margin-right: 5px;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .qrcode-container {
        padding: 20px;
        margin: 0 15px;
    }
    
    .qrcode-title {
        font-size: 18px;
    }
    
    .qrcode-image {
        width: 180px;
        height: 180px;
    }
}
