.toc a, .TableOfContents a {
  color: #2a7ae2;
  background: #eaf2fb;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.toc a:hover, .TableOfContents a:hover {
  background: #d0e6fa;
  color: #e27a2a;
}
/*
自定义字体方法：
在 style.css 头部或自定义 css 文件中添加：
:root {
  --custom-font: "你的字体名", "备用字体", sans-serif;
}
正文区域会自动应用该字体。
*/

@font-face {
  font-family: 'MapleMonoSemiBold';
  src: url('/font/MapleMono-NF-CN-SemiBold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'MapleMonoRegular';
  src: url('/font/MapleMono-NF-CN-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  line-height: 1.5em;
  background: #fafafa;
}
.header div, .container, .copyright, .menu {
  max-width: 1100px;
  margin: auto;
  padding: 0 15px;
}
.page .header div, .page .container, .page .copyright, .page .menu { max-width: 900px; }
.container { hyphens: auto; }
@media (max-width: 930px) {
  .page .container { padding: 0; }
}
main { margin-bottom: 15px; }

.content, main, .markdown-body {
  font-size: 1.15em;
  line-height: 1.8;
  font-family: 'MapleMonoRegular', var(--custom-font, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif);
  color: #222;
  background: #fff;
  padding: 2em 0;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6,
main h1, main h2, main h3, main h4, main h5, main h6,
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 {
  font-family: 'MapleMonoSemiBold', var(--custom-font, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif);
}

p {
  margin: 1em 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
  color: #1a4fa2;
}
ul, ol {
  margin: 1em 0 1em 2em;
  padding-left: 1.2em;
}
blockquote {
  background: #f5f7fa;
  border-left: 4px solid #1a4fa2;
  padding: 8px 1em 8px;
  margin: 1em 0;
  color: #555;
}
pre, code {
  background: #f7f7f7;
  border-radius: 4px;
  font-size: 1em;
}
pre {
  padding: 1em;
  overflow-x: auto;
}
code {
  padding: 2px 6px;
}

/* header and footer areas */
/* single页面美化：Tags、TOC、prev_next */
.article-meta p {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 8px 16px;
  color: #1a4fa2;
  font-size: 0.95em;
  margin: 1em 0;
  letter-spacing: 1px;
}
.article-meta p a {
  color: #2a7ae2;
  background: #eaf2fb;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.article-meta p a:hover {
  background: #d0e6fa;
}
.toc, .TableOfContents {
  background: #f7f9fc;
  border-left: 3px solid #2a7ae2;
  padding: 16px 20px;
  margin: 2em 0;
  border-radius: 8px;
  font-size: 1em;
  color: #333;
}
.toc ul, .TableOfContents ul {
  padding-left: 1.2em;
}
.prev-next, .post-nav {
  display: flex;
  justify-content: space-between;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 10px 18px;
  margin: 2em 0 1em 0;
  font-size: 1em;
  color: #1a4fa2;
}
.prev-next a, .post-nav a {
  color: #2a7ae2;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.prev-next a:hover, .post-nav a:hover {
  color: #e27a2a;
}
.header {
  border-top: 5px solid #666;
  border-bottom: 4px double #666;
  text-align: center;
  padding: 15px 0 5px;
}
.head-meta, .menu {
  display: flex;
  justify-content: space-between;
}
.header, .list section, article { background: #fff; }
.banner { font-size: 4em; }
.banner .text {
  display: block;
  line-height: 1em;
}
.list {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
}
.list section {
  flex: 1 0 350px;
  box-sizing: border-box;
  box-shadow: 0 0 8px #ccc;
  margin: 1em 0 0 15px;
  padding: 1em;
  overflow-x: hidden;
}
@media (max-width: 380px) {
  .list section { flex: auto; }
}
@media (min-width: 715px) {
  .list section { max-width: calc(50% - 15px); }
  .article-list h1 {
    overflow-x: visible;
    white-space: normal;
    text-overflow: unset;
  }
}
@media (min-width: 1080px) {
  .list section { max-width: calc(25% - 15px); }
}
.article-list a, .banner a { color: #000; }
.categories a {
  font-size: .9em;
  font-weight: bolder;
  text-transform: uppercase;
  color: #fff;
  background: #2a7ae2;
  padding: 1px 5px;
  border-radius: 3px;
  box-shadow: 0 2px 8px #e3e3e3;
  display: inline-block;
  margin-bottom: 3px;
}
h1 a:hover { text-decoration: underline; }
.article-list h1 { margin: .2em auto .2em 0; }
 .article-list h1 { font-size: 1em; }
.article-list .summary {
  font-size: 0.7em;
  line-height: 1em;
}
article { padding: 1em; }
.article-meta {
  text-decoration: none;
  background: #eee;
  padding: 5px;
  border-radius: 5px;
}
.menu, .article-meta, footer, .post-nav { text-align: center; }
.article-footer { text-align: left; }
.title { font-size: 1.2em; }
.article-list h1, .title { line-height: 1.2em; }
.article-list a, .header a, footer a, .categories a, .active a, .comments a { text-decoration: none; }
.pagination { text-align: center; }
.pagination li, .terms li { display: inline; }
.pagination a { padding: 0 .2em; }
.footer {
  background: linear-gradient(to right, #1a3d35, #004d4f, #005d71, #006a97, #0074b9, #0074b9, #0074b9, #0074b9, #006a97, #005d71, #004d4f, #1a3d35);;
  padding: 1em 0;
}
.footer, .footer a { color: #fff; }
.copyright, .copyright a { color: #ccc; }
.menu {
  margin-bottom: .5em;
  flex-wrap: wrap;
}
.menu li {
  display: inline-block;
  font-weight: bolder;
}
.menu a { padding: .5em; }
.menu a:hover {
  color: #000;
  background: #fff;
}

hr {
  border-style: dashed;
  color: #ddd;
}

/* code */
pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  overflow-x: auto;
}
code { background: #f9f9f9; }
pre code {
  background: none;
  padding: .5em;
  display: block;
}

/* 卡片底部作者和日期美化 */
.date-author {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2em;
  font-size: 0.6em;
  color: #666;
  padding: 0 2px 0px 2px;
}
.date-author .author {
  font-weight: bold;
  color: #2a7ae2;
  letter-spacing: 1px;
}
.date-author .date {
  font-style: italic;
  color: #e27a2a;
  letter-spacing: 1px;
}

/* misc elements */
img, iframe, video { max-width: 100%; }
blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}

table {
  margin: 1em auto auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
tr:nth-child(even) { background: #eee }

.thumbnail {
  height: 5.1em;
  width: 6.8em;
  float: left;
  overflow: hidden;
  margin: 5px 8px 5px 0;
  box-shadow: 0 0 8px #666;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#TableOfContents, #TOC, .comments {
  border: 1px solid #eee;
  border-radius: 5px;
}
.comments a {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 1.2em;
}
.terms { padding-left: 0; }
.post-nav {
  margin: .5em 0;
  display: flex;
  justify-content: space-between;
}
.footnotes { font-size: .9em; }
.footnotes hr {
  width: 50%;
  margin-left: 0;
}
/* break long words */
p, ul, ol, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
}
