
    /* AI客服组件样式 */
    #ai-chat-widget {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 9999;
        font-family: 'Inter', sans-serif;
    }

    /* 客服按钮样式 */
    .chat-toggle-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #9B26B6, #d8a0eb);
        color: white;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(155, 38, 182, 0.4);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }

    .chat-toggle-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(155, 38, 182, 0.6);
    }

    /* 聊天窗口样式 */
    .chat-window {
        position: absolute;
        bottom: 80px;
        right: 0;
        width: 380px;
        height: 550px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        display: none;
        flex-direction: column;
        overflow: hidden;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .chat-window.active {
        display: flex;
    }

    /* 聊天头部 */
    .chat-header {
        background: linear-gradient(135deg, #9B26B6, #d8a0eb);
        color: white;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chat-header-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
        font-size: 16px;
    }

    .chat-header-title i {
        font-size: 20px;
    }

    .chat-close-btn {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        font-size: 20px;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.3s;
    }

    .chat-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* 聊天消息区域 */
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        background: #f8f9fa;
    }

    .message {
        margin-bottom: 15px;
        display: flex;
    }

    .message.user-message {
        justify-content: flex-end;
    }

    .message.bot-message {
        justify-content: flex-start;
    }

    .message-content {
        max-width: 75%;
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 14px;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .user-message .message-content {
        background: linear-gradient(135deg, #9B26B6, #d8a0eb);
        color: white;
        border-bottom-right-radius: 4px;
    }

    .bot-message .message-content {
        background: white;
        color: #333;
        border-bottom-left-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    /* 输入区域 */
    .chat-input-area {
        padding: 15px 20px;
        background: white;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 10px;
    }

    .chat-input {
        flex: 1;
        padding: 12px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        font-size: 14px;
        outline: none;
        transition: border-color 0.3s;
        font-family: 'Inter', sans-serif;
    }

    .chat-input:focus {
        border-color: #9B26B6;
    }

    .chat-send-btn {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: linear-gradient(135deg, #9B26B6, #d8a0eb);
        color: white;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.3s;
    }

    .chat-send-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(155, 38, 182, 0.4);
    }

    .chat-send-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

    /* 加载动画 */
    .typing-indicator {
        display: inline-block;
        padding: 12px 16px;
        background: white;
        border-radius: 12px;
        border-bottom-left-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .typing-indicator span {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #9B26B6;
        margin: 0 2px;
        animation: typing 1.4s infinite;
    }

    .typing-indicator span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-indicator span:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typing {
        0%, 60%, 100% {
            transform: translateY(0);
            opacity: 0.7;
        }
        30% {
            transform: translateY(-10px);
            opacity: 1;
        }
    }

    /* 滚动条样式 */
    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #9B26B6;
        border-radius: 3px;
    }

    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: #83259e;
    }

    /* 响应式适配 */
    @media (max-width: 768px) {
        #ai-chat-widget {
            bottom: 20px;
            right: 20px;
        }

        .chat-window {
            width: calc(100vw - 40px);
            height: 70vh;
            right: 0;
        }

        .chat-toggle-btn {
            width: 55px;
            height: 55px;
            font-size: 22px;
        }
    }
