/* 聊天组件样式 */

/* 聊天窗口动画 */
#chat-window {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-messages {
    scroll-behavior: smooth;
}

/* 消息气泡样式 */
.message-bubble {
    display: flex;
    margin-bottom: 16px;
    animation: messageIn 0.3s ease-out;
}

.message-bubble.user {
    flex-direction: row-reverse;
}

.message-bubble.user .message-content {
    background: linear-gradient(135deg, #007bff 0%, #00bcd4 100%);
    color: white;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.message-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
    display: block;
}

/* 正在输入动画 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* 聊天图片样式 */
.chat-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
}

/* 消息中的链接样式 */
.message-content a {
    color: #007bff;
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}
