/* Copyright (c) 2016-2025 Martin Donath <martin.donath@squidfunk.com>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS */

/* Rules */

/* Color variables */
:root {
  /* Primary color shades */
  --md-primary-fg-color: hsl(224, 76%, 48%);
  --md-primary-fg-color--light: hsl(231, 44%, 56%);
  --md-primary-fg-color--dark: hsl(231, 48%, 38%);
  --md-primary-bg-color: hsla(221, 39%, 11%, 1);
  --md-primary-bg-color--light: hsla(220, 9%, 46%, 1);

  /* Accent color shades */
  --md-accent-fg-color: hsl(231, 44%, 56%);
  --md-accent-fg-color--transparent: hsla(231, 99%, 66%, 0.1);
  --md-accent-bg-color: hsl(0, 0%, 100%);
  --md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7);
}

/* Allow to explicitly use color schemes in nested content */
[data-md-color-scheme="default"] {
  /* Indicate that the site is rendered with a light color scheme */
  color-scheme: light;

  /* Hide images for dark mode */
  img[src$="#only-dark"],
  img[src$="#gh-dark-mode-only"] {
    display: none;
  }
}

/* Default theme, i.e. light mode */
:root {
  /* Color hue in the range [0,360] - change this variable to alter the tone
       of the theme, e.g. to make it more redish or greenish */
  --md-hue: 225deg;

  /* Default color shades */
  --md-default-fg-color: hsla(217, 19%, 27%, 1);
  --md-default-fg-color--light: hsla(221, 39%, 11%, 1);
  --md-default-fg-color--lighter: hsla(224, 71%, 4%, 1);
  --md-default-fg-color--lightest: #fff;
  --md-default-bg-color: hsla(0, 0%, 100%, 1);
  --md-default-bg-color--light: hsla(216, 12%, 84%, 1);
  --md-default-bg-color--lighter: hsla(220, 9%, 46%, 1);
  --md-default-bg-color--lightest: hsla(217, 19%, 27%, 1);

  /* Code color shades */
  --md-code-fg-color: hsla(221, 39%, 11%, 1);
  --md-code-bg-color: hsla(220, 14%, 96%, 1);

  /* Code highlighting color shades */
  --md-code-hl-color: hsla(221, 83%, 53%, 1);
  --md-code-hl-color--light: hsla(217, 100%, 66%, 0.1);

  /* Code highlighting syntax color shades */
  --md-code-hl-number-color: hsla(0, 70%, 35%, 1);
  --md-code-hl-special-color: hsla(336, 74%, 35%, 1);
  --md-code-hl-function-color: hsla(201, 90%, 27%, 1);
  --md-code-hl-constant-color: hsla(273, 67%, 39%, 1);
  --md-code-hl-keyword-color: hsla(226, 71%, 40%, 1);
  --md-code-hl-string-color: hsla(143, 64%, 24%, 1);
  --md-code-hl-name-color: var(--md-code-fg-color);
  --md-code-hl-operator-color: var(--md-default-fg-color--light);
  --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
  --md-code-hl-comment-color: var(--md-default-fg-color--light);
  --md-code-hl-generic-color: var(--md-default-fg-color--light);
  --md-code-hl-variable-color: var(--md-default-fg-color--light);

  /* Typeset color shades */
  --md-typeset-color: var(--md-default-fg-color);

  /* Typeset `a` color shades */
  --md-typeset-a-color: var(--md-primary-fg-color);

  /* Typeset `del` and `ins` color shades */
  --md-typeset-del-color: hsla(6, 90%, 60%, 0.15);
  --md-typeset-ins-color: hsla(150, 90%, 44%, 0.15);

  /* Typeset `kbd` color shades */
  --md-typeset-kbd-color: hsl(0, 0%, 98%);
  --md-typeset-kbd-accent-color: hsl(0, 100%, 100%);
  --md-typeset-kbd-border-color: hsl(0, 0%, 72%);

  /* Typeset `mark` color shades */
  --md-typeset-mark-color: hsla(54, 100%, 62%, 0.5);

  /* Typeset `table` color shades */
  --md-typeset-table-color: hsla(0, 0%, 0%, 0.12);
  --md-typeset-table-color--light: hsla(0, 0%, 0%, 0.035);

  /* Admonition color shades */
  --md-admonition-fg-color: var(--md-default-fg-color);
  --md-admonition-bg-color: var(--md-default-bg-color);

  /* Warning color shades */
  --md-warning-fg-color: hsla(0, 0%, 0%, 0.87);
  --md-warning-bg-color: hsl(60, 100%, 80%);

  /* Footer color shades */
  --md-footer-fg-color: hsl(0, 0%, 100%);
  --md-footer-fg-color--light: hsla(0, 0%, 100%, 0.7);
  --md-footer-fg-color--lighter: hsla(0, 0%, 100%, 0.45);
  --md-footer-bg-color: hsla(0, 0%, 0%, 0.87);
  --md-footer-bg-color--dark: hsla(0, 0%, 0%, 0.32);

  /* Shadow depth 1 */
  --md-shadow-z1: 0 4px 10px hsla(0, 100%, 56%, 0.05), 0 0 1px hsla(0, 0%, 0%, 0.1);

  /* Shadow depth 2 */
  --md-shadow-z2: 0 4px 10px hsla(0, 0%, 0%, 0.2), 0 0 1px hsla(0, 0%, 0%, 0.25);

  /* Shadow depth 3 */
  --md-shadow-z3: 0 4px 10px hsla(0, 0%, 0%, 0.2), 0 0 1px hsla(0, 0%, 0%, 0.35);
}

:root > * {
  font-family:
    Inter,
    PingFang SC,
    system-ui,
    -apple-system,
    blinkmacsystemfont,
    Helvetica Neue,
    Segoe UI,
    helvetica,
    arial,
    Microsoft YaHei,
    WenQuanYi Micro Hei,
    sans-serif;
}

.md-header {
  background-color: #fff;
}

.md-header__button.md-logo {
  display: flex;
  align-items: center;
  height: 48px;
}

.md-header__button.md-logo img {
  width: 150px;
  padding: 0;
}

.md-header__topic:first-child {
  font-weight: 500;
}

.md-search__form {
  border-radius: 6px;
  border: 1px solid var(--color-stroke-soft, #d1d5db);
  background: var(--color-background-base, #fff) !important;
}

.md-search__input + .md-search__icon {
  color: hsla(220, 9%, 46%, 1);
}

.md-header--shadow {
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
  transition: none;
}

.md-typeset h1 {
  color: #111827;
  font-size: 32px;
  font-weight: 600;
  line-height: 48px;
}

.md-typeset h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 500;
  line-height: 36px; /* 150% */
}

.md-typeset h3 {
  color: #111827;
  font-size: 20px;
  font-weight: 500;
  line-height: 32px;
}

.md-typeset h4 {
  color: #111827;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
}

.md-grid {
  max-width: 1880px;
}

.md-main__inner {
  margin-top: 0;
}

.md-sidebar--primary {
  border-right: 1px solid #e5e7eb;
  height: auto !important;
}

.md-footer {
  display: none;
}

.md-nav__title {
  color: hsla(220, 9%, 46%, 1);
}

.md-nav__link {
  margin-top: 12px !important;
}

.md-nav--primary .md-nav__link::before {
  content: "";
  display: inline-block;
  width: 20px; /* 调整图标大小 */
  height: 20px;
  vertical-align: middle;
  background-image: url("../assets/icons/workbook-fill.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.md-content {
  padding: 0 32px 30px;
}

.md-content__inner {
  margin: 0 16px !important;
  padding-top: 24px !important;
}

.md-content__inner a {
  text-decoration: underline;
}

.md-content__inner img {
  border: 1px solid var(--md-typeset-table-color);
}

/* ===== 表格样式优化（统一宽度、首列 15%） ===== */
/* 适用于文档中所有表格，保证多表格宽度一致 */
.md-typeset table,
.md-typeset table:not([class]),
.md-typeset__table table,
.md-typeset__scrollwrap table,
.md-content__inner table {
  font-size: 14px;
  border-collapse: collapse;
  width: 100% !important; /* 统一占满容器宽度，保证多表格一致 */
  max-width: 100%;
  margin: 1em 0;
  display: table;
  /* 使用 fixed 保证跨表格列宽一致（首列由 width 控制，其余列平均分配） */
  table-layout: fixed;
}

/* 单元格基础样式：强制换行，防止撑破列宽 */
.md-typeset table th,
.md-typeset table td,
.md-typeset__table table th,
.md-typeset__table table td,
.md-content__inner table th,
.md-content__inner table td {
  padding: 12px 16px;
  border: 1px solid var(--md-typeset-table-color);
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  overflow: hidden; /* 避免内容溢出 */
  text-overflow: ellipsis; /* 长文本可见性提示（可选） */
}

/* 表头背景 */
.md-typeset table th {
  background-color: var(--md-code-bg-color);
  font-weight: 600;
}

/* 条纹 & hover */
.md-typeset table tr:nth-child(even) {
  background-color: hsla(220, 14%, 96%, 0.5);
}
.md-typeset table tr:hover {
  background-color: hsla(231, 99%, 66%, 0.04);
}

/* 首列固定占比（全文档统一） */
.md-typeset table th:first-child,
.md-typeset table td:first-child,
.md-typeset__table table th:first-child,
.md-typeset__table table td:first-child,
.md-content__inner table th:first-child,
.md-content__inner table td:first-child {
  width: 15%;
  min-width: 100px; /* 防止在窄屏过窄，可按需调整 */
  white-space: normal;
}

/* 其余列平均分配（fixed 布局下会按剩余宽度平均分配） */
.md-typeset table th:not(:first-child),
.md-typeset table td:not(:first-child),
.md-typeset__table table th:not(:first-child),
.md-typeset__table table td:not(:first-child),
.md-content__inner table th:not(:first-child),
.md-content__inner table td:not(:first-child) {
  /* 不显式设置具体百分比，让 fixed 布局按剩余列数平均分配 */
  min-width: 0;
  white-space: normal;
}

/* 移动端：允许横向滚动以避免强制压缩内容 */
@media screen and (max-width: 76.1875em) {
  .md-typeset__scrollwrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .md-typeset__scrollwrap table {
    min-width: 600px;
  }
  .md-typeset table th,
  .md-typeset table td {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ===== 修复代码块样式 ===== */
.md-typeset pre {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-x: auto !important;
  background-color: var(--md-code-bg-color) !important;
  border-radius: 6px;
  padding: 16px !important;
  margin: 1em 0 !important;
}

.md-typeset code {
  background-color: transparent !important;
  padding: 0 !important;
}

.md-typeset pre code {
  display: block;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  line-height: 1.6;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace !important;
}

/* ===== 修复列表样式 ===== */
.md-typeset ul {
  list-style-type: disc !important;
  padding-left: 2em !important;
}

.md-typeset ol {
  list-style-type: decimal !important;
  padding-left: 2em !important;
}

.md-typeset li {
  margin: 0.5em 0;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: normal !important;
}

.md-typeset li > * {
  white-space: normal !important;
}

.md-typeset li p {
  display: inline;
  margin: 0;
}

/* 嵌套列表样式 */
.md-typeset ul ul {
  list-style-type: circle !important;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.md-typeset ul ul ul {
  list-style-type: square !important;
}

.md-typeset ol ol {
  list-style-type: lower-alpha !important;
}

.md-typeset ol ol ol {
  list-style-type: lower-roman !important;
}

.md-content .admonition {
  font-size: 14px !important;
}

.md-clipboard:after {
  background-color: hsla(217, 19%, 27%, 1);
}

/* ===== 舒适度增强包（在文件末尾追加） ===== */

/* 1) 版心与排版节奏：更顺的阅读行长与段落间距 */
.md-typeset {
  max-width: 100ch; /* 控制正文行长，提升可读性 */
  line-height: 1.75; /* 更松的行距 */
  font-size: 16px; /* 轻微放大基础字号（Material 默认略小） */
  letter-spacing: 0.2px; /* 微调字距 */
}
.md-content__inner > *:not(:first-child) {
  margin-top: 1.1em; /* 元素间更自然的垂直节奏 */
}
.md-typeset p {
  margin: 0.75em 0 0.95em; /* 段落呼吸感 */
}

/* 2) 标题层级：增加层级间区分与锚点 hover 反馈 */
.md-typeset h1 {
  margin: 0.8em 0 0.6em;
}
.md-typeset h2 {
  margin: 1.4em 0 0.6em;
  border-top: 1px solid #eef1f5;
  padding-top: 0.8em;
}
.md-typeset h3 {
  margin: 1.2em 0 0.5em;
}
.md-typeset h2 .headerlink,
.md-typeset h3 .headerlink,
.md-typeset h4 .headerlink {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink {
  opacity: 0.7;
}

/* 3) 列表：行距与缩进微调（与你已有嵌套列表规则相容） */
.md-typeset ul,
.md-typeset ol {
  padding-left: 1.3em;
}
.md-typeset li {
  margin: 0.35em 0;
}

/* 4) 引用块：更柔和的视觉锚点 */
.md-typeset blockquote {
  border-left: 4px solid var(--md-default-bg-color--lighter);
  background: hsla(220, 14%, 96%, 0.6);
  padding: 0.75em 1em;
  margin: 1em 0;
  border-radius: 6px;
}

/* 5) 图片与图注：统一风格与说明文字 */
.md-typeset figure {
  margin: 1.4em 0;
  text-align: center;
}
.md-typeset figure img {
  border-radius: 8px;
}
.md-typeset figcaption {
  color: var(--md-default-bg-color--lighter);
  font-size: 0.9em;
  margin-top: 0.5em;
}

/* 6) 代码块：提升可读性、可滚动指示、可选行号 */
.md-typeset code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
}
.md-typeset pre > code {
  display: block;
  padding: 1em 1.1em;
  border-radius: 10px;
  line-height: 1.6;
  overflow: auto;
}
.md-typeset pre {
  position: relative;
  box-shadow: var(--md-shadow-z1);
}
.md-typeset pre::-webkit-scrollbar {
  height: 10px;
}
.md-typeset pre::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: hsla(220, 9%, 46%, 0.35);
}
.md-typeset pre:after {
  /* 右下角滚动小提示 */
  content: "↔↔︎︎";
  position: absolute;
  right: 0.6em;
  bottom: 0.5em;
  font-size: 12px;
  opacity: 0.35;
}

/* —— 可选：行号（需要 Pygments/Highlight 插件输出 .linenodiv 或者 .highlighttable）—— */
.highlighttable {
  border-radius: 10px;
  overflow: hidden;
}
.highlighttable td.linenos {
  background: hsla(220, 14%, 96%, 1);
  color: var(--md-default-bg-color--lighter);
  padding-right: 0.5em;
  user-select: none;
}

.md-typeset .highlighttable .linenos {
  background: hsla(220, 14%, 96%, 0.5);
  border-right: 1px solid var(--md-typeset-table-color);
  padding: 1em 0.5em;
  user-select: none;
}

.md-typeset .highlighttable .code {
  width: 100%;
}

.md-typeset .highlighttable .code .highlight {
  margin: 0;
  border-radius: 0 8px 8px 0;
}

/* ===== 代码块展示：保持换行与滚动，不受段落白空格规则影响 ===== */
.md-typeset pre,
.md-typeset code,
.md-typeset pre code {
  white-space: pre; /* 保持代码原始换行与缩进 */
}
.md-typeset pre code {
  white-space: pre; /* 强化，避免被上层覆盖 */
}

/* ===== 统一代码样式（内联代码与代码块） ===== */

/* 内联代码样式 */
.md-typeset code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
  font-size: 0.95em;
  background-color: var(--md-code-bg-color);
  color: var(--md-code-fg-color);
  padding: 0.18em 0.36em;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  white-space: pre-wrap; /* 允许换行以防溢出 */
  word-break: break-word;
  line-height: 1.3;
}

/* 代码块（fenced / pre）通用样式 */
.md-typeset pre,
.md-typeset__code,
.md-typeset .highlight,
.md-typeset pre[class*="language-"] {
  background-color: var(--md-code-bg-color);
  color: var(--md-code-fg-color);
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid var(--md-typeset-table-color);
  overflow: auto; /* 横向可滚动，避免撑破布局 */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
  margin: 0.8em 0;
  white-space: pre; /* 默认保留原格式，表内另作处理 */
}

/* 代码块内的 <code> 元素以块展示并取消重复 padding */
.md-typeset pre code,
.md-typeset__code code,
.md-typeset .highlight code {
  display: block;
  background: transparent;
  padding: 0;
  border: 0;
  color: inherit;
}

/* 表格内的代码块：允许换行以避免撑破表格列 */
.md-typeset table pre,
.md-typeset table code {
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 高亮行 / 选中行的轻度背景（如果使用语法高亮插件） */
.md-typeset .highlight .hll {
  background-color: var(--md-code-hl-color--light);
}

/* 行号（若使用行号插件）保证不影响布局 */
.md-typeset .linenodiv,
.md-typeset .linenumbers {
  float: left;
  padding-right: 12px;
  user-select: none;
  opacity: 0.6;
}

/* 小屏优化：缩小内边距与字体 */
@media screen and (max-width: 480px) {
  .md-typeset pre,
  .md-typeset__code,
  .md-typeset .highlight {
    font-size: 12px;
    padding: 10px;
  }
  .md-typeset code {
    font-size: 0.9em;
  }
}

/* 9) 目录（TOC）：当前位置高亮与粘性定位 */
.md-nav--secondary {
  position: sticky;
  top: 88px; /* 头部高度 + 间距 */
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.md-nav--secondary .md-nav__link[aria-current="page"],
.md-nav--secondary .md-nav__link--active {
  background: var(--md-accent-fg-color--transparent);
  border-radius: 6px;
}

/* 10) 侧边栏条目：交互反馈更明确 */
.md-nav__link:focus-visible,
.md-nav__link:hover {
  background: hsla(220, 14%, 96%, 0.8);
  border-radius: 6px;
}

/* 11) 链接与可访问性：悬停/焦点态、键盘导航更友好 */
.md-typeset a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.md-typeset a:focus-visible {
  outline: 3px solid var(--md-accent-fg-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 12) 页头搜索框：聚焦投影与占位色 */
.md-search__form:focus-within {
  box-shadow: 0 0 0 4px hsla(231, 99%, 66%, 0.12);
}
.md-search__input::placeholder {
  color: hsla(220, 9%, 46%, 0.75);
}

/* 13) 页内锚点滚动：平滑且尊重 prefers-reduced-motion */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 14) 暗色主题（Material: data-md-color-scheme="slate"）微调 */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: hsl(222, 18%, 12%);
  --md-default-fg-color: hsl(220, 15%, 92%);
  --md-code-bg-color: hsl(222, 18%, 10%);
  --md-typeset-table-color: hsla(0, 0%, 100%, 0.12);
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  background: hsla(0, 0%, 100%, 0.04);
  border-left-color: hsla(0, 0%, 100%, 0.12);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: hsla(0, 0%, 100%, 0.05);
  color: var(--md-default-fg-color);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(even) {
  background: hsla(0, 0%, 100%, 0.02);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background: hsla(231, 99%, 66%, 0.04);
}

[data-md-color-scheme="slate"] .md-nav__link:hover {
  background: hsla(0, 0%, 100%, 0.06);
}

/* 15) 打印友好：去阴影，合理字号与色彩 */
@media print {
  .md-header,
  .md-footer,
  .md-sidebar--primary,
  .md-sidebar--secondary {
    display: none !important;
  }
  .md-content {
    padding: 0 !important;
  }
  .md-typeset {
    max-width: none;
    font-size: 12pt;
  }
  .md-typeset pre {
    box-shadow: none;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }
}

/* ===== 修复列表项内的代码显示 ===== */
.md-typeset li code {
  white-space: nowrap;
  background: hsla(220, 14%, 96%, 0.8);
  padding: 0.1em 0.3em !important;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ===== 修复嵌套列表缩进 ===== */
.md-typeset ul ul,
.md-typeset ol ol,
.md-typeset ul ol,
.md-typeset ol ul {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

/* ===== 修复图片最大宽度 ===== */
.md-content__inner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* ===== 修复链接颜色一致性 ===== */
.md-typeset a {
  color: var(--md-typeset-a-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-typeset a:hover {
  color: var(--md-primary-fg-color--dark);
  text-decoration: underline;
}

/* ===== 修复移动端响应式 ===== */
@media screen and (max-width: 76.1875em) {
  .md-sidebar--primary {
    display: none;
  }

  .md-content {
    padding: 0 16px 20px;
  }

  .md-content__inner {
    margin: 0 8px !important;
  }

  .md-typeset table:not([class]) {
    font-size: 12px !important;
    table-layout: auto; /* 移动端使用自动布局 */
  }

  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td {
    padding: 8px 12px;
  }

  /* 移动端表格可横向滚动 */
  .md-typeset__scrollwrap {
    margin: 1em 0;
    overflow: auto;
  }

  .md-typeset__table {
    display: block;
    width: 100%;
  }

  .md-typeset__scrollwrap table:not([class]) {
    min-width: 600px;
  }
}

/* 强制移除代码块及其父容器的阴影，保留边框和背景 */
.md-typeset pre,
.md-typeset .highlight,
.md-typeset__code,
.md-content__inner pre,
pre[class*="language-"],
.md-card pre,
.md-card .highlight,
.md-typeset .md-card,
.md-typeset__card {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  background-clip: padding-box !important; /* 防止圆角 + 边框造成伪阴影 */
  border-radius: 6px !important;
  border: none !important;
  background-color: var(--md-code-bg-color) !important;
}

/* 如果外层卡片单独有阴影，清除外层卡片阴影 */
.md-card,
.md-typeset .md-card,
.md-content__inner .md-card {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  background-color: transparent !important; /* 如需保留背景，可移除此行 */
}

/* 确保代码块内部不再继承阴影 */
.md-typeset pre code,
.md-typeset .highlight code {
  box-shadow: none !important;
  background: transparent !important;
}

.md-typeset pre::after {
  content: "";
  display: none !important;
}
