/* 让 docsify 和首页视觉保持一致：等宽字体 + 同色系，无侧边栏居中排版 */
:root {
  --theme-color: #2b6cb0;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace,
          "SFMono-Regular", Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;
}

body {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0;
}

/* 没有侧边栏，正文居中 */
.sidebar,
.sidebar-toggle,
.progress {
  display: none !important;
}

.content {
  left: 0 !important;
  padding-top: 0 !important;
}

.markdown-section {
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.75;
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.2rem 1.5rem 2rem;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -.01em;
}

.markdown-section h1 { font-size: 1.5rem; }
.markdown-section h2 { font-size: 1.18rem; }

.markdown-section pre,
.markdown-section code {
  font-family: var(--mono);
}

.markdown-section pre {
  border-radius: 6px;
  border: 1px solid rgba(128, 128, 128, .22);
}

.markdown-section pre > code {
  border-radius: 0;
  background: transparent;
}

.markdown-section blockquote {
  border-left: 2px solid rgba(128, 128, 128, .4);
  color: #8a8a85;
  padding-left: 1rem;
}

.markdown-section table td,
.markdown-section table th {
  border-color: rgba(128, 128, 128, .28);
}

/* ---- 评论区占位 ---- */
#comments {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(128, 128, 128, .38);
}

#comments h2 {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8a8a85;
  margin: 0 0 .7rem;
}

.comment-tip {
  color: #8a8a85;
  font-size: .82rem;
}

#comments-container {
  min-height: 120px;
  border: 1px dashed rgba(128, 128, 128, .3);
  border-radius: 6px;
  margin-top: .8rem;
}

/* 文章标题上方的返回链接 */
.back-link {
  margin: 0 0 1.5rem;
  font-size: .8rem;
  letter-spacing: .04em;
}

.back-link a {
  color: #8a8a85;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}

.back-link a:hover {
  color: var(--theme-color);
  border-bottom-color: currentColor;
}

body.dark .markdown-section {
  color: #e8e8e4;
}

/* ---- 深色模式：背景与首页 (#141414) 保持一致 ---- */
@media (prefers-color-scheme: dark) {
  html,
  body,
  .content,
  article.markdown-section,
  .markdown-section,
  .sidebar,
  .sidebar-nav {
    background-color: #141414 !important;
  }

  body,
  .markdown-section {
    color: #e8e8e4;
  }

  .markdown-section h1,
  .markdown-section h2,
  .markdown-section h3,
  .markdown-section h4,
  .markdown-section strong {
    color: #e8e8e4;
  }

  .markdown-section a {
    color: #7aa9dd;
  }

  .markdown-section blockquote,
  .comment-tip,
  #comments h2,
  .back-link a {
    color: #7d7d78;
  }

  .markdown-section h2 {
    border-bottom-color: rgba(255, 255, 255, .08);
  }

  .markdown-section pre {
    background: #1b1b1a;
    border-color: rgba(255, 255, 255, .08);
  }

  .markdown-section pre > code {
    background: transparent;
    color: #e8e8e4;
  }

  .markdown-section code {
    background: rgba(255, 255, 255, .07);
    color: #e8e8e4;
  }

  #comments {
    border-top-color: rgba(255, 255, 255, .12);
  }

  #comments-container {
    border-color: rgba(255, 255, 255, .12);
  }
}

@media (max-width: 768px) {
  .markdown-section { padding: 2.4rem 1.1rem 2rem; }
  .top-link { display: none; }
}
