/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 24px;
}

/* 聊天框样式 */
.chat-box {
    height: 60vh;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fafafa;
}

.message {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in;
}

.message.user {
    background: #e3f2fd;
    margin-left: 15%;
    border-bottom-right-radius: 2px;
}

.message.assistant {
    background: #f5f5f5;
    margin-right: 15%;
    border-bottom-left-radius: 2px;
}

.message-header {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.message-content {
    line-height: 1.6;
    color: #4a5568;
}

/* 输入区域 */
.input-group {
    display: flex;
    gap: 8px;
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#messageInput:focus {
    outline: none;
    border-color: #90cdf4;
    box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.2);
}

#sendBtn {
    padding: 12px 24px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

#sendBtn:hover {
    background: #2b6cb0;
}

#sendBtn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    color: #718096;
    padding: 8px;
    font-size: 0.9em;
}

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

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

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}