 /* ---------- 标题 ---------- */
 .md-viewer h1,
 .md-viewer h2,
 .md-viewer h3,
 .md-viewer h4,
 .md-viewer h5,
 .md-viewer h6 {
     line-height: 1.5;
     margin-top: 40px;
     /* 增加上方间距，呼吸感 */
     margin-bottom: 16px;
     /* 统一底部间距 */
     font-weight: 600;
     /* 加粗增强标题感 */
     color: #1e1e1e;
     /* 深色主标题色 */
 }

 /* 一级标题 */
 .md-viewer h1 {
     font-size: 2em;
     line-height: 1.4;
 }

 /* 二级标题 */
 .md-viewer h2 {
     /* font-size: 26px; */
 }

 /* 三级标题 */
 .md-viewer h3 {
     /* font-size: 20px; */
     color: #2c3e50;
     /* 略深灰，区分层级 */
 }

 /* 四级标题 */
 .md-viewer h4 {
     /* font-size: 18px; */
     color: #2c3e50;
     margin-top: 32px;
     margin-bottom: 12px;
 }

 /* 五级标题 */
 .md-viewer h5 {
     /* font-size: 16px; */
     color: #5a6a7a;
     /* 灰色调，降低权重 */
     font-weight: 600;
     margin-top: 28px;
     margin-bottom: 10px;
 }

 /* 六级标题 */
 .md-viewer h6 {
     /* font-size: 15px; */
     color: #7b8b9b;
     font-weight: 500;
     font-style: italic;
     /* 斜体增加变化 */
     margin-top: 24px;
     margin-bottom: 8px;
     text-transform: uppercase;
     /* 大写增强识别度 */
     letter-spacing: 0.5px;
     /* 字间距 */
 }

 /* ---------- 列表 ---------- */
 .md-viewer ul,
 .md-viewer ol {
     margin: 1em 0;
     padding-left: 1.8em;
     list-style: revert !important;
 }

 .md-viewer li {
     list-style: revert !important;
     margin: 0.5em 0;
     line-height: 1.7;
     color: #000000;
 }


 /* ---------- 引用块 ---------- */
 .md-viewer blockquote {
     padding-left: 10px;
     border-left: 3px solid #DBDBDB;
     color: rgba(0, 0, 0, 0.55);
     font-size: 15px;
     padding-top: 4px;
     margin: 1em 0;
     text-indent: 0;
 }

 .md-viewer blockquote p {
     margin: 0.5em 0;
     text-align: justify;
     line-height: 1.67;
 }

 .md-viewer blockquote> :first-child {
     margin-top: 0;
 }

 .md-viewer blockquote> :last-child {
     margin-bottom: 0;
 }

 /* ---------- 代码 ---------- */
 .md-viewer code {
     font-family: "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
     font-size: 0.9em;
     background: rgba(41, 151, 247, 0.1);
     color: #2997f7;
     padding: 0.2em 0.4em;
     border-radius: 4px;
 }

 /* ---------- 代码块 ---------- */
 .md-viewer pre {
     background-color: #f5f2f0;
     padding: 1.2em;
     border-radius: 8px;
     margin: 1.8em 0;
     line-height: 1.6;
     font-size: 0.9em;
     font-family: "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;

     /* 关键修改：自动换行并取消滚动条 */
     overflow-x: hidden;
     /* 取消水平滚动条 */
     white-space: pre-wrap;
     /* 允许代码自动换行，同时保留空白符格式 */
     word-wrap: break-word;
     /* 保证长单词或 URL 也能折行 */

     /* 移除 Firefox 滚动条样式（不必要） */
     scrollbar-width: none;
     /* 完全隐藏滚动条（可选） */
 }

 .md-viewer pre code {
     background-color: transparent;
     padding: 0;
     color: inherit;
     font-size: inherit;
     border-radius: 0;
     white-space: inherit;
     /* 继承父级的换行设置 */
 }

 /* ---------- 水平线 ---------- */
 .md-viewer hr {
     background-color: #ccc;
     border: 0;
     display: block;
     height: 1px;
     max-width: 100%;
     width: 240px;
     margin: 0 auto;
 }

 /* ---------- 内联语义 ---------- */
 .md-viewer strong {
     /* font-weight: 600;  */
 }

 .md-viewer em {
     font-style: italic;
 }

 .md-viewer del {
     text-decoration: line-through;
     color: #94a3b8;
 }

 .md-viewer u {
     text-decoration: underline;
     text-underline-offset: 2px;
 }

 .md-viewer small {
     font-size: 0.875rem;
     color: #64748b;
 }

 /* ---------- 嵌入内容 ---------- */
 .md-viewer iframe,
 .md-viewer video,
 .md-viewer embed {
     max-width: 100%;
     border: none;
     border-radius: 8px;
     margin: 1.8em 0;
 }

 /* ---------- 脚注/注释（可选） ---------- */
 .md-viewer .footnote {
     font-size: 0.875rem;
     color: #64748b;
     border-top: 1px dashed #d1d5db;
     padding-top: 0.8em;
     margin-top: 2em;
 }

 /* ---------- 表格（简约无滚动条版） ---------- */
 .md-viewer table {
     width: 100%;
     border-collapse: collapse;
     font-size: 14px;
     line-height: 1.5;
     color: #334155;
     table-layout: fixed;
     /* 固定列宽，防止内容溢出 */
     word-break: break-word;
     /* 长单词自动换行 */
     margin: 1.5em 0;
 }

 .md-viewer th {
     background-color: #f8fafc;
     font-weight: 600;
     padding: 10px 12px;
     text-align: left;
     border-bottom: 2px solid #e2e8f0;
     color: #1e293b;
 }

 .md-viewer td {
     padding: 10px 12px;
     border-bottom: 1px solid #edf2f7;
 }

 .md-viewer tbody tr:nth-child(even) {
     background-color: #fafbfc;
 }

 .md-viewer tbody tr:hover {
     background-color: #f1f5f9;
 }

 /* ---------- 嵌入内容（视频/iframe）增加比例控制 ---------- */
 .md-viewer iframe,
 .md-viewer video,
 .md-viewer embed {
     max-width: 100%;
     border: none;
     border-radius: 8px;
     margin: 1.8em 0;
     /* 可选：为 iframe 添加宽高比 */
     aspect-ratio: 16 / 9;
     width: 100%;
     height: auto;
 }

 .md-viewer p {
     line-height: 1.5;
     margin-top: 22px;
     margin-bottom: 22px;
 }

 /* 上标 */
 .md-viewer sup {
     vertical-align: super !important;
     font-size: smaller !important;
 }

 /* 下标 */
 .md-viewer sub {
     vertical-align: sub !important;
     font-size: smaller !important;
 }

 .md-viewer a {
     color: var(--logo);
 }

 .md-viewer a:hover {
     color: var(--hover-color);
 }

 .md-viewer img {
     max-width: 100%;
     object-fit: cover;
 }