#tumubiji-ai-assistant {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    z-index: 10000;
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.ai-assistant-toggle {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ai-assistant-toggle:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.ai-assistant-container {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    border: 1px solid #dcdcdc;
}

.ai-assistant-header {
    background: #2271b1;
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-assistant-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-assistant-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-assistant-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
}

.ai-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background: #2271b1;
    color: white;
    border-bottom-right-radius: 6px;
}

.ai-message {
    align-self: flex-start;
    background: #f0f0f1;
    color: #1d2327;
    border-bottom-left-radius: 6px;
}

.message-content {
    margin-bottom: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.ai-message .message-time {
    text-align: left;
}

.ai-assistant-input-area {
    padding: 16px;
    border-top: 1px solid #dcdcdc;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-assistant-input-area textarea {
    flex: 1;
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    padding: 10px 14px;
    resize: none;
    min-height: 40px;
    max-height: 100px;
    font-family: inherit;
    font-size: 14px;
}

.ai-assistant-input-area textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.ai-assistant-send {
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.ai-assistant-send:hover:not(:disabled) {
    background: #135e96;
}

.ai-assistant-send:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

.ai-assistant-status {
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    background: #f6f7f7;
    display: none;
}

.ai-assistant-status.error {
    color: #d63638;
    background: #fcf0f1;
}

/* 响应式设计 */
@media (max-width: 480px) {
    #tumubiji-ai-assistant {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .ai-assistant-container {
        width: auto;
        height: 400px;
    }
}

/* 滚动条样式 */
.ai-assistant-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-assistant-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.ai-assistant-messages::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 2px;
}

.ai-assistant-messages::-webkit-scrollbar-thumb:hover {
    background: #a7aaad;
}