.chat-container {
    max-width: 800px;
    margin: 50px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.chat-header {
    background-color: #f5f5f5;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.chat-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.chat-messages {
    height: 500px;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}

.chat-time {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 10px 0;
}

.chat-message {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.chat-left {
    justify-content: flex-start;
}

.chat-right {
    justify-content: flex-end;
}

.chat-user-img {
    margin: 0 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-msg-detail {
    max-width: 70%;
}

.chat-msg-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.chat-msg-content {
    position: relative;
    padding: 10px 15px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    word-wrap: break-word;
}

.chat-right .chat-msg-content {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
}

.chat-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    cursor: pointer;
}

.chat-product {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-product:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-info {
    display: flex;
    align-items: center;
}

.product-img {
    margin-right: 10px;
}

.product-img img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.loading {
    text-align: center;
    color: #999;
    padding: 10px 0;
}

.no-message {
    text-align: center;
    color: #999;
    padding: 50px 0;
}

.chat-footer {
    border-top: 1px solid #ddd;
    background-color: #f5f5f5;
    padding: 10px 20px;
}

.chat-actions {
    display: flex;
    margin-bottom: 10px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    color: #666;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #e8e8e8;
    color: #333;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
}

.chat-input-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
}

.send-btn {
    margin-left: 10px;
    padding: 0 20px;
    height: 36px;
    background-color: #1890ff;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background-color: #40a9ff;
}

.send-btn:active {
    background-color: #096dd9;
}

.emoji-panel {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.emoji-item {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.emoji-item:hover {
    background-color: #f0f0f0;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* AI助手样式 */
.ai-chat-container {
    max-width: 1000px;
    margin: 50px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ai-chat-header {
    background-color: #f5f5f5;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.ai-chat-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.ai-chat-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.ai-chat-body {
    border-bottom: 1px solid #ddd;
}

.ai-chat-body .chat-messages {
    height: 600px;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}

.ai-chat-body .message-item {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.ai-chat-body .message-item.user {
    justify-content: flex-end;
}

.ai-chat-body .message-item.ai {
    justify-content: flex-start;
}

.ai-chat-body .message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.6;
    color: #000;
}

.ai-chat-body .message-item.user .message-content {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    border-bottom-right-radius: 4px;
}

.ai-chat-body .message-item.ai .message-content {
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom-left-radius: 4px;
}

.ai-chat-body .message-item.ai .message-content.thinking {
    font-style: italic;
    color: #666;
}

.ai-chat-input {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f5f5f5;
}

.ai-chat-input .input-container {
    flex: 1;
    margin-right: 15px;
}

.ai-chat-input .uni-input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

.ai-chat-input .uni-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.ai-chat-input .send-button {
    padding: 15px 30px;
    background-color: #1890ff;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ai-chat-input .send-button:hover {
    background-color: #40a9ff;
}

.ai-chat-input .send-button:active {
    background-color: #096dd9;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .ai-chat-container {
        margin: 30px;
    }
    
    .ai-chat-body .chat-messages {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .ai-chat-container {
        margin: 20px;
        border-radius: 4px;
    }
    
    .ai-chat-header {
        padding: 15px;
    }
    
    .ai-chat-header h2 {
        font-size: 18px;
    }
    
    .ai-chat-body .chat-messages {
        height: 400px;
        padding: 15px;
    }
    
    .ai-chat-body .message-content {
        max-width: 85%;
        padding: 12px 16px;
    }
    
    .ai-chat-input {
        padding: 15px;
    }
    
    .ai-chat-input .uni-input {
        padding: 12px 16px;
    }
    
    .ai-chat-input .send-button {
        padding: 12px 24px;
    }
}