/* ============================================================
   mk.talk.stemcell.gold 主题 — 方案 A：墨黑 × 绛红
   墨黑 #1D1D1F 为骨 · 绛红 #8B1A2B 为魂
   ============================================================ */

/* 思源宋体（加载失败时回退系统宋体） */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* ---------- 配色 ---------- */
:root {
  --md-primary-fg-color: #1D1D1F;
  --md-primary-fg-color--light: #3A3A3C;
  --md-primary-fg-color--dark: #111113;
  --md-accent-fg-color: #8B1A2B;
  --md-accent-fg-color--transparent: rgba(139, 26, 43, 0.1);
  --md-default-fg-color--light: #4A4A4C;
  --md-default-fg-color--lighter: #6E6E70;

  /* 主题辅助色 */
  --beauty-primary: #F5E9EB;   /* 绛红浅底 */
  --beauty-secondary: #F2F2F4; /* 中性浅灰 */
  --beauty-accent: #8B1A2B;
  --beauty-text: #4A4A4C;
  --beauty-light: #FAFAFA;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1D1D1F;
  --md-primary-fg-color--dark: #0E0E0F;
  --md-accent-fg-color: #A32336;
  --md-accent-fg-color--transparent: rgba(163, 35, 54, 0.15);
  --beauty-primary: #2A1A1D;
  --beauty-secondary: #262628;
  --beauty-light: #1B1B1D;
  --beauty-text: #C9C9CC;
}

/* ---------- 字体：标题宋体（古典），正文苹方（简洁） ---------- */
.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6,
.md-header__title,
.md-tabs__link {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Noto Serif CJK SC', serif;
  font-weight: 600;
}

body,
.md-content {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

/* ---------- 整体布局 ---------- */
.md-content {
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  color: var(--md-primary-fg-color);
}

.md-content h1 {
  font-size: 2rem;
  border-bottom: 3px solid var(--beauty-accent);
  padding-bottom: 0.6rem;
  margin-top: 1.2rem;
}

.md-content h2 {
  font-size: 1.5rem;
  margin-top: 2.8rem;
}

.md-content h3 {
  font-size: 1.2rem;
  margin-top: 2.2rem;
}

/* ---------- 段落 ---------- */
.md-content p {
  margin-bottom: 1.2rem;
  text-align: justify;
  color: var(--beauty-text);
}

/* ---------- 引用 ---------- */
.md-content blockquote {
  border-left: 4px solid var(--beauty-accent);
  background: var(--beauty-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
}

.md-content blockquote p {
  margin: 0;
  color: var(--beauty-text);
}

/* ---------- 表格 ---------- */
.md-content table {
  border-collapse: collapse;
  margin: 1.8rem 0;
  width: 100%;
  font-size: 0.86em;
}

.md-content table th {
  background: var(--md-primary-fg-color);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.md-content table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  color: var(--beauty-text);
}

.md-content table tr:nth-child(even) td {
  background: var(--md-default-bg-color--light);
}

/* ---------- 卡片 ---------- */
.beauty-card {
  background: var(--md-default-bg-color);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  margin: 1.8rem 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-top: 3px solid var(--beauty-accent);
}

.beauty-card h3 {
  color: var(--md-primary-fg-color);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- 提示框 ---------- */
.md-content .admonition {
  border-radius: 10px;
  margin: 1.5rem 0;
  padding: 0;
  overflow: hidden;
}

.md-content .admonition.note {
  border-left: 4px solid #3A6EA5;
}

.md-content .admonition.tip {
  border-left: 4px solid #2E8B74;
}

.md-content .admonition.warning {
  border-left: 4px solid #B8860B;
}

.md-content .admonition.danger {
  border-left: 4px solid #8B1A2B;
}

/* ---------- 图表容器 ---------- */
.chart-container {
  background: var(--md-default-bg-color);
  border-radius: 12px;
  padding: 1.8rem;
  margin: 1.8rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--md-default-fg-color--lightest);
  text-align: center;
}

.chart-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--md-primary-fg-color);
  margin-bottom: 1rem;
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

/* ---------- 数据可视化 ---------- */
.data-viz {
  background: linear-gradient(150deg, var(--md-primary-fg-color) 0%, #6E1420 130%);
  border-radius: 12px;
  padding: 1.8rem;
  margin: 1.8rem 0;
  text-align: center;
  color: #fff;
}

.data-viz h4 {
  color: #fff;
  margin-bottom: 1rem;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  height: 18px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #E08A98, #fff);
  height: 100%;
  border-radius: 20px;
  transition: width 0.8s ease;
}

/* ---------- 二维码 ---------- */
.qr-section {
  background: var(--beauty-primary);
  border-radius: 12px;
  padding: 1.8rem;
  margin: 1.8rem 0;
  text-align: center;
  border: 1px solid var(--beauty-accent);
}

.qr-section h3 {
  color: var(--md-primary-fg-color);
  margin-bottom: 1rem;
}

.qr-section img {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ---------- 章节导航 ---------- */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  background: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 10px;
}

.chapter-nav a {
  color: var(--md-accent-fg-color);
  text-decoration: none;
  font-weight: 500;
}

.chapter-nav a:hover {
  color: var(--md-accent-fg-color--light);
}

/* ---------- 统计卡片 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}

.stat-card {
  background: var(--md-default-bg-color);
  border-radius: 10px;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-top: 4px solid var(--beauty-accent);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: block;
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

.stat-label {
  color: var(--beauty-text);
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

/* ---------- 时间线 ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--beauty-accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: var(--beauty-accent);
  border-radius: 50%;
  border: 2px solid var(--md-default-bg-color);
  box-shadow: 0 0 0 2px var(--beauty-accent);
}

.timeline-content {
  background: var(--md-default-bg-color);
  border-radius: 10px;
  padding: 1.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--md-default-fg-color--lightest);
  margin-left: 1rem;
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .md-content h1 {
    font-size: 1.7rem;
  }

  .md-content h2 {
    font-size: 1.35rem;
  }

  .beauty-card,
  .chart-container,
  .data-viz {
    padding: 1.3rem;
    margin: 1.2rem 0;
  }

  .md-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ---------- 打印 ---------- */
@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer {
    display: none !important;
  }

  .md-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .beauty-card,
  .chart-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
