﻿/* ─── 天书 自定义样式 ─── */

/* 中文排版优化 */
body {
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

/* 标题字重 */
.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.md-typeset h2 {
  font-weight: 600;
}
.md-typeset h3 {
  font-weight: 600;
}

/* 首页大标题特殊处理 */
.tx-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wiki 类型的徽章 */
.type-badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.4em;
}
.type-badge.concept { background: #e0f2fe; color: #0369a1; }
.type-badge.entity { background: #dcfce7; color: #15803d; }
.type-badge.comparison { background: #fef3c7; color: #b45309; }
.type-badge.query { background: #f3e8ff; color: #7c3aed; }

/* 深色模式适配 */
[data-md-color-scheme="slate"] .type-badge.concept { background: #0c4a6e; color: #bae6fd; }
[data-md-color-scheme="slate"] .type-badge.entity { background: #14532d; color: #bbf7d0; }
[data-md-color-scheme="slate"] .type-badge.comparison { background: #78350f; color: #fde68a; }
[data-md-color-scheme="slate"] .type-badge.query { background: #4c1d95; color: #ddd6fe; }

/* 代码块样式 */
.md-typeset code {
  border-radius: 4px;
  font-size: 0.8em;
}

/* 表格样式增强 */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 引文块样式 */
blockquote {
  border-left: 4px solid #6366f1 !important;
}

/* 搜索高亮 */
[data-md-color-scheme="default"] mark {
  background: #fef08a;
  color: #1e293b;
}
[data-md-color-scheme="slate"] mark {
  background: #854d0e;
  color: #fef9c3;
}
