:root {
  --网站风格颜色: rgb(42, 151, 140);
  --bg-color: rgb(23, 28, 33);
  --f-color: #eeeeee;
  --top-banner-color: #9e2a2b;
  --contributors-bg-color: #183656;
  --name: #c97719;
  --hover-link: #222f33;
  --shadow-color: #101010;
  --scrollbar-track-color: #222426;
  --scrollbar-thumb-color: #426556;
  --scrollbar-width: 10px;
  --光标-默认: url("/Images/Common/鼠标-默认.cur"), auto;
  --光标-手指: url("/Images/Common/鼠标-指向.cur"), pointer;
  --中文字体: "Noto Sans SC", 微软雅黑, sans-serif;
  --代码字体: "JetBrains Mono", Consolas, monospace;
  --中文代码混合字体: "JetBrains Mono", "Google Sans Code", Consolas, "Noto Sans SC", 微软雅黑, sans-serif;
}

.top-banner,
#公共页脚 {
  box-sizing: border-box;
}

:where(.top-banner, #公共页脚, .标题区, .二级目录区, .目录区, .笔记信息区) *,
:where(.top-banner, #公共页脚, .标题区, .二级目录区, .目录区, .笔记信息区) *::before,
:where(.top-banner, #公共页脚, .标题区, .二级目录区, .目录区, .笔记信息区) *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

*::-webkit-scrollbar:hover {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-color);
  border-radius: 30px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #577e6d;
}

body {
  background-color: var(--bg-color);
  color: var(--f-color);
  width: 100dvw;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
  cursor: url("/Images/Common/鼠标-默认.cur"), auto;
}

#笔记对话框 {
  position: fixed;
  width: 100%;
  height: 100%;
  margin: auto;
  background-color: transparent;
  outline: none;
  border: none;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

#关闭对话框 {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  position: fixed;
  z-index: 9999;
  top: 20px;
  right: 30px;
  outline: none;
  border: none;
  background-color: transparent;
  color: white;
  font-size: 30px;
}

#关闭对话框:hover {
  background-color: #fff3;
  filter: brightness(2);
}

#笔记对话框::backdrop {
  background-color: #00050acc;
  backdrop-filter: blur(15px);
}

.容器区 {
  width: 1000px;
  height: fit-content;
  margin: 25px auto;
  position: relative;
}

.笔记区 {
  box-sizing: border-box;
  width: 1000px;
  padding: 50px;
  background-color: #ffffff12;
  color: silver;
  font-family: var(--中文代码混合字体) !important;
  outline: solid 2px #def3;
}

.笔记区 strong {
  color: rgb(48, 150, 90);
}

.笔记区 em {
  color: rgb(255, 100, 100);
}

.前缀符号 {
  color: lightsteelblue;
}

.笔记区 li,
.笔记区 p {
  line-height: 1.75em;
}

.笔记区 ul:not(ul ul, ol ul),
.笔记区 ol:not(ul ol, ol ol) {
  list-style-position: outside;
}

ul ul,
ol ul,
ul ol,
ol ol {
  padding-left: 1.5em;
}

.笔记区 h1,
.笔记区 h2 {
  scroll-margin-top: 50px;
}

.笔记区 h1 {
  margin-bottom: 40px;
}

.笔记区 h1 > center {
  color: lightblue;
}

.笔记区 h1:not(:first-of-type) {
  margin-top: 100px;
}

.笔记区 h2:not(:first-of-type) {
  margin-top: 80px;
}

.笔记区 :where(h1, h2, h3) {
  position: relative;
}

.笔记区 :where(h1, h2, h3)::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 1px;
  background-color: #def1;
  bottom: -10px;
  left: 0;
}

.笔记区 img {
  max-width: 100%;
}

.笔记区 pre {
  border: solid 1px #def3;
}

.笔记区 code,
.笔记目录区 code {
  font-size: 14px;
  font-family: var(--中文代码混合字体);
}

.笔记区 :is(h1, h2, h3, h4, h5, h6) code {
  font-size: 1em;
}

.笔记区 code:not(pre code) {
  background-color: #fff1;
  color: rgb(207, 191, 100);
  padding: 2px 5px;
  border-radius: 5px;
}

.笔记目录区 {
  position: absolute;
  left: 100%;
  top: 0;
  height: 100%;
  font-size: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.笔记目录容器 {
  position: sticky;
  top: 75px;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--中文代码混合字体);
  animation: fadeInUp 0.25s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    /* transform: translateY(20px); */
  }
  to {
    opacity: 1;
    /* transform: translateY(0); */
  }
}

.目录分级容器 {
  text-wrap: nowrap;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  animation: slideInRight 0.45s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(10px) translateY(20px);
  }
  to {
    transform: translateX(0) translateY(0);
  }
}

.目录分级容器:hover {
  background: rgba(255, 255, 255, 0.03);
}

.一级目录,
.二级目录 {
  margin: 0;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.一级目录 > center,
.二级目录 > center {
  text-align: left;
}

.一级目录 {
  color: #e0e0e0;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  letter-spacing: 0.3px;
  border-left: 3px solid transparent;
}

.二级目录 {
  font-size: 14px;
  color: #b0b0b0;
  padding: 5px 12px 5px 40px;
  border-left: 2px solid transparent;
  position: relative;
}

.二级目录::before {
  content: "•";
  position: absolute;
  left: 25px;
  color: #666;
  font-size: 16px;
  transition: all 0.3s ease;
}

.二级目录,
.二级目录:visited,
.二级目录:link {
  color: #b0b0b0;
}

.一级目录:not(.当前目录):hover,
.二级目录:not(.当前目录):hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-left-color: rgba(255, 255, 255, 0.3);
}

.二级目录:not(.当前目录):hover::before {
  color: #999;
  transform: scale(1.2);
}

.一级目录.当前目录,
.二级目录.当前目录 {
  background: linear-gradient(135deg, rgba(78, 48, 79, 0.9) 0%, rgba(78, 48, 79, 0.7) 50%, rgba(78, 48, 79, 0.5) 100%);
  box-shadow: 0 2px 8px rgba(78, 48, 79, 0.4);
  border-left-color: #9c6b9d;
  color: #fff;
  animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(78, 48, 79, 0.4);
  }
  50% {
    box-shadow: 0 2px 12px rgba(78, 48, 79, 0.6);
  }
}

.二级目录.当前目录::before {
  color: #9c6b9d;
  transform: scale(1.3);
}

.一级目录 code,
.二级目录 code {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.9em;
}

.一级目录 strong,
.二级目录 strong {
  color: #4ade80;
  font-weight: 600;
}

.笔记信息区 {
  position: absolute;
  right: 100%;
  top: 0;
  height: 100%;
  color: silver;
  padding: 0 25px;
  font-size: 16px;
}

.笔记信息容器 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: sticky;
  top: 75px;
}

/* 作者信息组样式 - 保持现有视觉效果 */
.作者信息组 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

/* 作者头像容器样式 - 对应原来的作者容器 */
.作者头像容器 {
  width: 75px;
  height: 75px;
  position: relative;
}

/* 作者姓名标签样式 - 对应原来的作者 */
.作者姓名标签 {
  position: relative;
  padding: 2px 0;
  border-radius: 5px;
  background-color: #151515;
  font-family: var(--中文字体);
  text-decoration: none;
  color: silver;
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
}

.作者姓名标签:hover {
  text-decoration: underline;
}

.日期容器 {
  color: rgb(150, 150, 150);
  font-family: var(--中文代码混合字体);
  text-wrap: nowrap;
}

.日期子容器 {
  color: white;
  margin: 0 2px;
  font-family: "Google Sans Code", sans-serif;
}

table {
  border: solid 2px #40454a;
  border-collapse: collapse;
}

table thead {
  border-bottom: 2px solid #fff4;
}

table th,
table td {
  border: 1px solid #fff2;
  padding: 8px 15px;
}

body:has(dialog[open]) {
  overflow: hidden;
}

:where(.top-banner, #公共页脚) a {
  text-decoration: none;
}

:where(.top-banner, #公共页脚) a:link {
  color: aliceblue;
}

button:hover,
a:hover {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
}

a {
  outline: none;
}

a:link {
  color: aliceblue;
}

a:visited {
  color: aliceblue;
}

.笔记区 a:link {
  color: rgb(110, 156, 212);
}

.笔记区 a:visited {
  color: rgb(110, 156, 212);
}

:where(.top-banner, #公共页脚) button {
  border: none;
}

:where(.top-banner, #公共页脚) button:focus {
  outline: none;
}

:where(.top-banner, #公共页脚) li {
  list-style: none;
}

:where(.top-banner, #公共页脚) li > a > i {
  transition: 0.25s;
}

/* ------------------------- ↓ 页脚 ------------------------- */
#公共页脚 {
  background-color: #171c21;
  position: relative;
  bottom: 0;
  z-index: 9990;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10vw;
  width: 100vw;
  padding: 100px 0 150px;
  margin: 0 auto;
}

#页脚Logo区 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

#页脚Logo图像区 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

#页脚Logo容器 {
  width: 100px;
  height: 100px;
  border-radius: 300px;
  overflow: hidden;
}

#页脚Logo容器 > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#永恒Logo文字区 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7.5px;
}

.永恒Logo文字背景 {
  width: 75px;
  height: 75px;
  background: center/cover url(../Images/Index-Images/黄金质感-01.jpg);
}

.永恒Logo文字背景-永 {
  outline: solid 5px white;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-image: url(../Images/Index-Images/永.png);
  -webkit-mask-image: url(../Images/Index-Images/永.png);
}

.永恒Logo文字背景-恒 {
  outline: solid 5px white;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-image: url(../Images/Index-Images/恒.png);
  -webkit-mask-image: url(../Images/Index-Images/恒.png);
}

.永恒Logo文字背景 > img {
  height: 100%;
  width: 45%;
  object-fit: contain;
}

#页脚文本容器 {
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#页脚文本容器 > p {
  color: #ccc;
}

#页脚信息区 {
  display: flex;
  align-items: flex-start;
  gap: 5vw;
}

.页脚信息分区标题 {
  padding: 10px;
  margin-bottom: 10px;
}

.页脚信息分区链接 {
  width: 100%;
  height: 100%;
  padding: 7px 10px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.页脚信息分区链接图容器 {
  height: 60%;
  width: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.页脚信息分区链接图容器 > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.页脚信息分区链接 > span {
  color: gray;
  font-size: 14px;
}

.页脚信息分区链接:hover {
  background-color: #252a2e;
  box-shadow: 0 0 0 1px #888;
  border-radius: 5px;
}

.页脚信息分区链接:hover > span {
  color: silver;
}

#页脚版权提示区 {
  width: min(735px, 85%);
  position: absolute;
  bottom: 5%;
  left: 50%;
  translate: -50% 0;
}

#第三方版权声明 {
  font-size: 0.9rem;
  color: gray;
}

#第一方版权声明 {
  font-size: 0.9rem;
  color: gray;
}

/* ------------------------- ↑ 页脚 ------------------------- */

/* <!-- ------------------ ↓ 响应式设计 ------------------- --> */
@media screen and (width < 1300px) {
  #公共页脚 {
    flex-direction: column;
    gap: 50px;
  }

  #页脚Logo区 {
    height: 250px !important;
  }
}

@media screen and (max-width: 550px) {
  #公共页脚 {
    padding: 50px 0 150px 0;
  }

  #页脚Logo区 {
    padding: 0 20px;
  }

  #页脚信息区 {
    gap: 10px;
  }

  .页脚信息分区标题 {
    font-size: 1rem;
    padding: 10px 2.5px;
  }

  .页脚信息分区链接 {
    padding: 7.5px 2.5px;
    gap: 7.5px;
  }

  .页脚信息分区链接 > span {
    font-size: 0.75rem;
  }
}

@supports not selector(::-webkit-scrollbar) {
  body {
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
  }
}

/* 添加目录项的焦点状态 */
.一级目录:focus,
.二级目录:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(78, 48, 79, 0.5);
}

/* 响应式设计 */
@media screen and (max-width: 1400px) {
  .笔记目录区 {
    width: 280px;
  }

  .笔记目录容器 {
    padding: 15px 10px 15px 15px;
  }

  .一级目录 {
    font-size: 14px;
    padding: 8px 10px;
  }

  .二级目录 {
    font-size: 12px;
    padding: 6px 10px 6px 35px;
  }

  .二级目录::before {
    left: 20px;
  }
}

@media screen and (max-width: 1200px) {
  .笔记目录区 {
    position: fixed;
    left: auto;
    right: 20px;
    top: 100px;
    width: 250px;
    height: calc(100vh - 140px);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .笔记目录容器 {
    padding: 15px;
  }
}

/* <!-- ------------------ ↑ 响应式设计 ------------------- --> */

.笔记区 h2 {
  scroll-margin-top: 50px;
  font-size: 1.5em;
  font-weight: 600;
  color: #e8f4fd;
  margin: 2em 0 1em 0;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(42, 151, 140, 0.15) 0%, rgba(42, 151, 140, 0.05) 100%);
  border-left: 4px solid var(--网站风格颜色);
  border-radius: 0 8px 8px 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(42, 151, 140, 0.1);
  transition: all 0.3s ease;
}

.笔记区 h2::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--网站风格颜色) 0%, rgba(42, 151, 140, 0.7) 100%);
  border-radius: 2px;
}

/* 图片对话框样式 */
.图片对话框 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  padding: 0;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  z-index: 10000;
}

.图片对话框::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.图片对话框内容 {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.图片工具栏 {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10001;
}

.图片工具栏按钮 {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.图片工具栏按钮:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.图片工具栏按钮:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.图片工具栏按钮 svg {
  transition: all 0.3s ease;
}

.图片工具栏按钮:hover svg {
  stroke: var(--主色调);
  transform: scale(1.1);
}

.图片容器 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.放大图片 {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  cursor: zoom-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .图片工具栏 {
    top: 10px;
    right: 10px;
    gap: 8px;
    padding: 6px;
  }

  .图片工具栏按钮 {
    width: 36px;
    height: 36px;
  }

  .图片工具栏按钮 svg {
    width: 18px;
    height: 18px;
  }

  .图片容器 {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .图片工具栏 {
    top: 5px;
    right: 5px;
    gap: 6px;
    padding: 4px;
  }

  .图片工具栏按钮 {
    width: 32px;
    height: 32px;
  }

  .图片工具栏按钮 svg {
    width: 16px;
    height: 16px;
  }
}

/* 为笔记区图片添加悬停效果 */
.笔记区 img {
  max-width: 100%;
  border: solid 1px #444;
  transition: 125ms;
}
