/* 右下角悬浮窗口 */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    transition: all 0.3s ease;
}

.floating-toggle {
    width: auto;
    height: 60px;
    background: linear-gradient(135deg, #0877E5, #0A4781);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(8, 119, 229, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    padding: 0 20px;
    gap: 10px;
}

.floating-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(8, 119, 229, 0.4);
    background: linear-gradient(135deg, #0A4781, #0877E5);
}

.floating-toggle i {
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.floating-toggle:hover i {
    transform: translateX(-5px);
}

.floating-toggle-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
    white-space: nowrap;
    max-width: 200px;
    transition: transform 0.3s ease;
}

.floating-toggle:hover .floating-toggle-text {
    transform: scale(1.05);
}

.floating-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(8, 119, 229, 0.3);
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 1000;
    pointer-events: auto;
}

.floating-contact:hover .floating-window {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 0.3s ease-out forwards;
}

/* 确保弹窗显示时不被其他元素遮挡 */
.floating-contact:hover {
    z-index: 1001;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.floating-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.close-floating {
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-floating:hover {
    background: rgba(255, 50, 50, 0.4);
    transform: scale(1.1);
}

.qr-code-container {
    text-align: center;
    margin-bottom: 20px;
}

.qr-code {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 10px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(8, 119, 229, 0.3);
    padding: 15px;
}

.qr-placeholder {
    color: #888;
    font-size: 14px;
}

.qr-label {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.contact-info {
    background: rgba(10, 20, 30, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid rgba(8, 119, 229, 0.2);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #e0e0e0;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    color: #0877E5;
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
}

.contact-text {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
}

.contact-detail {
    font-size: 0.9rem;
    color: #aaa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-toggle {
        width: auto;
        height: 50px;
        padding: 0 15px;
        gap: 8px;
    }
    
    .floating-toggle i {
        font-size: 20px;
    }
    
    .floating-toggle-text {
        font-size: 14px;
    }
    
    .floating-window {
        width: 280px;
        padding: 20px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .floating-contact {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-toggle {
        width: auto;
        height: 45px;
        padding: 0 12px;
        gap: 6px;
    }
    
    .floating-toggle i {
        font-size: 18px;
    }
    
    .floating-toggle-text {
        font-size: 12px;
    }
    
    .floating-window {
        width: 260px;
        right: -20px;
    }
    
    .qr-code {
        width: 160px;
        height: 160px;
    }
}

/* 大图模式下的适配 */
.lightbox.active ~ .floating-contact {
    opacity: 0.3;
    pointer-events: none;
}

.lightbox.active ~ .floating-contact:hover {
    opacity: 0.5;
}