/* 深灰终端风格，保留 Hexo 原生语法高亮和行号。 */
.post-content code,
.post-content pre {
  font-family: Consolas, Menlo, Monaco, 'PingFang SC', 'Microsoft YaHei', monospace;
  font-size: 14px;
}

.post-content code {
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(27, 31, 35, 0.05);
  color: #f47466;
}

.post-content figure.highlight,
.post-content .code-block {
  margin: 0 0 24px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #212121;
  color: #eeffff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
  line-height: 1.6;
}

.post-content pre {
  margin: 0 0 20px;
  padding: 10px 20px;
  overflow-x: auto;
  background: #212121;
  color: #eeffff;
  line-height: 1.6;
  tab-size: 4;
  white-space: pre;
}

.post-content pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  text-shadow: none;
}

.post-content figure.highlight table {
  display: block;
  width: 100%;
  margin: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  scrollbar-color: #353535 transparent;
}

.post-content figure.highlight table td {
  padding: 0;
  border: 0;
  vertical-align: top;
}

.post-content figure.highlight table tr:hover {
  background: none;
}

.post-content figure.highlight pre {
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.post-content figure.highlight .gutter pre {
  color: rgba(238, 255, 255, 0.5);
  text-align: right;
  user-select: none;
}

.post-content .code-block > pre {
  margin: 0;
}

.post-content .highlight-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px 0 75px;
  background: #1c1c1c;
  color: rgba(238, 255, 255, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

.post-content .highlight-tools::before {
  content: '';
  position: absolute;
  left: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fc625d;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
}

.post-content .code-lang {
  margin-right: auto;
  font-size: 1.15em;
  font-weight: bold;
  user-select: none;
}

.post-content .copy-notice {
  font-size: 12px;
}

.post-content .highlight-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.post-content .highlight-tools button:hover {
  color: #fff;
}

.post-content .highlight-tools button:focus-visible {
  outline: 2px solid #82aaff;
  outline-offset: -2px;
}

.post-content .highlight-tools svg {
  width: 16px;
  height: 16px;
}

.post-content .code-toggle svg {
  transition: transform 0.2s;
}

.post-content .is-collapsed .code-toggle svg {
  transform: rotate(-90deg);
}

.post-content figure.highlight.is-collapsed > table,
.post-content .is-collapsed > pre {
  display: none;
}

/* 与参考页相同的语法配色。 */
.post-content .highlight .comment { color: #969896; }
.post-content .highlight .variable,
.post-content .highlight .attribute,
.post-content .highlight .regexp,
.post-content .highlight .tag .name { color: #ff5370; }
.post-content .highlight .tag { color: #89ddff; }
.post-content .highlight .literal,
.post-content .highlight .params,
.post-content .highlight .constant,
.post-content .highlight .command { color: #f78c6c; }
.post-content .highlight .built_in { color: #ffcb6b; }
.post-content .highlight .string,
.post-content .highlight .number,
.post-content .highlight .symbol { color: #c3e88d; }
.post-content .highlight .keyword,
.post-content .highlight .title { color: #89ddff; }
.post-content .highlight .function,
.post-content .highlight .title.function_ { color: #82aaff; }
.post-content .highlight .meta,
.post-content .highlight .tag .attr { color: #c792ea; }
.post-content .highlight .deletion { color: #bf42bf; }
.post-content .highlight .addition { color: #105ede; }
