/* AI助手样式 */

.ai-assistant-body {
    display: flex;
    flex-direction: column;
    height: 400px;
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(10, 20, 50, 0.5), rgba(20, 30, 60, 0.5));
}

.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.ai-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
}

.ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.ai-message.system {
    justify-content: flex-start;
}

.message-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.message-text {
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 13px;
}

.ai-message.user .message-text {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.3), rgba(0, 100, 200, 0.3));
    border: 1px solid rgba(0, 150, 255, 0.4);
    color: #00d4ff;
}

.ai-message.system .message-text {
    background: rgba(100, 150, 200, 0.15);
    border: 1px solid rgba(100, 150, 200, 0.3);
    color: #a0d8ff;
}

.ai-message.error .message-text {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff9999;
}

.ai-message.loading .message-text {
    padding: 8px 12px;
}

.loading-dots {
    display: inline-block;
    font-size: 16px;
    letter-spacing: 2px;
    animation: blink 1.4s infinite;
}

/* AI加载动画 */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #00d4ff;
    font-size: 12px;
}

.ai-loading span {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #00d4ff;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite;
}

.ai-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes blink {
    0%, 20%, 50%, 80%, 100% {
        opacity: 1;
    }
    40% {
        opacity: 0.5;
    }
    60% {
        opacity: 0.3;
    }
}

.ai-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-top: 1px solid rgba(0, 150, 255, 0.2);
}

.ai-chat-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 6px;
    color: #00d4ff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: rgba(0, 150, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.2);
}

.ai-chat-input::placeholder {
    color: rgba(0, 150, 255, 0.5);
}

.ai-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.3), rgba(0, 100, 200, 0.3));
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 6px;
    color: #00d4ff;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-send-btn:hover {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.5), rgba(0, 100, 200, 0.5));
    border-color: rgba(0, 150, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.3);
}

.ai-send-btn:active {
    transform: scale(0.98);
}

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

.ai-chat-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.ai-chat-history::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 255, 0.3);
    border-radius: 3px;
}

.ai-chat-history::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 150, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-assistant-body {
        height: 300px;
    }
    
    .message-text {
        max-width: 85%;
        font-size: 12px;
    }
    
    .ai-chat-input {
        font-size: 12px;
    }
    
    .ai-send-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
}
