/* Markdown渲染样式 */

/* 聊天消息中的Markdown内容样式 */
.message .markdown-content {
    line-height: 1.6;
    word-wrap: break-word;
}

/* 标题样式 */
.message h1, .message h2, .message h3, .message h4, .message h5, .message h6 {
    margin: 10px 0 8px 0;
    font-weight: bold;
    color: inherit;
}

.message h1 { font-size: 1.4em; }
.message h2 { font-size: 1.3em; }
.message h3 { font-size: 1.2em; }
.message h4 { font-size: 1.1em; }
.message h5 { font-size: 1.05em; }
.message h6 { font-size: 1em; }

/* 段落样式 */
.message p {
    margin: 8px 0;
    line-height: 1.6;
}

/* 列表样式 */
.message ul, .message ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message li {
    margin: 4px 0;
    line-height: 1.5;
}

/* 引用样式 */
.message blockquote {
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
    font-style: italic;
    color: #666;
}

/* 代码样式 */
.message code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.message pre {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
}

.message pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
    font-size: 0.9em;
}

/* 链接样式 */
.message a {
    color: #007bff;
    text-decoration: none;
}

.message a:hover {
    text-decoration: underline;
}

/* 图片样式 */
.message img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 水平线样式 */
.message hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 12px 0;
}

/* 粗体和斜体 */
.message strong {
    font-weight: bold;
}

.message em {
    font-style: italic;
}

/* 表格样式（如果需要） */
.message table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
}

.message th, .message td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.message th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message h1 { font-size: 1.2em; }
    .message h2 { font-size: 1.1em; }
    .message h3 { font-size: 1.05em; }
    
    .message pre {
        font-size: 0.8em;
        padding: 8px;
    }
    
    .message code {
        font-size: 0.8em;
    }
}
