/**
 * 客服悬浮按钮样式
 */

#cs-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.cs-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #00b4d8, #0096c7);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 180, 216, 0.5);
}

.cs-btn.active {
    background: linear-gradient(135deg, #ef5350, #c62828);
    box-shadow: 0 4px 20px rgba(239, 83, 80, 0.4);
    transform: rotate(90deg);
}

/* 弹出面板 */
.cs-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: rgba(12, 16, 28, 0.97);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.cs-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cs-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cs-panel-header span {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.cs-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.cs-close:hover {
    color: #fff;
}

.cs-panel-body {
    padding: 16px;
}

.cs-greeting {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.7;
}

.cs-slogan {
    font-size: 13px;
    color: #00b4d8;
    font-weight: 600;
    margin-bottom: 8px;
    font-style: italic;
}

.cs-action {
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
}

/* 联系项 */
.cs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.cs-item:last-child {
    margin-bottom: 0;
}

.cs-item:hover {
    background: rgba(0, 180, 216, 0.06);
    border-color: rgba(0, 180, 216, 0.3);
    transform: translateX(2px);
}

.cs-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cs-qq {
    background: rgba(0, 150, 255, 0.12);
    color: #12b7f5;
    border: 1px solid rgba(0, 150, 255, 0.2);
}

.cs-email {
    background: rgba(76, 175, 80, 0.12);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.cs-wechat {
    background: rgba(7, 193, 96, 0.12);
    color: #07c160;
    border: 1px solid rgba(7, 193, 96, 0.2);
}

.cs-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cs-info strong {
    font-size: 13px;
    color: #eee;
    font-weight: 600;
}

.cs-info span {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.cs-arrow {
    color: #555;
    font-size: 12px;
}

.cs-item:hover .cs-arrow {
    color: #00b4d8;
}

.cs-panel-footer {
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: #666;
    text-align: center;
}

/* 微信二维码弹窗 */
.cs-qrcode-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cs-qrcode-modal.open {
    opacity: 1;
    visibility: visible;
}

.cs-qrcode-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cs-qrcode-box img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
}

.cs-qrcode-box p {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.cs-qrcode-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.cs-qrcode-close:hover {
    color: #333;
}

/* 移动端 */
@media (max-width: 768px) {
    #cs-widget { bottom: 20px; right: 16px; }
    .cs-btn { width: 50px; height: 50px; font-size: 20px; }
    .cs-panel { width: 290px; right: -10px; }
    .cs-qrcode-box img { width: 180px; height: 180px; }
}
