/* AI Plus Frontend Chat Widget */
#ai-plus-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 99998;
    transition: transform 0.2s;
}
#ai-plus-chat-btn:hover { transform: scale(1.1); }

#ai-plus-chat-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-header {
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 15px;
}

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

.ai-chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.ai-chat-msg.user {
    background: #2271b1;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.ai-chat-msg.assistant {
    background: #f0f0f0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-chat-input {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}
.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
}
.ai-chat-input input:focus { border-color: #2271b1; }
.ai-chat-input button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
}
.ai-chat-input button:hover { background: #135e96; }

/* 嵌入短代码样式 */
.ai-plus-embed-chat {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
}
.ai-plus-embed-chat .ai-chat-messages {
    min-height: 300px;
}
