/* 优化方案：移除通配符属性选择器，使用具体的类名选择器 */
/* 原始选择器：code[class*="language-"], pre[class*="language-"] */
/* 优化后：为代码块添加具体的类名，如 language-css, language-js 等 */
code.language-css,
code.language-javascript,
code.language-html,
code.language-python,
code.language-php,
code.language-java,
code.language-cpp,
code.language-csharp,
code.language-ruby,
code.language-go,
code.language-rust,
code.language-swift,
code.language-typescript,
code.language-sql,
code.language-json,
code.language-xml,
code.language-markdown,
code.language-bash,
code.language-yaml,
code.language-toml,
pre.language-css,
pre.language-javascript,
pre.language-html,
pre.language-python,
pre.language-php,
pre.language-java,
pre.language-cpp,
pre.language-csharp,
pre.language-ruby,
pre.language-go,
pre.language-rust,
pre.language-swift,
pre.language-typescript,
pre.language-sql,
pre.language-json,
pre.language-xml,
pre.language-markdown,
pre.language-bash,
pre.language-yaml,
pre.language-toml {
  color: #333333;
  background: #f7f7f7;
  text-shadow: 0 1px rgba(255, 255, 255, 0.5);
  font-family: "SimHei", "Microsoft YaHei", sans-serif, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 2;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre.language-css,
pre.language-javascript,
pre.language-html,
pre.language-python,
pre.language-php,
pre.language-java,
pre.language-cpp,
pre.language-csharp,
pre.language-ruby,
pre.language-go,
pre.language-rust,
pre.language-swift,
pre.language-typescript,
pre.language-sql,
pre.language-json,
pre.language-xml,
pre.language-markdown,
pre.language-bash,
pre.language-yaml,
pre.language-toml {
  padding: 0.5em;
  margin: 0.5em 0;
  overflow: auto;
  background: #f7f7f7;
}

:not(pre) > code.language-css,
:not(pre) > code.language-javascript,
:not(pre) > code.language-html,
:not(pre) > code.language-python,
:not(pre) > code.language-php,
:not(pre) > code.language-java,
:not(pre) > code.language-cpp,
:not(pre) > code.language-csharp,
:not(pre) > code.language-ruby,
:not(pre) > code.language-go,
:not(pre) > code.language-rust,
:not(pre) > code.language-swift,
:not(pre) > code.language-typescript,
:not(pre) > code.language-sql,
:not(pre) > code.language-json,
:not(pre) > code.language-xml,
:not(pre) > code.language-markdown,
:not(pre) > code.language-bash,
:not(pre) > code.language-yaml,
:not(pre) > code.language-toml {
  background: #eaeaea;
  padding: 0.1em;
  border-radius: 0.3em;
  white-space: normal;
}

/* 语法高亮颜色保持不变，但调整了部分颜色以适配浅色背景 */
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #666666;
}

.token.punctuation {
  color: #555555;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
  color: #b22222;
}

.token.function-name {
  color: #1e5fa8;
}

.token.boolean,
.token.number,
.token.function {
  color: #d2691e;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
  color: #b8860b;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
  color: #8a2be2;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
  color: #2e8b57;
}

.token.operator,
.token.entity,
.token.url {
  color: #008080;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: #228b22;
}

/* 以下部分保持不变，仅调整背景和文字颜色 */
pre.line-numbers {
  padding-bottom: 0.8em;
  padding-left: 3.3em;
  counter-reset: linenumber;
  background: #f7f7f7;
}

pre.line-numbers > code {
  white-space: inherit;
  font-size: 15px;
  background: transparent;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -0.1em;
  width: 3em;
  letter-spacing: -1px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-hyphens: none;
  user-select: none;
}

.line-numbers-rows > span {
  pointer-events: none;
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #666666;
  display: block;
  padding-right: 0.9em;
  text-align: right;
  background: #e0e0e0;
}

div.code-toolbar {
  font-size: 100%;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.1);
  padding-top: 30px;
  background-color: #e8e8e8;
  margin: 20px 0 20px 0;
}

.code-toolbar:before {
  content: " ";
  position: absolute;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  background: #fc625d;
  width: 11px;
  height: 11px;
  left: 10px;
  top: 10px;
  -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  z-index: 2;
}

div.code-toolbar > .toolbar {
  padding-right: 0.4em;
  position: absolute;
  top: 0.09em;
  right: 0.2em;
  width: 100%;
  text-align: center;
}

div.code-toolbar:hover > .toolbar {
  opacity: 1;
}

div.code-toolbar > .toolbar .toolbar-item {
  padding: 0 1px 1px 3px;
  display: inline-block;
}

div.code-toolbar > .toolbar button {
  cursor: pointer;
  transition: all 0.3s;
  position: absolute;
  background-color: transparent;
  right: 6px;
  top: 4px;
  font-size: 12px;
  line-height: 12px;
  padding: 3px 5px;
  border: 1px solid;
  border-radius: 6px;
  opacity: 0;
  color: #333333;
  border-color: #666666;
}

div.code-toolbar:hover button {
  opacity: 1;
}

div.code-toolbar > .toolbar:hover {
  text-decoration: none !important;
}

div.code-toolbar > .div.code-toolbar > .toolbar button,
div.code-toolbar > .toolbar span {
  font-family: "SimHei", "Microsoft YaHei", sans-serif, 'Ubuntu', sans-serif;
  font-weight: bold;
  font-size: 0.9em;
  opacity: 0;
  color: #333333;
}

div.code-toolbar:hover .toolbar span {
  opacity: 1;
}

#post-content .code-block-fullscreen {
  padding-top: 32px;
  position: fixed;
  width: 80vw;
  height: 80vh;
  min-height: 80vh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  z-index: 9999999;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2);
  animation: elastic 1s;
  overflow: hidden;
  background: #f0f0f0;
}

.code-block-fullscreen code {
  --widthA: 100%;
  --widthB: calc(var(--widthA) - 30px);
  height: var(--widthB);
  min-height: 99%;
  overflow-y: scroll;
  height: 100%;
  background: #f0f0f0;
}

.code-block-fullscreen-html-scroll {
  overflow: hidden;
}

.shelter {
  width: 6.5px;
  height: 6.5px;
  z-index: 100;
  background: #d0d0d0;
  position: absolute;
  bottom: 0;
  right: 0;
}

.max-img::-webkit-scrollbar-track-piece {
  background: #eee;
}

.max-img::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

.max-img::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background-color: #aaa;
}

.max-img::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

pre::-webkit-scrollbar-track-piece {
  background: #f0f0f0;
}

pre::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

pre::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: #bbb;
}

pre::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

code::-webkit-scrollbar-track-piece {
  background: #f0f0f0;
}

code::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

code::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background-color: #aaa;
}

code::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

html::-webkit-scrollbar-track-piece {
  background: #eee;
}

html::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

html::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: #bbb;
}

html::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}
