/* 奔驰风格右侧悬浮按钮样式 - 更接近官网设计 */
.mercedes-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 12px 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mercedes-sidebar:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.9);
}

.sidebar-item {
    position: relative;
    width: 44px;
    height: 44px;
    background: #000000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item:hover {
    transform: scale(1.05);
    background: #e60000;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 鼠标悬停红色效果 */
.sidebar-item.hover-red {
    background: #e60000 !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.4);
    border-color: #ff3333;
}

.sidebar-item.hover-red i {
    color: #ffffff !important;
}

.sidebar-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: #000000;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
}

.sidebar-item::after {
    content: '';
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #000000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.sidebar-item:hover::before,
.sidebar-item:hover::after {
    opacity: 1;
}

.sidebar-popup {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #000000;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10001;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    visibility: hidden;
}

.sidebar-item:hover .sidebar-popup {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: all;
    visibility: visible;
}

/* 确保弹窗内容正确显示 */
.sidebar-popup h3,
.sidebar-popup h4 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    width: 100%;
}

.sidebar-popup p {
    margin: 4px 0;
    color: #cccccc;
    font-size: 11px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    width: 100%;
}

.sidebar-popup .phone-number {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin: 8px 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    width: 100%;
}

.sidebar-popup .qrcode {
    text-align: center;
    margin: 8px 0;
    width: 100%;
}

.sidebar-popup img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 8px 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.chat-btn, .call-btn, .back-to-top-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-top: 8px;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
}

.chat-btn:hover, .call-btn:hover, .back-to-top-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}



/* 滚动效果 */
.mercedes-sidebar.scrolled-down {
    transform: translateY(-50%);
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mercedes-sidebar {
        right: 10px;
        padding: 10px 5px;
    }
    
    .sidebar-item {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .sidebar-popup {
        min-width: 180px;
        right: 50px;
    }
    
    .sidebar-popup .qrcode img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .mercedes-sidebar {
        display: none; /* 在小屏幕上隐藏悬浮按钮 */
    }
}

/* 动画效果 - 更优雅的奔驰风格 */
@keyframes subtle-glow {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
        transform: scale(1.02);
    }
}

.sidebar-item {
    animation: subtle-glow 4s ease-in-out infinite;
}

.sidebar-item:nth-child(2) {
    animation-delay: 1s;
}

.sidebar-item:nth-child(3) {
    animation-delay: 2s;
}

.sidebar-item:nth-child(4) {
    animation-delay: 3s;
}