/* style.css */
@import url("primer.css");
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #7e57ff;
  --secondary-color: #ff4f9a;
  --accent-color: #00dcdc;
  --h1-color: linear-gradient(135deg, #3700ff, #00f50c);
  --h1-color-dark: linear-gradient(135deg, #2a4cff, #00f50c);
  --h1-color-auto: linear-gradient(135deg, #2f51ff, #00f50c);
  --h2-color: linear-gradient(135deg, #8521ff, #59ff00);
  --h3-color: linear-gradient(135deg, #754bff, #40e7e7);
  --h4-color: linear-gradient(135deg, #008f11, #ff7cb7);
  --h5-color: linear-gradient(135deg, #f727d7, #12ffff);
  --h6-color: linear-gradient(135deg, #ff4f9a, #fcff43);
  --content-h1-a: #3700ff;
  --content-h1-a-dark: #2a4cff;
  --content-h1-a-auto: #4665ff;
  --content-h2-a: #8521ff;
  --content-h3-a: #754bff;
  --content-h4-a: #008f11;
  --content-h5-a: #f727d7;
  --content-h6-a: #ff7cb7;
  --bg-primary: #0a0a20;
  --bg-secondary: #12122a;
  --global-bg: #070720; 
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --border-radius: 8px;
  --box-shadow: 0 5px 20px rgba(100, 120, 220, 0.15);
  --box-shadow-highlight: 0 8px 30px rgba(126, 87, 255, 0.2);
  --box-shadow-inset: inset 0 0 8px rgba(0, 0, 0, 0.1);
  --max-width: 1012px;
  --footer-text-color: #7474f1;
  --footer-text-dark-color: #d3d3f9;
  --text-color: #f0f0f0;
  --text-secondary-color: #c4c4c4;
  --light-global-bg: #f0f0f0; /* 亮色模式背景 */
  /* 动画相关变量 */
  --gradient-animation-speed: 15s;
  --hover-transition-speed: 0.3s;
}


/* 背景设置 */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: var(--global-bg) !important; /* 强制应用背景色 */
}

html {
  height: 100%;
  overflow-y: scroll; /* 只在html上保留滚动 */
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  overflow: visible !important;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: transparent !important;
  box-shadow: none;
  border-radius: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

/* 恢复背景动画效果 */
@keyframes floatingParticles {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.2; }
  100% { transform: translateY(0) rotate(360deg); opacity: 0.8; }
}

@keyframes flowingEffect {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.2; }
}

@keyframes gradientShift {
  0% { 
    opacity: 0.8;
    transform: scale(1) rotate(0deg); 
  }
  50% { 
    opacity: 1;
    transform: scale(1.1) rotate(3deg); 
  }
  100% { 
    opacity: 0.9;
    transform: scale(1.05) rotate(-2deg); 
  }
}

/* 全站背景元素 - 固定背景 */
#fixed-background {
  position: fixed;
  z-index: -999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--global-bg); /* 固定深蓝色背景 */
  overflow: hidden !important;
}

/* 背景渐变效果 - 静态渐变 */
#fixed-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 80% 10%, rgba(172, 185, 0, 0.15), transparent 25%),
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.15), transparent 20%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.15), transparent 30%),
    radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.15), transparent 20%);
  z-index: -998;
  pointer-events: none;
}

/* 暗色模式变体背景 */
html[data-color-mode="dark"] #fixed-background::before {
  background: 
    radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%),
}

/* 亮色模式变体背景 */
html[data-color-mode="light"] {
  --global-bg: #f0f0f0;
  background: 
    radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%) ,
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(40, 9, 140, 0.2), transparent 25%),
    repeating-linear-gradient(45deg, rgba(200, 210, 255, 0.4) 0%, rgba(220, 230, 255, 0.4) 10%),
    linear-gradient(135deg, #d0e0ff 0%, #e8edff 100%) !important;
  --text-color: #333;
}

/* Auto模式变体背景 - 跟随系统 */
html[data-color-mode="auto"] {
  --global-bg: #f0f0f0;
  --text-color: #333;
  color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] {
    --global-bg: #070720;
    --text-color: #f0f0f0;
    background: var(--global-bg) !important;
    color: var(--text-color);
  }
  
  html[data-color-mode="auto"] body {
    color: var(--text-color);
  }
  
  html[data-color-mode="auto"] #fixed-background::before {
    background: 
      radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
      radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
      radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
      radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%);
  }
  
  html[data-color-mode="auto"] body::before {
    background: 
      radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 25%),
      radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 20%),
      radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 30%),
      radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 20%);
    background-attachment: fixed !important;
  }
}

@media (prefers-color-scheme: light) {
  html[data-color-mode="auto"] {
    background: 
      radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%) ,
      radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
      radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
      radial-gradient(circle at 10% 85%, rgba(40, 9, 140, 0.2), transparent 25%),
      repeating-linear-gradient(45deg, rgba(200, 210, 255, 0.4) 0%, rgba(220, 230, 255, 0.4) 10%),
      linear-gradient(135deg, #d0e0ff 0%, #e8edff 100%) !important;
  }
  
  html[data-color-mode="auto"] #fixed-background::before {
    background: 
      radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
      radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
      radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
      radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%),
      repeating-linear-gradient(45deg, rgba(200, 210, 255, 0.4) 0%, rgba(220, 230, 255, 0.4) 10%),
      linear-gradient(135deg, #d0e0ff 0%, #e8edff 100%) !important;
    animation: backgroundShimmerLight 30s ease-in-out infinite alternate;
    background-attachment: fixed !important;
  }
  
  html[data-color-mode="auto"] body::before {
    background: 
      radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
      radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
      radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
      radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%);
    background-attachment: fixed !important;
  }
  
  html[data-color-mode="auto"] body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      radial-gradient(circle at 30% 40%, rgba(126, 87, 255, 0.05) 0%, transparent 45%),
      radial-gradient(circle at 70% 60%, rgba(0, 220, 220, 0.05) 0%, transparent 45%);
    z-index: -2;
    animation: rotateGlow 25s linear infinite;
    pointer-events: none;
    overflow: hidden !important;
  }
}

html[data-color-mode="light"] #fixed-background::before {
  background: 
    radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%),
    repeating-linear-gradient(45deg, rgba(200, 210, 255, 0.4) 0%, rgba(220, 230, 255, 0.4) 10%),
    linear-gradient(135deg, #d0e0ff 0%, #e8edff 100%) !important;
  animation: backgroundShimmerLight 30s ease-in-out infinite alternate;
  background-attachment: fixed !important;
}

/* 亮色模式下的背景处理 */
html[data-color-mode="light"] body::before {
  background: 
    radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 30%),
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 25%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 35%),
    radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 25%);
  background-attachment: fixed !important;
}

/* 暗色模式下的背景处理 */
html[data-color-mode="dark"] body::before {
  background: 
    radial-gradient(circle at 80% 10%, rgba(126, 87, 255, 0.2), transparent 25%),
    radial-gradient(circle at 20% 30%, rgba(0, 220, 220, 0.2), transparent 20%),
    radial-gradient(circle at 70% 65%, rgba(255, 79, 154, 0.2), transparent 30%),
    radial-gradient(circle at 10% 85%, rgba(126, 87, 255, 0.2), transparent 20%);
  background-attachment: fixed !important;
}

/* 添加额外的背景动画样式 */
@keyframes backgroundShimmerDark {
  0% {
    background-position: 0% 0%;
    background-size: 100% 100%;
  }
  50% {
    background-position: 100% 100%;
    background-size: 120% 120%;
  }
  100% {
    background-position: 0% 0%;
    background-size: 100% 100%;
  }
}

/* 为亮色模式添加光晕效果 */
html[data-color-mode="light"] body::after {
  content: "";
  position: fixed; /* 改为fixed避免滚动问题 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 30% 40%, rgba(126, 87, 255, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(0, 220, 220, 0.05) 0%, transparent 45%);
  z-index: -2;
  animation: rotateGlow 25s linear infinite;
  pointer-events: none;
  overflow: hidden !important;
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 主题切换过渡动画 */
.theme-transition {
  transition: background-color 0.5s ease,
              color 0.5s ease,
              border-color 0.5s ease,
              box-shadow 0.5s ease !important;
}

.theme-transition * {
  transition: background-color 0.5s ease,
              color 0.5s ease,
              border-color 0.5s ease,
              box-shadow 0.5s ease !important;
}

/* 保留博客标题渐变动画 */
@keyframes gradient {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.blogTitle {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradient 5s ease infinite;
}

/* 添加媒体查询以确保在移动设备上正常显示 */
@media all and (max-width: 768px) {
  /* 移除所有标签样式 */
}

/* 调整内容区域居中显示 */
#content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

/* 调整主要内容区域的容器 */
.container, .container-lg, .container-md, .container-sm, .container-xl {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* 调整列表容器 */
#indexPostsList, .Box-body, main, main > div {
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-width);
}

/* 调整文章卡片 */
.Box-row, #indexPostsList > div, tr.post-item, .post-list > div, .d-flex {
  width: 100%;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

/* 调整表格容器 */
table {
  width: 100%;
  margin: 0 auto;
}

/* 调整标题区域 */
#header {
  max-width: calc(var(--max-width) - 40px);
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  margin-bottom: 1.5rem;
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(to right, rgba(250, 250, 255, 0.98), rgba(250, 250, 255, 0.90));
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 美化滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
  background-clip: content-box;
  border: 5px solid transparent;
}

/* 标题样式增强 - 移除全局样式 */
h1, h2, h3, h4, h5, h6 {
  /* 移除全局样式，保留必要的基础样式 */
  scroll-margin-top: 80px;
  scroll-behavior: smooth;
}

/* 标题锚点添加空间用于显示跳转后位置 */
h1::before, h2::before, h3::before, h4::before, h5::before, h6::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
  visibility: hidden;
  pointer-events: none;
}

/* 仅对content内的标题应用样式 */
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
  display: block !important;
  width: 100% !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: 100% !important;
  line-height: 1.5 !important;
  margin: 1.5em 0 0.8em 0 !important;
  padding-bottom: 0.3em !important;
  clear: both !important;
  /* 让标题有锚点定位时能够正确显示，不被顶栏遮挡 */
  scroll-margin-top: 80px !important;
  position: relative !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  -webkit-font-smoothing: antialiased !important;
}

/* 不同级别标题样式差异化 - 仅对content内的标题 */
#postBody h1 {
  margin: 1px !important;
  font-size: 2.5em !important;
  margin-top: 2em !important;
  padding-bottom: 0.5em !important;
  border-bottom: 2px solid rgba(126, 87, 255, 0.3) !important;
  background: var(--h1-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-image: linear-gradient(to right, #7e57ff, transparent) 1 !important;
  font-family: "Poppins", sans-serif !important;
  letter-spacing: 0.8px !important;
  text-shadow: 0 2px 10px rgba(126, 87, 255, 0.15);
}
html[data-color-mode="dark"] #postBody h1 {
  margin: 1px !important;
  font-size: 2.5em !important;
  padding-bottom: 0.5em !important;
  border-bottom: 2px solid rgba(126, 87, 255, 0.3) !important;
  background: var(--h1-color-dark);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-image: linear-gradient(to right, #7e57ff, transparent) 1 !important;
  font-family: "Poppins", sans-serif !important;
  letter-spacing: 0.8px !important;
  text-shadow: 0 2px 10px rgba(126, 87, 255, 0.15);
} 
html[data-color-mode="auto"] #postBody h1 {
  margin: 1px !important;
  font-size: 2.5em !important;

  padding-bottom: 0.5em !important;
  border-bottom: 2px solid rgba(126, 87, 255, 0.3) !important;
  background: var(--h1-color-auto);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-image: linear-gradient(to right, #7e57ff, transparent) 1 !important;
  font-family: "Poppins", sans-serif !important;
  letter-spacing: 0.8px !important;
  text-shadow: 0 2px 10px rgba(126, 87, 255, 0.15);
} 

#postBody h2 {
  font-size: 1.8em !important;
  margin-top: 1.8em !important;
  padding-bottom: 0.4em !important;
  border-bottom: 1px solid rgba(255, 79, 154, 0.3) !important;
  background: var(--h2-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 8px !important;
  border-left: 4px solid rgba(72, 230, 106, 0.7) !important;
  font-family: "Poppins", sans-serif !important;
  letter-spacing: 0.6px !important;
}
#postBody h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgba(72, 230, 106, 0.7), transparent);
}

#postBody h3 {
  font-size: 1.5em !important;
  background: var(--h3-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 6px !important;
  border-left: 3px solid rgba(13, 218, 218, 0.7) !important;
  letter-spacing: 0.4px !important;
  position: relative !important;
}

#postBody h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgba(13, 218, 218, 0.7), transparent);
}
#postBody h4::before {
  content: "# ";
  font-weight: bold;
  opacity: 0.6;
  -webkit-text-fill-color: initial;
  color: var(--primary-color);
}

#postBody h4 {
  font-size: 1.3em !important;
  background: var(--h4-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 0 !important;
  position: relative !important;
  display: inline-block !important;
  letter-spacing: 0.3px !important;
  border-left: 4px solid rgba(192, 147, 176) !important;
}

#postBody h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgb(192, 147, 176), transparent);
}

#postBody h5 {
  font-size: 1.1em !important;
  background: var(--h5-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600 !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
  border-left: 4px solid rgb(173, 178, 250) !important;
}

#postBody h5::before {
  content: "•• ";
  font-weight: bold;
  opacity: 0.6;
  -webkit-text-fill-color: initial;
  color: var(--secondary-color);
}
#postBody h5::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgb(173, 178, 250), transparent);
}
#postBody h6 {
  font-size: 1em !important;
  background: var(--h6-color);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600 !important;
  font-style: italic !important;
  margin-left: 10px !important;
  border-left: 4px solid rgb(207, 203, 116) !important;
}

#postBody h6::before {
  content: "••• ";
  font-weight: bold;
  opacity: 0.6;
  -webkit-text-fill-color: initial;
  color: var(--accent-color);
}
#postBody h6::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgb(207, 203, 116), transparent);
}

/* 标题中的链接样式 */
#content h1 a, #content h2 a, #content h3 a, #content h4 a, #content h5 a, #content h6 a {
  text-decoration: none;
  font-weight: inherit;
  transition: all 0.3s ease;
  -webkit-text-fill-color: initial;
  opacity: 0.9;
  border-bottom: 1px dashed rgba(126, 87, 255, 0.3);
  color: inherit;
}

#content h1 a:hover, #content h2 a:hover, #content h3 a:hover, 
#content h4 a:hover, #content h5 a:hover, #content h6 a:hover {
  opacity: 1;
  border-bottom: 1px solid rgba(126, 87, 255, 0.7);
  transform: none !important; /* 防止链接浮动 */
  -webkit-text-fill-color: initial;
}

/* 正文段落样式优化 */
#postBody p {
  margin-bottom: 1.5em;
  line-height: 1.8;
  font-size: 1rem;
}
/* 强调和加粗文本 */
#postBody strong, 
#postBody b {
  font-weight: 700;
}

/* 斜体文本 */
#postBody em,
#postBody i {
  font-style: italic;
  color: var(--secondary-color);
}

/* 引用块样式 */
#postBody blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 0.8em 1em;
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
/* 列表样式 */
#postBody ul,
#postBody ol {
  margin: 1em 0 1.5em 1.5em;
  padding-left: 1em;
}

#postBody ul li,
#postBody ol li {
  margin-bottom: 0.5em;
  position: relative;
}

#postBody ul li::marker {
  color: var(--primary-color);
}

#postBody ol li::marker {
  color: var(--secondary-color);
  font-weight: 500;
}
/* 不同主题模式下标题链接的样式 */
html[data-color-mode="dark"] #content h1 a, 
html[data-color-mode="dark"] #content h2 a, 
html[data-color-mode="dark"] #content h3 a,
html[data-color-mode="dark"] #content h4 a, 
html[data-color-mode="dark"] #content h5 a, 
html[data-color-mode="dark"] #content h6 a {
  border-bottom: 1px dotted rgba(126, 87, 255, 0.5);
}

html[data-color-mode="dark"] #content h1 a, html[data-color-mode="dark"] #content h1 strong{
  color:var(--content-h1-a-dark);
} 
html[data-color-mode="dark"] #content h2 a, html[data-color-mode="dark"] #content h2 strong{
  color:var(--content-h2-a);
} 
html[data-color-mode="dark"] #content h3 a, html[data-color-mode="dark"] #content h3 strong{
  color:var(--content-h3-a);
} 
html[data-color-mode="dark"] #content h4 a, html[data-color-mode="dark"] #content h4 strong{
  color:var(--content-h4-a);
} 
html[data-color-mode="dark"] #content h5 a, html[data-color-mode="dark"] #content h5 strong{
  color:var(--content-h5-a);
} 
html[data-color-mode="dark"] #content h6 a, html[data-color-mode="dark"] #content h6 strong{
  color:var(--content-h6-a);
} 

html[data-color-mode="light"] #content h1 a, 
html[data-color-mode="light"] #content h2 a, 
html[data-color-mode="light"] #content h3 a,
html[data-color-mode="light"] #content h4 a, 
html[data-color-mode="light"] #content h5 a, 
html[data-color-mode="light"] #content h6 a {
  border-bottom: 1px dotted rgba(126, 87, 255, 0.7);
}


html[data-color-mode="light"] #content h1 a, html[data-color-mode="light"] #content h1 strong{
  color:var(--content-h1-a);
} 
html[data-color-mode="light"] #content h2 a, html[data-color-mode="light"] #content h2 strong{
  color:var(--content-h2-a);
} 
html[data-color-mode="light"] #content h3 a, html[data-color-mode="light"] #content h3 strong{
  color:var(--content-h3-a);
} 
html[data-color-mode="light"] #content h4 a, html[data-color-mode="light"] #content h4 strong{
  color:var(--content-h4-a);
} 
html[data-color-mode="light"] #content h5 a, html[data-color-mode="light"] #content h5 strong{
  color:var(--content-h5-a);
} 
html[data-color-mode="light"] #content h6 a, html[data-color-mode="light"] #content h6 strong{
  color:var(--content-h6-a);
} 


/* 自动模式下的标题链接样式 */
@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] #content h1 a, 
  html[data-color-mode="auto"] #content h2 a, 
  html[data-color-mode="auto"] #content h3 a,
  html[data-color-mode="auto"] #content h4 a, 
  html[data-color-mode="auto"] #content h5 a, 
  html[data-color-mode="auto"] #content h6 a {
    border-bottom: 1px dotted rgba(126, 87, 255, 0.5);
  }
}

@media (prefers-color-scheme: light) {
  html[data-color-mode="auto"] #content h1 a, 
  html[data-color-mode="auto"] #content h2 a, 
  html[data-color-mode="auto"] #content h3 a,
  html[data-color-mode="auto"] #content h4 a, 
  html[data-color-mode="auto"] #content h5 a, 
  html[data-color-mode="auto"] #content h6 a {
    border-bottom: 1px dotted rgba(126, 87, 255, 0.7);
  }
}

html[data-color-mode="auto"] #postBody h1 a, html[data-color-mode="auto"] #postBody h1 strong{
  color:var(--content-h1-a-auto);
} 
html[data-color-mode="auto"] #content h2 a, html[data-color-mode="auto"] #content h2 strong{
  color:var(--content-h2-a);
} 
html[data-color-mode="auto"] #content h3 a, html[data-color-mode="auto"] #content h3 strong{
  color:var(--content-h3-a);
} 
html[data-color-mode="auto"] #content h4 a, html[data-color-mode="auto"] #content h4 strong{
  color:var(--content-h4-a);
} 
html[data-color-mode="auto"] #content h5 a, html[data-color-mode="auto"] #content h5 strong{
  color:var(--content-h5-a);
} 
html[data-color-mode="auto"] #content h6 a, html[data-color-mode="auto"] #content h6 strong{
  color:var(--content-h6-a);
} 
/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--secondary-color);
}

a:not(.LabelName a):not(.btn):after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

a:not(.LabelName a):not(.btn):hover:after {
  width: 100%;
}

/* 优化按钮效果 */
.btn-primary, .btn-block {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) !important;
  color: white !important;
  font-weight: 500;
  border: none !important;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary::before, .btn-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-primary:hover::before, .btn-block:hover::before {
  opacity: 1;
}

.btn-primary:hover, .btn-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(126, 87, 255, 0.4);
}

.circle {
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle:hover {
  transform: rotate(15deg) scale(1.1);
}

/* 卡片样式 */
.Box, .Box-body {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* 博客标题样式 */
.postTitle {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  animation: gradient 5s ease infinite;
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
  text-shadow: none;
  font-family: "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

@keyframes gradient {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* 头像样式 */
.avatar {
  border-radius: 50% !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.avatar:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 8px 25px rgba(126, 87, 255, 0.3) !important;
}

/* 首页特殊样式 */
.home-title {
  font-size: 3rem;
  text-align: center;
  margin: 2rem 0;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient 5s linear infinite;
}

/* 强制重设列表Box-row样式 */
body .Box-row, 
html .Box-row, 
#content .Box-row {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  margin-bottom: 10px !important;
  background-color: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(126, 87, 255, 0.15) !important;
  padding: 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 1 !important;
}

body .Box-row:hover, 
html .Box-row:hover,
#content .Box-row:hover {
  transform: translateY(-6px) scale(1.01) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(126, 87, 255, 0.25) !important;
  z-index: 2 !important;
}

/* 科技感边框基础效果 */
body .Box-row::after,
html .Box-row::after,
#content .Box-row::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 12px !important;
  padding: 1px !important;
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(126, 87, 255, 0.2) 15%, 
    rgba(0, 220, 220, 0.2) 35%,
    transparent 50%,
    transparent 70%, 
    rgba(255, 79, 154, 0.2) 85%, 
    transparent 100%) !important;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
  transition: all 0.5s ease !important;
  z-index: 0 !important;
}

body .Box-row:hover::after,
html .Box-row:hover::after,
#content .Box-row:hover::after {
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(126, 87, 255, 0.5) 15%, 
    rgba(0, 220, 220, 0.5) 35%,
    transparent 50%,
    transparent 70%, 
    rgba(255, 79, 154, 0.5) 85%, 
    transparent 100%) !important;
  animation: borderGlow 3s infinite alternate !important;
}

/* 左侧装饰条 */
body .Box-row::before,
html .Box-row::before,
#content .Box-row::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color)) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  z-index: 1 !important;
}

body .Box-row:hover::before,
html .Box-row:hover::before,
#content .Box-row:hover::before {
  opacity: 1 !important;
}

/* 列表项标题效果 */
body .Box-row a.Link--primary,
html .Box-row a.Link--primary,
#content .Box-row a.Link--primary {
  font-weight: 600 !important;
  position: relative !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  background: linear-gradient(90deg, var(--text-color), var(--text-color)) !important;
  background-size: 0% 1px !important;
  background-repeat: no-repeat !important;
  background-position: left bottom !important;
  padding-bottom: 2px !important;
  z-index: 2 !important;
}

body .Box-row a.Link--primary:hover,
html .Box-row a.Link--primary:hover,
#content .Box-row a.Link--primary:hover {
  color: var(--secondary-color) !important;
  transform: none !important;
  background-size: 100% 1px !important;
}

/* 为各种列表元素添加独特样式 */
body .Box-row:nth-child(3n+1),
html .Box-row:nth-child(3n+1),
#content .Box-row:nth-child(3n+1) {
  border-left: 2px solid var(--primary-color) !important;
}

body .Box-row:nth-child(3n+2),
html .Box-row:nth-child(3n+2),
#content .Box-row:nth-child(3n+2) {
  border-left: 2px solid var(--secondary-color) !important;
}

body .Box-row:nth-child(3n+3),
html .Box-row:nth-child(3n+3),
#content .Box-row:nth-child(3n+3) {
  border-left: 2px solid var(--accent-color) !important;
}

/* 暗色模式下的列表项 */
html[data-color-mode="dark"] body .Box-row,
html[data-color-mode="dark"] html .Box-row,
html[data-color-mode="dark"] #content .Box-row {
  background-color: rgba(18, 18, 42, 0.5) !important;
  border: 1px solid rgba(126, 87, 255, 0.2) !important;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2) !important;
}

html[data-color-mode="dark"] body .Box-row:hover,
html[data-color-mode="dark"] html .Box-row:hover,
html[data-color-mode="dark"] #content .Box-row:hover {
  background-color: rgba(25, 25, 55, 0.7) !important;
  border-color: rgba(126, 87, 255, 0.4) !important;
  box-shadow: 0 5px 20px rgba(10, 10, 35, 0.3) !important;
}

html[data-color-mode="dark"] body .Box-row::after,
html[data-color-mode="dark"] html .Box-row::after,
html[data-color-mode="dark"] #content .Box-row::after {
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(126, 87, 255, 0.3) 15%, 
    rgba(0, 220, 220, 0.3) 35%,
    transparent 50%,
    transparent 70%, 
    rgba(255, 79, 154, 0.3) 85%, 
    transparent 100%) !important;
}

html[data-color-mode="dark"] body .Box-row:hover::after,
html[data-color-mode="dark"] html .Box-row:hover::after,
html[data-color-mode="dark"] #content .Box-row:hover::after {
  background: linear-gradient(135deg, 
    transparent 0%, 
    rgba(126, 87, 255, 0.6) 15%, 
    rgba(0, 220, 220, 0.6) 35%,
    transparent 50%,
    transparent 70%, 
    rgba(255, 79, 154, 0.6) 85%, 
    transparent 100%) !important;
}

/* 亮色模式下的列表项 */
html[data-color-mode="light"] body .Box-row,
html[data-color-mode="light"] html .Box-row,
html[data-color-mode="light"] #content .Box-row {
  background-color: rgba(246, 250, 255, 0.6) !important;
  border: 1px solid rgba(126, 87, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html[data-color-mode="light"] body .Box-row:hover,
html[data-color-mode="light"] html .Box-row:hover,
html[data-color-mode="light"] #content .Box-row:hover {
  background-color: rgba(246, 250, 255, 0.9) !important;
  border-color: rgba(126, 87, 255, 0.3) !important;
  box-shadow: 0 8px 20px rgba(100, 120, 220, 0.15) !important;
}

/* 访问计数器基本样式 */
#vercount, #postVercount, [id*="vercount"], .mr-3.text-gray, 
#busuanzi_value_page_pv, #busuanzi_value_site_pv {
  display: inline-block;
  color: var(--accent-color);
  font-weight: normal;
  margin: 0 3px;
  transition: all 0.3s ease;
}

/* 确保计数器容器显示 */
#busuanzi_container_page_pv, #busuanzi_container_site_pv {
  display: inline-block !important;
  font-size: small;
  margin-right: 8px;
}

/* 访问计数器样式 - 列表项悬停时的特效 */
.Box-row:hover #vercount, 
.Box-row:hover #postVercount, 
.Box-row:hover [id*="vercount"],
.Box-row:hover .mr-3.text-gray,
.Box-row:hover #busuanzi_value_page_pv,
.Box-row:hover #busuanzi_value_site_pv,
.d-flex:hover #vercount,
.d-flex:hover #postVercount,
.d-flex:hover [id*="vercount"],
.d-flex:hover .mr-3.text-gray,
.d-flex:hover #busuanzi_value_page_pv,
.d-flex:hover #busuanzi_value_site_pv,
#indexPostsList > div:hover #vercount,
#indexPostsList > div:hover #postVercount,
#indexPostsList > div:hover [id*="vercount"],
#indexPostsList > div:hover .mr-3.text-gray,
#indexPostsList > div:hover #busuanzi_value_page_pv,
#indexPostsList > div:hover #busuanzi_value_site_pv {
  color: var(--secondary-color) !important;
  font-weight: bold !important;
  transform: scale(1.1) !important;
  text-shadow: 0 0 5px rgba(255, 79, 154, 0.3) !important;
}

/* 动画效果 */
.animate-gradient {
  background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 600% 600%;
  animation: gradient-animation 8s ease infinite;
}

@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 评论区样式 */
.utterances {
  margin-top: 2rem;
}

/* 评论按钮改进 */
#cmButton {
  width: 100%;
  text-align: center;
  margin: 2rem auto;
  display: block;
}

/* 为整个页面添加全屏固定背景，确保内容可滚动 */
#page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: var(--global-bg);
  pointer-events: none;
}

/* 移除所有可能导致双滚动条的样式 */
#content, #content-wrapper, #content-container, .container {
  overflow: visible !important;
  height: auto !important;
  width: 100%;
}

/* 固定背景元素 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
  will-change: transform;
  overflow: hidden !important;
}

/* 主内容区域容器 */
.container-wrapper, main, .markdown-body {
  max-width: var(--max-width);
  margin: 20px auto;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 主内容区域 */
.main-content, .container-lg, main, .markdown-body {
  max-width: var(--max-width);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 12px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 调整帖子列表的容器 */
#indexPostsList {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 固定内容最大宽度 */
.container-xl {
  max-width: var(--max-width) !important;
  width: 100%;
  margin: 0 auto;
}

/* 内容区块的统一风格 */
.main-content-container, 
main,
#content {
  padding: 5px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* 统一内容区域底部边距 */
main > div:last-child,
#content > *:last-child {
  margin-bottom: 0;
}

/* 个人介绍样式 */
#content > div:first-child {
  text-align: left;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  line-height: 1.8;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

#content > div:first-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

#content > div:first-child:hover {
  box-shadow: 0 8px 25px rgba(126, 87, 255, 0.2);
  transform: translateY(-3px);
}

#content > div:first-child:hover::after {
  transform: scaleX(1);
}

/* 暗色模式下的个人介绍样式 */
html[data-color-mode="dark"] #content > div:first-child {
  background-color: rgba(18, 18, 42, 0.7);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
}

html[data-color-mode="dark"] #content > div:first-child:hover {
  background-color: rgba(25, 25, 55, 0.8);
  box-shadow: 0 8px 25px rgba(126, 87, 255, 0.3);
}

/* 自动模式下的个人介绍样式 */
html[data-color-mode="auto"] #content > div:first-child {
  color: #0098ff
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] #content > div:first-child {
    background-color: rgba(18, 18, 42, 0.7);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: #0098ff
  }
  
  html[data-color-mode="auto"] #content > div:first-child:hover {
    background-color: rgba(25, 25, 55, 0.8);
    box-shadow: 0 8px 25px rgba(126, 87, 255, 0.3);
  }
}

@media (prefers-color-scheme: light) {
  html[data-color-mode="auto"] #content > div:first-child {
    color: #0098ff
  }
  
  html[data-color-mode="auto"] #content > div:first-child:hover {
    box-shadow: 0 8px 25px rgba(126, 87, 255, 0.2);
  }
}

/* 列表导航容器样式 */
.SideNav {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid rgba(200, 210, 255, 0.3) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}

/* 列表标签样式 */
.Label {
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
  display: inline-block;
}

.LabelName {
  transition: all 0.3s ease;
}

.LabelName:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* 修复列表项内边距和对齐问题 */
.SideNav-item {
  padding: 16px !important;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(200, 210, 255, 0.2);
}

/* auto模式下SideNav-item的颜色 */
html[data-color-mode="auto"] .SideNav-item {
  color: #0071ff;
}

/* 不同系统主题下的颜色适配 */
@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] .SideNav-item {
    color: #0071ff;
  }
}

@media (prefers-color-scheme: light) {
  html[data-color-mode="auto"] .SideNav-item {
    color: #0071ff;
  }
}

.SideNav-item:last-child {
  border-bottom: none;
}

.SideNav-item:hover {
  background-color: rgba(126, 87, 255, 0.05);
}

/* 改善列表项标题和图标间距 */
.SideNav-icon {
  margin-right: 12px;
}

/* 确保内容区域内部的元素居中 */
#content > * {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max-width);
}

/* 列表项悬停效果增强 - 仅改善悬停效果不修改原始样式 */
.Box-row:hover, .d-flex:hover, #indexPostsList > div:hover, tr.post-item:hover, 
.post-item:hover,
.container-lg > div.container-lg > div.Box:hover,
.container-lg > div.container-lg > div > div:hover,
#blog-container > div:hover,
main > div > div:hover,
[id*="post"]:hover {
  /* 完全移除所有位移效果，包括垂直方向 */
  transform: none !important;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  z-index: 3 !important;
}

/* 列表项悬停左侧边框效果 */
.Box-row:hover::before, .d-flex:hover::before, #indexPostsList > div:hover::before, 
tr.post-item:hover::before, .post-item:hover::before,
.container-lg > div.container-lg > div.Box:hover::before,
.container-lg > div.container-lg > div > div:hover::before,
#blog-container > div:hover::before,
main > div > div:hover::before,
[id*="post"]:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  opacity: 1;
  z-index: 2;
}

/* 列表项底部边框线效果 */
.Box-row:hover::after, .d-flex:hover::after, #indexPostsList > div:hover::after, 
tr.post-item:hover::after, .post-item:hover::after,
.container-lg > div.container-lg > div.Box:hover::after,
.container-lg > div.container-lg > div > div:hover::after,
#blog-container > div:hover::after,
main > div > div:hover::after,
[id*="post"]:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  opacity: 1;
  z-index: 2;
  animation: slideRightIn 0.3s ease-out forwards;
}

/* 底部线条动画效果 */
@keyframes slideRightIn {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

/* 内容缓慢移动效果 */
.Box-row:hover a, .d-flex:hover a, #indexPostsList > div:hover a,
tr.post-item:hover a, .post-item:hover a,
.container-lg > div.container-lg > div.Box:hover a,
.container-lg > div.container-lg > div > div:hover a,
#blog-container > div:hover a,
main > div > div:hover a,
[id*="post"]:hover a {
  transform: none;
  transition: color 0.3s ease;
}

/* 标题渐变色效果 */
.Box-row:hover h1, .Box-row:hover h2, .Box-row:hover h3, 
.Box-row:hover h4, .Box-row:hover h5, .Box-row:hover h6,
.Box-row:hover a.Link--primary {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

/* 光影效果 */
.Box-row:hover, .d-flex:hover, #indexPostsList > div:hover {
  background-color: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.Box-row:hover::before, .d-flex:hover::before, #indexPostsList > div:hover::before {
  box-shadow: 0 0 25px rgba(126, 87, 255, 0.5);
}

/* 添加响应式基础样式，确保内容在任何设备上都能正确显示 */
* {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* 确保所有内容区域具有合适的宽度和自动折行 */
.Box-row, .d-flex, #indexPostsList > div, tr.post-item, .post-item, 
.container-lg > div.container-lg > div.Box,
.container-lg > div.container-lg > div > div,
#blog-container > div,
main > div > div,
[id*="post"] {
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
}

/* 确保列表项内的文本和链接正确折行 */
.Box-row a, .d-flex a, #indexPostsList > div a,
tr.post-item a, .post-item a,
.Box-row p, .d-flex p, #indexPostsList > div p,
tr.post-item p, .post-item p,
.Box-row h1, .Box-row h2, .Box-row h3, 
.Box-row h4, .Box-row h5, .Box-row h6,
.Box-row span, .d-flex span {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
}

/* 在小屏幕设备上调整列表悬停效果 */
@media (max-width: 768px) {
  #header, #content, .SideNav, #footer {
    padding: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .Box-row:hover, .d-flex:hover, #indexPostsList > div:hover, tr.post-item:hover, 
  .post-item:hover,
  .container-lg > div.container-lg > div.Box:hover,
  .container-lg > div.container-lg > div > div:hover,
  #blog-container > div:hover,
  main > div > div:hover,
  [id*="post"]:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    padding-left: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* 禁用移动设备上的内容移动效果 */
  .Box-row:hover a, .d-flex:hover a, #indexPostsList > div:hover a,
  tr.post-item:hover a, .post-item:hover a,
  .container-lg > div.container-lg > div.Box:hover a,
  .container-lg > div.container-lg > div > div:hover a,
  #blog-container > div:hover a,
  main > div > div:hover a,
  [id*="post"]:hover a {
    transform: none !important;
    transition: none !important;
  }
  
  /* 禁用移动设备上的元素hover效果 */
  #content > div:first-child:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
  }
  
  /* 禁用在移动设备上的标签hover效果 */
  .LabelName:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  
  /* 修复移动设备上的内边距 */
  .Box-row, .d-flex, #indexPostsList > div, tr.post-item, .post-item,
  .container-lg > div.container-lg > div.Box,
  .container-lg > div.container-lg > div > div,
  #blog-container > div,
  main > div > div,
  [id*="post"] {
    padding: 12px !important;
    margin: 10px 0 !important;
  }
  
  /* 调整标题大小在移动设备上更合适 */
  .Box-row h1, .Box-row h2, .Box-row h3, 
  .Box-row h4, .Box-row h5, .Box-row h6,
  .Box-row a.Link--primary {
    font-size: 95% !important;
  }
  
  /* 确保内容容器居中且不超出屏幕 */
  #content, .container, .container-lg, .container-md, .container-sm, .container-xl, .SideNav {
    padding-left: 1px !important;
    padding-right: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* 移动设备上调整标签显示 */
  .Label, .tags, .tag, .LabelName {
    display: inline-block !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
    margin: 2px !important;
  }
  
  /* 添加移动设备优化 */
  body, html {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
  }
  
  /* 移除可能导致晃动的动画和效果 */
  * {
    animation: none !important;
    transition: color 0.3s ease, background-color 0.3s ease !important;
    transform: none !important;
  }
  
  /* 修复背景动画可能导致的晃动 */
  body::before, body::after, 
  #fixed-background::before, #fixed-background::after {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    background-attachment: scroll !important;
  }
}

/* 解决IOS设备上的滚动问题 */
@supports (-webkit-overflow-scrolling: touch) {
  body, html {
    -webkit-overflow-scrolling: touch;
  }
  
  .Box-row, .d-flex, #indexPostsList > div {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}
/* 在移动设备上调整title-right布局 */
@media (max-width: 768px) {
  .title-right {
    justify-content: center;
    margin-top: 10px;
  }
  
  .title-right > * {
    margin: 4px;
  }
  
  .title-right > div[style="display:contents"] > * {
    margin: 4px;
  }
  
  .title-right .subnav-search {
    width: 100%;
    margin-bottom: 10px;
    order: -1;
  }
}

/* 文章正文内容换行 */
#postBody, #postBody *:not(pre):not(code):not(.highlight):not([class*="language-"]):not(.notranslate):not(.copy-feedback) {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

/* 文章链接自动换行 */
#postBody a, a.post-link, .Box-row a, .d-flex a, #indexPostsList > div a {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  display: inline-block !important;
  max-width: 100% !important;
}

/* 确保代码块保持原有格式 */
#postBody pre, 
#postBody code, 
#postBody .highlight, 
#postBody pre[class*="language-"],
#postBody code[class*="language-"],
#postBody pre.notranslate,
#postBody code.notranslate {
  white-space: pre !important;
  overflow-x: auto !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  word-break: normal !important;
  tab-size: 4 !important;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace !important;
  background-color: #f6f8fa !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin: 8px 0 !important;
  line-height: 1.5 !important;
  font-size: 14px !important;
  color: #24292e !important;
  max-width: 100% !important;
  display: block !important;
}

/* 确保代码块内的所有元素保持原有格式 */
#postBody pre *, 
#postBody code *, 
#postBody .highlight *, 
#postBody pre[class*="language-"] *,
#postBody code[class*="language-"] *,
#postBody pre.notranslate *,
#postBody code.notranslate * {
  white-space: pre !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  word-break: normal !important;
  font-family: inherit !important;
}

/* 暗色模式下的代码块 */
html[data-color-mode="dark"] #postBody pre,
html[data-color-mode="dark"] #postBody code,
html[data-color-mode="dark"] #postBody .highlight,
html[data-color-mode="dark"] #postBody pre[class*="language-"],
html[data-color-mode="dark"] #postBody code[class*="language-"] {
  background-color: #0d1117 !important;
  color: #c9d1d9 !important;
  border-color: #30363d !important;
}

/* 为特定的代码块容器设置样式 */
.snippet-clipboard-content, .snippet-clipboard-content pre {
  position: relative !important;
  overflow: auto !important; 
  max-width: 100% !important;
  width: 100% !important;
}

.snippet-clipboard-content.position-relative.overflow-auto {
  max-width: 100% !important;
  overflow: auto !important;
  background-color: #f6f8fa !important;
  padding: 0 !important;
  margin: 16px 0 !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 防止博客内容标题链接在悬停时出现浮动效果 */
.Box-row:hover a, .d-flex:hover a, #indexPostsList > div:hover a,
tr.post-item:hover a, .post-item:hover a,
.container-lg > div.container-lg > div.Box:hover a,
.container-lg > div.container-lg > div > div:hover a,
#blog-container > div:hover a,
main > div > div:hover a,
[id*="post"]:hover a {
  /* 移除transform，防止内容向左晃动 */
  transform: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

/* 确保标题中的链接不会浮动 */
.Box-row:hover h1 a, .Box-row:hover h2 a, .Box-row:hover h3 a, 
.Box-row:hover h4 a, .Box-row:hover h5 a, .Box-row:hover h6 a,
#indexPostsList > div:hover h1 a, #indexPostsList > div:hover h2 a, #indexPostsList > div:hover h3 a,
#indexPostsList > div:hover h4 a, #indexPostsList > div:hover h5 a, #indexPostsList > div:hover h6 a,
.d-flex:hover h1 a, .d-flex:hover h2 a, .d-flex:hover h3 a,
.d-flex:hover h4 a, .d-flex:hover h5 a, .d-flex:hover h6 a,
#content h1 a, #content h2 a, #content h3 a, 
#content h4 a, #content h5 a, #content h6 a {
  transform: none !important;
  transition: color 0.3s ease, border-bottom 0.3s ease !important;
}

/* 复制提示样式 - 确保不换行 */
.copy-feedback {
  white-space: nowrap !important;
  word-break: keep-all !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  position: absolute !important;
  text-align: center !important;
  background: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  padding: 5px 10px !important;
  border-radius: 3px !important;
  font-size: 12px !important;
}

/* 移动设备设置 */
@media (max-width: 768px) {
  /* 调整列表项内容样式 */
  .SideNav {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
  }
  
  /* 调整SideNav-item内部的布局 */
  .SideNav-item {
    padding: 12px 10px !important;
  }
  
  /* 确保列表标题在小屏幕上依然可读 */
  .listTitle {
    font-size: 14px !important;
    max-width: 100% !important;
  }
}

/* 热门站点容器样式 */
.HotSites {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto 20px auto;
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid rgba(200, 210, 255, 0.3) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}

/* 热门站点标题 */
.HotSites-title {
  font-size: 16px;
  font-weight: 600;
  padding: 12px 16px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(246, 246, 255, 0.7));
  border-bottom: 1px solid rgba(200, 210, 255, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.HotSites-title .octicon {
  color: var(--primary-color);
}

/* 热门站点列表 */
.HotSites-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 热门站点项目 */
.HotSites-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(200, 210, 255, 0.2);
  transition: all 0.3s ease;
}

.HotSites-item:last-child {
  border-bottom: none;
}

.HotSites-item:hover {
  background-color: rgba(126, 87, 255, 0.05);
}

/* 热门站点链接 */
.HotSites-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.HotSites-link:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* 热度值样式 */
.HotSites-hot {
  display: inline-block;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0.8;
  transition: all 0.3s ease;
}

.HotSites-item:hover .HotSites-hot {
  opacity: 1;
  transform: scale(1.1);
}

/* 热门站点折叠按钮 - 移动端 */
.HotSites-toggle {
  display: none;
  border: none;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.HotSites-toggle:hover {
  transform: rotate(15deg);
}

.HotSites-toggle svg {
  width: 18px;
  height: 18px;
}

/* 响应式设置 */
@media (max-width: 768px) {
  .HotSites {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 80%;
    max-width: 300px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    margin: 0;
    border-radius: 0 12px 12px 0 !important;
  }
  
  .HotSites.show {
    transform: translateX(0);
  }
  
  .HotSites-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .HotSites-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .HotSites-backdrop.show {
    display: block;
    opacity: 1;
  }
  
  #content, .SideNav {
    width: 100% !important;
  }
}

/* 布局结构 - 支持左中右布局 */
.layout-container {
  display: flex;
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}

.layout-left {
  flex: 1;
  min-width: 250px;
}

.layout-center {
  flex: 2;
  min-width: 0;
}

.layout-right {
  flex: 1;
  min-width: 250px;
}

@media (max-width: 968px) {
  .layout-container {
    flex-direction: column;
  }
  
  .layout-left, .layout-center, .layout-right {
    width: 100%;
    flex: none;
  }
}

/* 所有标题通用样式 */
#postBody h1,
#postBody h2,
#postBody h3,
#postBody h4,
#postBody h5,
#postBody h6 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: left;
}

/* 为博客内容设置专业字体系统 */
#postBody {
  font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;
  line-height: 1.8;
  margin-top: 20px;
  font-size: 16px;
  overflow-wrap: break-word;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "clig", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 优化代码字体 */
#postBody code,
#postBody pre {
  font-family: "JetBrains Mono", "Fira Code", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  font-feature-settings: "calt" 1, "zero" 1;
}
