/*
  fastcopy.cn 自定义样式
  在 bearblog 主题默认 style.html 之后加载，用于：
  1. 增大字体、提升中文可读性
  2. 优化配色（护眼暖色调，符合 W3C 对比度）
  3. 优化排版细节
*/

:root {
  /* 增大正文字号：默认 1em → 1.16em（约 18.5px） */
  --font-scale: 1.16em;
  /* 正文用中文友好字体栈，替代默认的 Verdana */
  --font-main: -apple-system, "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-secondary: -apple-system, "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  /* 正文字号 */
  --font-size: 18px;

  /* 护眼暖色配色（浅色） */
  --background-color: #f7f3ec;
  --heading-color: #2b2622;
  --text-color: #3b3530;
  --link-color: #1a5490;
  --visited-color: #6b3fa0;
  --blockquote-color: #5a524a;
  --border-color: #e0d8c8;

  /* 放宽正文宽度，更适合中文阅读 */
  --width: 820px;
}

/* 暗色模式：柔和深色 */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #22262e;
    --heading-color: #eef2f7;
    --text-color: #cfd6e0;
    --link-color: #8eaecf;
    --visited-color: #b89dd9;
    --blockquote-color: #a9b2c0;
    --border-color: #3a414d;
  }
}

body {
  font-size: var(--font-size);
  line-height: 1.9;
}

/* 正文放大 + 行高 + 两端对齐 */
main content,
main > div,
main article {
  font-size: 1.06em;
  line-height: 1.95;
}

main p {
  margin: 1.1em 0;
  overflow-wrap: break-word;
  text-align: justify;
}

/* 标题层级优化 */
h1 {
  font-size: 2em;
  line-height: 1.3;
  margin-top: 1.4em;
  margin-bottom: 0.8em;
}
h2 {
  font-size: 1.5em;
  line-height: 1.35;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border-color);
}
h3 {
  font-size: 1.22em;
  line-height: 1.4;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}
h4, h5, h6 {
  line-height: 1.45;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}

/* 链接保持主题色，hover 更明显 */
a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* 站点标题 */
.title h2 {
  font-size: 1.6em;
}

/* 列表间距 */
ul, ol {
  padding-left: 1.6em;
}
li {
  margin-bottom: 0.35em;
  line-height: 1.9;
}

/* 表格优化：边框、内边距、表头底色 */
table {
  border-collapse: collapse;
  margin: 1.4em 0;
}
th, td {
  border: 1px solid var(--border-color);
  padding: 0.6em 1em;
  text-align: left;
  line-height: 1.7;
}
th {
  background-color: var(--border-color);
  font-weight: 600;
}

/* 引用块 */
blockquote {
  border-left: 4px solid var(--link-color);
  color: var(--blockquote-color);
  padding-left: 1.2em;
  margin: 1.4em 0;
}

/* 代码块 */
code {
  font-size: 0.92em;
  background: var(--border-color);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre {
  font-size: 0.92em;
  line-height: 1.6;
  padding: 1em 1.2em;
  border-radius: 6px;
  overflow-x: auto;
}
pre code {
  background: none;
  padding: 0;
}

/* 图片居中、圆角、阴影 */
main img {
  border-radius: 8px;
  margin: 1.2em auto;
  display: block;
  height: auto;
}

/* 分隔线 */
hr {
  border-top: 1px solid var(--border-color);
}

/* 博客列表：间距与字号 */
ul.blog-posts li {
  padding: 0.45em 0;
  align-items: baseline;
  font-size: 1.08em;
}
ul.blog-posts li a {
  font-size: 1.1em;
}

/* 日期：加大、中文友好字体，更易读 */
time {
  font-family: var(--font-secondary);
  font-size: 0.95em;
  color: var(--gray-500, #8a8577);
}

/* 底部 footer 文字统一加大、居中 */
footer {
  text-align: center;
  font-size: 1em;
}
footer small {
  font-size: 0.95em;
  line-height: 2;
}
footer small a {
  white-space: nowrap;
}

/* 导航间距 */
nav {
  margin: 0.6em 0 1.2em;
}
nav a {
  font-size: 1.02em;
}

/* 内容区底部留白 */
main {
  padding-bottom: 1.5em;
}

/* 标签区（taxonomy）间距 */
small div {
  margin: 1.2em 0;
  line-height: 2;
}
small div a {
  margin-right: 0.8em;
}