* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    background-color: #f5f5f5;
    color: #000;
    border-radius: 10px 10px 0 0;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
}

.chat-header h1 {
    font-size: 1.2rem;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #ffffff;
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
}

/* 用户消息靠右 */
.message.user {
    flex-direction: row-reverse;
}

/* 消息内容和复制按钮的容器 */
.message-content-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

/* 消息内容样式 */
.message-content {
    padding: 16px;
    border-radius: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
}

/* 头像样式 */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-input-container {
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    gap: 10px;
}

textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    resize: none;
    outline: none;
    font-size: 15px;
    line-height: 1.4;
    max-height: 100px;
    background-color: #f5f5f5;
}

textarea:focus {
    background-color: #fff;
    border-color: #0084ff;
}

button {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

/* AI 消息样式 */
.ai .message-content {
    background-color: #f7f7f8;
    color: #000;
}

/* 用户消息样式 */
.user .message-content {
    background-color: #0084ff;
    color: #fff;
}

/* 段落样式 */
.message-content p {
    margin: 0;
}

.message-content p + p {
    margin-top: 8px;
}

/* 操作按钮容器 */
.message-actions {
    display: flex;
    margin-top: 8px;
    margin-left: 0;
}

/* 操作按钮样式 */
.action-button {
    padding: 4px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 20px;
    height: 20px;
}

.action-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 确保这个按钮样式不会被其他样式覆盖 */
.message-actions .action-button {
    width: auto;
    height: 24px;
    border-radius: 4px;
    background-color: #fff;
}

/* 确保发送按钮样式不受影响 */
.chat-input-container button {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.chat-input-container button:hover {
    background-color: #0056b3;
} 