/* 基础样式与变量定义 */
:root {
    --primary-color: #4da6ff;
    --primary-light: #e6f3ff;
    --primary-dark: #0077e6;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 悬浮客服系统 */
.chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: var(--transition);
}

.chat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.chat-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}

.chat-window {
    width: 280px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: absolute;
    bottom: 75px;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1;
}

.chat-container.active .chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.chat-container.active .chat-overlay {
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.chat-header svg {
    margin-right: 10px;
}

.chat-links {
    padding: 20px;
	font-size: 14px;
}

.chat-link {
    display: block;
	border: 1px solid var(--primary-dark);
    color: var(--primary-dark);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.chat-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.chat-link2 {
    display: block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.chat-link2:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.chat-footer {
    padding: 20px;
    background: #f8f8f8;
    text-align: center;
    font-size: 16px;
    color: #666;
    border-top: 1px solid #eee;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: var(--transition);
}

.close-button:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .chat-window {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .chat-container {
        right: 20px;
        bottom: 20px;
    }
    
    .chat-window {
        width: 240px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        left: 0;
        right: 0;
        bottom: 0;
        align-items: center;
    }
    
    .chat-window {
        width: 100%;
        border-radius: 16px 16px 0 0;
        bottom: 70px;
    }
    
    .chat-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .chat-icon {
        width: 55px;
        height: 55px;
    }
}
