/**
 * 公共 Markdown 渲染样式
 * 配合 js/chat_md_render.js 使用
 * 用法：<div class="md-rendered">...</div>
 */

.md-rendered h1,
.md-rendered h2,
.md-rendered h3,
.md-rendered h4 {
  color: #fff;
  font-weight: 700;
  margin: 16px 0 10px;
  line-height: 1.4;
}
.md-rendered h1 {
  font-size: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}
.md-rendered h2 {
  font-size: 17px;
  padding-left: 8px;
  border-left: 3px solid #a78bfa;
}
.md-rendered h3 { font-size: 15px; color: #c4b5fd; }
.md-rendered h4 { font-size: 14px; color: #c4b5fd; }
.md-rendered p { margin: 8px 0; line-height: 1.8; }
.md-rendered ul,
.md-rendered ol {
  margin: 8px 0 8px 20px;
  padding-left: 16px;
}
.md-rendered li { margin: 4px 0; line-height: 1.8; }
.md-rendered code {
  background: rgba(139,92,246,0.15);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12.5px;
}
.md-rendered pre {
  background: #0f172a;
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  line-height: 1.6;
}
.md-rendered pre code {
  background: transparent;
  color: #e5e7eb;
  padding: 0;
  font-size: 12.5px;
  font-family: Consolas, Monaco, monospace;
}
.md-rendered table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.md-rendered table th {
  background: rgba(139,92,246,0.15);
  color: #fff;
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(139,92,246,0.3);
}
.md-rendered table td {
  padding: 9px 12px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.md-rendered table tr:last-child td { border-bottom: none; }
.md-rendered table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.md-rendered blockquote {
  border-left: 3px solid #a78bfa;
  padding: 8px 14px;
  background: rgba(139,92,246,0.08);
  border-radius: 6px;
  color: #d1d5db;
  margin: 10px 0;
  font-style: italic;
}
.md-rendered hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 16px 0;
}
.md-rendered a { color: #60a5fa; text-decoration: none; }
.md-rendered a:hover { text-decoration: underline; }
.md-rendered strong { color: #fff; font-weight: 700; }
.md-rendered em { color: #c4b5fd; font-style: italic; }
