/* 页面宽度（知识库风格） */
.md-grid {
  max-width: 1600px;
}

/* 标题优化 */
.md-typeset h1 {
  font-weight: 700;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.md-typeset h2 {
  border-left: 4px solid #2563eb;
  padding-left: 12px;
  margin-top: 36px;
}

/* 表格优化（更现代） */
.md-typeset table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
}

.md-typeset th,
.md-typeset td {
  border: 1px solid #eef1f5;
  padding: 10px 14px;
  vertical-align: middle !important;
}

.md-typeset th {
  background: #f5f7fb;
  font-weight: 600;
}

.md-typeset tr:hover {
  background-color: #f8fafc;
}

/* 提示块优化 */
.md-typeset blockquote {
  border-left: 4px solid #3b82f6;
  background: #f8fbff;
  padding: 12px 18px;
  border-radius: 6px;
}

/* 代码块 */
.md-typeset pre {
  border-radius: 12px;
  border: 1px solid #eef1f5;
}

/* 左侧导航优化 */
.md-nav__title {
  font-weight: 600;
  font-size: 14px;
}

/* 导航选中效果 */
.md-nav__link--active {
  font-weight: 600;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 首页卡片 */
.md-typeset .grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.md-typeset .grid.cards > * {
  border: 1px solid #eef1f5;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.25s ease;
  background: white;
}

.md-typeset .grid.cards > *:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: #dbeafe;
}

/* 首页卡片标题 */
.md-typeset .grid.cards h3 {
  margin-top: 0;
}

/* 滚动条优化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 夜间模式表格标题优化 */
[data-md-color-scheme="slate"] .md-typeset th {
    background-color: #2c3e50 !important;  /* 较亮的深蓝色背景 */
    color: #ffffff !important;             /* 纯白文字，确保最大对比度 */
    font-weight: 600;
    border-color: #3a4c5e !important;      /* 可选：调整边框颜色，使其更协调 */
}

/* 可选：夜间模式下表格整体背景稍亮，提升可读性 */
[data-md-color-scheme="slate"] .md-typeset table {
    background-color: #1e2b38 !important;
}

[data-md-color-scheme="slate"] .md-typeset td {
    border-color: #3a4c5e !important;
    color: #e0e0e0 !important;
}

/* 可选：悬停效果在夜间模式下的调整 */
[data-md-color-scheme="slate"] .md-typeset tr:hover {
    background-color: #2a3b4a !important;
}

/* Mermaid 图表优化 */
.mermaid {
  overflow-x: auto;
  text-align: center;
}

.mermaid svg {
  max-width: none;
}