/* 联系侧边栏样式 */
.contact-sidebar {
    position: fixed;
    right: 20px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 15px;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-sidebar:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 所有图标都居中显示，无文字 */
.contact-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

/* 微信和QQ只显示图标，居中对齐 */
.contact-link.wechat,
.contact-link.qq {
    justify-content: center;
}

.contact-link.wechat .contact-icon,
.contact-link.qq .contact-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-link:hover::before {
    opacity: 0.2;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
}

.contact-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

/* 确保img图标也有正确的样式 */
.contact-icon img,
img.contact-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: none; /* 确保不应用任何滤镜 */
}

/* 悬停时图标放大效果 */
.contact-link:hover .contact-icon {
    transform: scale(1.1);
}

/* 手机号码样式 */
.contact-link.phone {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.contact-link.phone:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 邮箱样式 */
.contact-link.email {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.contact-link.email:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

/* WhatsApp样式 */
.contact-link.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-link.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Telegram样式 */
.contact-link.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.contact-link.telegram:hover {
    background: linear-gradient(135deg, #006699, #004466);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

/* 微信样式 */
.contact-link.wechat {
    background: transparent;
    border: 2px solid #07C160;
}

.contact-link.wechat:hover {
    background: rgba(7, 193, 96, 0.1);
    border-color: #06AD56;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

/* QQ样式 */
.contact-link.qq {
    background: transparent;
    border: 2px solid #12B7F5;
}

.contact-link.qq:hover {
    background: rgba(18, 183, 245, 0.1);
    border-color: #0E9FE0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 183, 245, 0.4);
}

/* 二维码提示框样式 */
.qr-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    z-index: 10000;
}

/* 联系信息提示框样式 */
.contact-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 160px;
    text-align: center;
    z-index: 10000;
    white-space: nowrap;
}

.contact-tooltip::after,
.qr-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.contact-tooltip p {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.contact-tooltip span {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.qr-tooltip img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #eee;
}

.qr-tooltip p {
    margin: 0;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* 微信和QQ容器悬停效果 */
.wechat-container:hover .wechat-qr,
.qq-container:hover .qq-qr {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* 手机和邮箱容器悬停效果 */
.phone-container:hover .phone-tooltip,
.email-container:hover .email-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-sidebar {
        right: 10px;
        padding: 15px 10px;
        gap: 12px;
    }
    
    .contact-link {
        width: 45px;
        height: 45px;
    }
    
    .contact-icon {
        width: 20px;
        height: 20px;
    }
    
    .contact-text {
        font-size: 9px;
    }
    
    .qr-tooltip {
        right: 60px;
        min-width: 120px;
        padding: 12px;
    }
    
    .qr-tooltip img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .contact-sidebar {
        right: 5px;
        padding: 12px 8px;
        gap: 10px;
    }
    
    .contact-link {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon {
        width: 18px;
        height: 18px;
    }
    
    .contact-text {
        font-size: 8px;
    }
    
    .qr-tooltip {
        right: 50px;
        min-width: 100px;
        padding: 10px;
    }
    
    .qr-tooltip img {
        width: 70px;
        height: 70px;
    }
    
    .qr-tooltip p {
        font-size: 11px;
    }
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100px) translateY(-50%);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

.contact-sidebar {
    animation: slideInRight 0.6s ease-out;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .contact-sidebar {
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .contact-sidebar:hover {
        background: rgba(30, 30, 30, 0.98);
    }
    
    .qr-tooltip {
        background: #2a2a2a;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .qr-tooltip::after {
        border-left-color: #2a2a2a;
    }
    
    .qr-tooltip p {
        color: #ccc;
    }
}