
    #spark-lite-chat-widget {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }
    
    /* 浮动按钮 */
    #spark-chat-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        transition: all 0.3s ease;
        border: 3px solid white;
    }
    
    #spark-chat-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
    }
    
    .spark-avatar {
        width: 44px;
        height: 44px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }
    
    .spark-pulse {
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(102, 126, 234, 0.4);
        animation: spark-pulse 2s infinite;
    }
    
    @keyframes spark-pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }
        100% {
            transform: scale(1.5);
            opacity: 0;
        }
    }
    
    /* 聊天窗口 */
    .spark-chat-container {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 90vw;
        max-width: 400px;
        max-height: 45vh;
        min-height: 350px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        z-index: 10001;
        display: none;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #e1e5e9;
    }
    
    .spark-chat-container.active {
        display: flex;
        animation: spark-slide-up 0.3s ease;
    }
    
    @keyframes spark-slide-up {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* 聊天头部 */
    .spark-chat-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 16px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }
    
    .spark-header-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .spark-avatar-small {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }
    
    .spark-header-text h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
    }
    
    .spark-status {
        font-size: 11px;
        opacity: 0.9;
    }
    
    .spark-header-actions {
        display: flex;
        gap: 6px;
    }
    
    .spark-header-actions button {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s ease;
    }
    
    .spark-header-actions button:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    /* 消息区域 */
    .spark-chat-messages {
        flex: 1;
        padding: 16px;
        overflow-y: auto;
        background: #f8f9fa;
        min-height: 0;
        position: relative;
    }
    
    .spark-bot-message, .spark-user-message {
        display: flex;
        margin-bottom: 16px;
        animation: spark-message-appear 0.3s ease;
    }
    
    .spark-bot-message {
        align-items: flex-start;
    }
    
    .spark-user-message {
        align-items: flex-end;
        flex-direction: row-reverse;
    }
    
    @keyframes spark-message-appear {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .spark-message-avatar {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .spark-bot-message .spark-message-avatar {
        background: #667eea;
        color: white;
        margin-right: 10px;
    }
    
    .spark-user-message .spark-message-avatar {
        background: #10b981;
        color: white;
        margin-left: 10px;
    }
    
    .spark-message-content {
        max-width: 75%;
        background: white;
        padding: 10px 14px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        position: relative;
    }
    
    .spark-bot-message .spark-message-content {
        border-bottom-left-radius: 4px;
        background: white;
    }
    
    .spark-user-message .spark-message-content {
        border-bottom-right-radius: 4px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .spark-message-content p {
        margin: 0;
        line-height: 1.4;
        font-size: 13px;
        word-wrap: break-word;
    }
    
    .spark-time {
        font-size: 10px;
        opacity: 0.7;
        margin-top: 4px;
        display: block;
    }
    
    .spark-user-message .spark-time {
        text-align: right;
    }
    
    /* 输入区域 */
    .spark-chat-input-area {
        border-top: 1px solid #e1e5e9;
        background: white;
        flex-shrink: 0;
    }
    
    .spark-input-group {
        padding: 16px;
        display: flex;
        gap: 10px;
        align-items: flex-end;
    }
    
    #spark-user-input {
        flex: 1;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 10px 16px;
        resize: none;
        font-family: inherit;
        font-size: 13px;
        max-height: 100px;
        outline: none;
        transition: border-color 0.3s ease;
        line-height: 1.4;
    }
    
    #spark-user-input:focus {
        border-color: #667eea;
    }
    
    #spark-send-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    #spark-send-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    #spark-send-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }
    
    /* 响应式设计 */
    @media (max-width: 480px) {
        .spark-chat-container {
            width: calc(100vw - 40px);
            right: 10px;
            bottom: 80px;
            max-height: 45vh;
        }
        
        #spark-chat-toggle {
            right: 10px;
            bottom: 10px;
            width: 50px;
            height: 50px;
        }
        
        .spark-avatar {
            width: 36px;
            height: 36px;
            font-size: 18px;
        }
        
        .spark-chat-header {
            padding: 12px 16px;
        }
        
        .spark-chat-messages {
            padding: 12px;
        }
        
        .spark-input-group {
            padding: 12px;
        }
    }
    
    /* 小屏幕设备 */
    @media (max-height: 600px) {
        .spark-chat-container {
            max-height: 40vh;
            min-height: 300px;
        }
    }
    
    /* 确保不超出页眉 */
    @media (min-height: 800px) {
        .spark-chat-container {
            max-height: 45vh;
        }
    }
    
    .spark-typing-indicator {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 10px 14px;
    }
    
    .spark-typing-dot {
        width: 6px;
        height: 6px;
        background: #667eea;
        border-radius: 50%;
        animation: spark-typing 1.4s infinite ease-in-out;
    }
    
    .spark-typing-dot:nth-child(1) { animation-delay: -0.32s; }
    .spark-typing-dot:nth-child(2) { animation-delay: -0.16s; }
    
    @keyframes spark-typing {
        0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
        40% { transform: scale(1); opacity: 1; }
    }
    
    /* 滚动条样式 */
    .spark-chat-messages::-webkit-scrollbar {
        width: 4px;
    }
    
    .spark-chat-messages::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }
    
    .spark-chat-messages::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .spark-chat-messages::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }