/* =================================
   VSVnakers 博客美化样式 - 强特效版
   ================================= */

/* 自定义字体 - 导入更多好看的字体系列 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=ZCOOL+KuaiLe&family=Ma+Shan+Zheng&family=Pacifico&family=Dancing+Script:wght@400;700&display=swap');

/* 定义 CSS 变量 */
:root {
  --vp-c-brand: #6366f1;
  --vp-c-brand-light: #818cf8;
  --vp-c-brand-dark: #4f46e5;
  --vp-c-brand-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --vp-font-family-base: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vp-font-family-heading: 'Noto Sans SC', 'ZCOOL KuaiLe', cursive;
  /* 自定义背景图片 - 修改这里可以替换背景 */
  --vp-background-image: url('/bg.jpg');
  /* 如果没有自定义图片，使用默认渐变 */
  --vp-has-custom-bg: 'no';
}

/* =================================
   暗黑模式切换丝滑过渡动画
   ================================= */

html {
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 只对特定元素应用过渡，避免影响布局 */
html.dark-mode-transition .VPContent,
html.dark-mode-transition .VPNavBar,
html.dark-mode-transition .VPSidebar,
html.dark-mode-transition .VPFeature,
html.dark-mode-transition .VPButton,
html.dark-mode-transition .post-item,
html.dark-mode-transition .vercount-item,
html.dark-mode-transition .VPHero,
html.dark-mode-transition table,
html.dark-mode-transition blockquote,
html.dark-mode-transition div[class*='language-'] {
  transition:
    background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 切换时的闪光效果 - 固定在 body 上，不影响布局 */
@keyframes flashLight {
  0% { opacity: 0; }
  50% { opacity: 0.15; }
  100% { opacity: 0; }
}

body.dark-mode-flash::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(99, 102, 241, 0.15);
  pointer-events: none;
  z-index: 10000;
  animation: flashLight 0.4s ease-out;
}

/* 切换按钮动画增强 */
.VPSwitchAppearance {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.VPSwitchAppearance:hover {
  transform: scale(1.15) rotate(15deg);
}

.VPSwitchAppearance:active {
  transform: scale(0.95);
}

/* 防止过渡影响布局 */
.VPContent,
.VPNavBar,
.VPSidebar,
.VPHero,
.VPFeature,
.post-item,
.vercount-item {
  will-change: auto;
}

/* 确保内容区域在正确的层级 */
.VPContent {
  position: relative;
  z-index: 1;
}

/* =================================
   全局字体美化
   ================================= */

body {
  font-family: var(--vp-font-family-base);
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--vp-font-family-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-rendering: optimizeLegibility;
}

h1 {
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5)); }
  50% { filter: drop-shadow(0 0 25px rgba(168, 85, 247, 0.8)); }
}

h2 {
  position: relative;
  display: inline-block;
  color: #1f2937;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--vp-c-brand-gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

h2:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.dark h2 {
  color: #f3f4f6;
}

h3::before {
  content: '✦ ';
  color: var(--vp-c-brand);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

p {
  line-height: 1.8;
  font-size: 1.05rem;
}

a {
  position: relative;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--vp-c-brand);
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
}

/* =================================
   亮色模式 - 强特效背景
   ================================= */

/* =================================
   动态渐变背景 - 更鲜艳的颜色
   如需自定义背景图片，将图片放在 public/bg.jpg 即可
   ================================= */

/* 自定义背景图片层 */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background: linear-gradient(-45deg, #ff6b6b, #feca57, #48dbfb, #1dd1a1, #5f27cd, #00d2d3, #ff9ff3, #54a0ff);
  background-size: 600% 600%;
  animation: gradientBG 8s ease infinite;
}

/* 如果存在自定义背景图片，使用图片 */
body.has-custom-bg::after {
  background: var(--vp-background-image) no-repeat center center fixed;
  background-size: cover;
  animation: none;
}

/* 暗色模式背景层 - 如果有自定义图片则保持图片 */
.dark body::after {
  background: linear-gradient(-45deg, #0a0a0f, #1a1a2e, #0f0f1a, #1a0a2e, #0a1a2e, #1a0a1a);
  background-size: 600% 600%;
  animation: gradientBG 10s ease infinite;
}

.dark body.has-custom-bg::after {
  background: var(--vp-background-image) no-repeat center center fixed;
  background-size: cover;
  animation: none;
}

/* 粒子效果层 - 在背景之上，内容之下 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255, 107, 107, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(254, 202, 87, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 35% 65%, rgba(72, 219, 251, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 65% 15%, rgba(29, 209, 161, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 25% 80%, rgba(95, 39, 205, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 75% 35%, rgba(0, 210, 211, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 159, 243, 0.3) 0%, transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(84, 160, 255, 0.4) 0%, transparent 50%);
  animation: float 15s ease-in-out infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-30px) scale(1.1) rotate(5deg); }
  66% { transform: translateY(20px) scale(0.95) rotate(-5deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

/* 闪烁的星光粒子 - 在背景之上，内容之下 */
.stars-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(4px 4px at 10% 10%, rgba(255, 255, 255, 1) 50%, transparent 100%),
    radial-gradient(3px 3px at 20% 30%, rgba(255, 107, 107, 0.9) 50%, transparent 100%),
    radial-gradient(5px 5px at 30% 70%, rgba(72, 219, 251, 0.8) 50%, transparent 100%),
    radial-gradient(3px 3px at 50% 50%, rgba(254, 202, 87, 0.9) 50%, transparent 100%),
    radial-gradient(4px 4px at 70% 20%, rgba(29, 209, 161, 0.8) 50%, transparent 100%),
    radial-gradient(3px 3px at 80% 80%, rgba(255, 255, 255, 1) 50%, transparent 100%),
    radial-gradient(4px 4px at 90% 40%, rgba(0, 210, 211, 0.9) 50%, transparent 100%),
    radial-gradient(3px 3px at 15% 85%, rgba(255, 159, 243, 0.8) 50%, transparent 100%),
    radial-gradient(5px 5px at 45% 15%, rgba(84, 160, 255, 0.8) 50%, transparent 100%),
    radial-gradient(3px 3px at 65% 65%, rgba(255, 255, 255, 1) 50%, transparent 100%);
  animation: twinkle 3s linear infinite;
}

/* 暗黑模式星光 */
.dark .stars-layer {
  background-image:
    radial-gradient(4px 4px at 10% 10%, rgba(255, 255, 255, 1) 50%, transparent 100%),
    radial-gradient(3px 3px at 20% 30%, rgba(99, 102, 241, 1) 50%, transparent 100%),
    radial-gradient(5px 5px at 30% 70%, rgba(168, 85, 247, 0.9) 50%, transparent 100%),
    radial-gradient(3px 3px at 50% 50%, rgba(236, 72, 153, 1) 50%, transparent 100%),
    radial-gradient(4px 4px at 70% 20%, rgba(0, 210, 211, 0.9) 50%, transparent 100%),
    radial-gradient(3px 3px at 80% 80%, rgba(255, 255, 255, 1) 50%, transparent 100%),
    radial-gradient(4px 4px at 90% 40%, rgba(99, 102, 241, 1) 50%, transparent 100%),
    radial-gradient(3px 3px at 15% 85%, rgba(168, 85, 247, 0.9) 50%, transparent 100%),
    radial-gradient(5px 5px at 45% 15%, rgba(236, 72, 153, 0.9) 50%, transparent 100%),
    radial-gradient(3px 3px at 65% 65%, rgba(0, 210, 211, 1) 50%, transparent 100%);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; filter: brightness(1); }
  25% { opacity: 0.8; filter: brightness(1.3); }
  50% { opacity: 0.4; filter: brightness(0.8); }
  75% { opacity: 0.9; filter: brightness(1.2); }
}

/* 流动的光线效果 */
@keyframes lightFlow {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* =================================
   内容区域玻璃态效果 - 强化版
   ================================= */

.VPContent,
.VPNavBar,
.VPSidebar {
  backdrop-filter: blur(20px) saturate(180%) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 40px rgba(255, 255, 255, 0.5) inset;
}

/* 导航栏美化 */
.VPNavBar {
  border-bottom: 2px solid rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 4px 40px rgba(99, 102, 241, 0.3), 0 0 60px rgba(168, 85, 247, 0.2) !important;
}

.VPNavBar .title {
  font-family: 'Pacifico', cursive;
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8));
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6)); }
  50% { filter: drop-shadow(0 0 25px rgba(168, 85, 247, 1)); }
}

/* =================================
   首页 Hero 区域美化 - 强特效
   ================================= */

.VPHero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 255, 0.9));
  border-radius: 24px;
  padding: 48px;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    0 0 60px rgba(99, 102, 241, 0.3),
    inset 0 0 40px rgba(255, 255, 255, 0.8);
  animation: heroFloat 6s ease-in-out infinite, heroGlow 4s ease-in-out infinite;
  border: 2px solid rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

/* Hero 光晕旋转效果 */
.VPHero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(99, 102, 241, 0.1) 60deg,
    transparent 120deg,
    rgba(168, 85, 247, 0.15) 180deg,
    transparent 240deg,
    rgba(236, 72, 153, 0.1) 300deg,
    transparent 360deg
  );
  animation: rotateGlow 8s linear infinite;
}

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

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes heroGlow {
  0%, 100% { box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 0 60px rgba(99, 102, 241, 0.3); }
  50% { box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2), 0 0 80px rgba(168, 85, 247, 0.5); }
}

.VPHero-name {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 4.5rem;
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite, glow 2s ease-in-out infinite alternate, nameFloat 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

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

@keyframes glow {
  from { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.8)); }
  to { filter: drop-shadow(0 0 30px rgba(168, 85, 247, 1)); }
}

@keyframes nameFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.VPHero .text {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: #4b5563;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  position: relative;
  z-index: 1;
}

/* =================================
   卡片美化 - 强发光效果
   ================================= */

.VPFeature {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 245, 255, 0.9));
  border-radius: 20px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 30px rgba(99, 102, 241, 0.15),
    inset 0 0 20px rgba(99, 102, 241, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--vp-font-family-base);
  position: relative;
  overflow: hidden;
}

/* 卡片光晕扫过效果 */
.VPFeature::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.VPFeature:hover::before {
  opacity: 1;
}

.VPFeature:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow:
    0 25px 70px rgba(99, 102, 241, 0.4),
    0 0 50px rgba(99, 102, 241, 0.3),
    inset 0 0 30px rgba(99, 102, 241, 0.1);
  border-color: var(--vp-c-brand-light);
  border-glow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.VPFeature .icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  animation: iconBounce 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

.VPFeature .title {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =================================
   按钮美化 - 3D 流光效果
   ================================= */

.VPButton {
  border-radius: 16px !important;
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow:
    0 6px 20px rgba(99, 102, 241, 0.4),
    0 3px 10px rgba(99, 102, 241, 0.2),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.VPButton::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.VPButton:hover::before {
  left: 100%;
}

.VPButton.brand {
  background: var(--vp-c-brand-gradient) !important;
  border: none !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 8px 25px rgba(99, 102, 241, 0.5),
    0 0 40px rgba(168, 85, 247, 0.3);
}

.VPButton.alt {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 3px solid var(--vp-c-brand) !important;
  color: var(--vp-c-brand) !important;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.3);
}

.VPButton:hover {
  transform: translateY(-6px) scale(1.06);
  box-shadow:
    0 20px 45px rgba(99, 102, 241, 0.6),
    0 0 60px rgba(168, 85, 247, 0.4);
}

.VPButton:active {
  transform: translateY(-3px) scale(1.03);
}

/* =================================
   文章列表美化
   ================================= */

.post-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 16px 0;
  border: 2px solid rgba(99, 102, 241, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--vp-font-family-base);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.post-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--vp-c-brand-gradient);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.post-item:hover::before {
  transform: scaleY(1);
}

.post-item:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateX(20px);
  border-color: var(--vp-c-brand-light);
  box-shadow:
    0 12px 40px rgba(99, 102, 241, 0.3),
    0 0 30px rgba(99, 102, 241, 0.15);
}

.post-link h3 {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #1f2937;
  transition: all 0.3s ease;
}

.post-item:hover .post-link h3 {
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.post-date {
  font-family: 'Dancing Script', cursive;
  font-size: 1.15rem;
  color: #6b7280;
  font-weight: 700;
}

/* =================================
   侧边栏美化
   ================================= */

.VPSidebar {
  border-radius: 0 20px 20px 0;
  box-shadow:
    4px 0 40px rgba(0, 0, 0, 0.1),
    0 0 30px rgba(99, 102, 241, 0.15);
  font-family: var(--vp-font-family-base);
}

.VPSidebarItem .text {
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
}

.VPSidebarItem .text::before {
  content: '◦';
  position: absolute;
  left: -18px;
  opacity: 0;
  color: var(--vp-c-brand);
  transition: all 0.3s ease;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.VPSidebarItem .text:hover::before {
  opacity: 1;
  animation: bulletPulse 0.6s ease-in-out;
}

@keyframes bulletPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

.VPSidebarItem .text:hover {
  color: var(--vp-c-brand);
  transform: translateX(10px);
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

/* =================================
   代码块美化
   ================================= */

.vp-code,
div[class*='language-'] {
  border-radius: 16px !important;
  box-shadow:
    0 8px 35px rgba(0, 0, 0, 0.15),
    0 0 30px rgba(99, 102, 241, 0.15),
    inset 0 0 20px rgba(99, 102, 241, 0.03);
  border: 2px solid rgba(99, 102, 241, 0.3);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}

.vp-code::before,
div[class*='language-']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
  pointer-events: none;
}

.line-numbers-wrapper {
  font-family: 'JetBrains Mono', monospace;
}

/* =================================
   深色模式 - 强视觉特效
   ================================= */

/* 暗黑模式 - 彩色光斑粒子 */
.dark body::before {
  background-image:
    radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 35% 65%, rgba(236, 72, 153, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 65% 15%, rgba(0, 210, 211, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 25% 80%, rgba(99, 102, 241, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 75% 35%, rgba(168, 85, 247, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(0, 210, 211, 0.4) 0%, transparent 50%);
  animation: float 12s ease-in-out infinite;
}

/* 暗黑模式星光已经在 .stars-layer 中定义，不需要在 body::after 重复 */

/* 暗黑玻璃态 */
.dark .VPContent,
.dark .VPNavBar,
.dark .VPSidebar {
  background: rgba(15, 15, 35, 0.85) !important;
  backdrop-filter: blur(25px) saturate(200%) !important;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(99, 102, 241, 0.2),
    inset 0 0 30px rgba(99, 102, 241, 0.05);
}

/* 暗黑导航栏 */
.dark .VPNavBar {
  border-bottom: 2px solid rgba(99, 102, 241, 0.6) !important;
  box-shadow:
    0 4px 50px rgba(99, 102, 241, 0.4),
    0 0 80px rgba(168, 85, 247, 0.2) !important;
}

.dark .VPNavBar .title {
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 1));
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8)); }
  50% { filter: drop-shadow(0 0 30px rgba(168, 85, 247, 1)); }
}

/* 暗黑 Hero */
.dark .VPHero {
  background: linear-gradient(135deg, rgba(30, 30, 60, 0.95), rgba(15, 15, 35, 0.9));
  border-radius: 24px;
  padding: 48px;
  box-shadow:
    0 15px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(99, 102, 241, 0.4),
    inset 0 0 50px rgba(99, 102, 241, 0.15);
  animation: heroFloat 6s ease-in-out infinite, heroGlowDark 3s ease-in-out infinite;
  border: 2px solid rgba(99, 102, 241, 0.6);
}

.dark .VPHero::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(99, 102, 241, 0.2) 60deg,
    transparent 120deg,
    rgba(168, 85, 247, 0.25) 180deg,
    transparent 240deg,
    rgba(236, 72, 153, 0.2) 300deg,
    transparent 360deg
  );
}

@keyframes heroGlowDark {
  0%, 100% { box-shadow: 0 15px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 15px 60px rgba(0, 0, 0, 0.7), 0 0 120px rgba(168, 85, 247, 0.7); }
}

.dark .VPHero-name {
  filter: drop-shadow(0 0 25px rgba(99, 102, 241, 1));
  animation: shimmer 3s linear infinite, glowDark 1.5s ease-in-out infinite alternate, nameFloat 3s ease-in-out infinite;
}

@keyframes glowDark {
  from { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8)) drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)); }
  to { filter: drop-shadow(0 0 35px rgba(99, 102, 241, 1)) drop-shadow(0 0 60px rgba(236, 72, 153, 0.8)); }
}

.dark .VPHero .text {
  color: #d4d4d4;
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* 暗黑特性卡片 */
.dark .VPFeature {
  background: linear-gradient(135deg, rgba(40, 40, 80, 0.95), rgba(20, 20, 50, 0.9));
  border: 2px solid rgba(99, 102, 241, 0.5);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(99, 102, 241, 0.3),
    inset 0 0 30px rgba(99, 102, 241, 0.08);
}

.dark .VPFeature::before {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
}

.dark .VPFeature:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow:
    0 25px 80px rgba(99, 102, 241, 0.6),
    0 0 70px rgba(99, 102, 241, 0.5),
    inset 0 0 40px rgba(99, 102, 241, 0.15);
  border-color: var(--vp-c-brand-light);
}

.dark .VPFeature .icon {
  filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.7));
}

.dark .VPFeature .title {
  color: #f5f5f5;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

/* 暗黑按钮 */
.dark .VPButton.brand {
  box-shadow:
    0 8px 30px rgba(99, 102, 241, 0.6),
    0 0 50px rgba(168, 85, 247, 0.4);
}

.dark .VPButton:hover {
  transform: translateY(-6px) scale(1.06);
  box-shadow:
    0 20px 55px rgba(99, 102, 241, 0.8),
    0 0 80px rgba(168, 85, 247, 0.6);
}

.dark .VPButton.alt {
  background: rgba(30, 30, 60, 0.95) !important;
  border: 3px solid var(--vp-c-brand) !important;
  color: var(--vp-c-brand-light) !important;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.dark .VPButton.alt:hover {
  box-shadow:
    0 0 50px rgba(99, 102, 241, 0.7),
    0 20px 55px rgba(99, 102, 241, 0.6);
}

/* 暗黑文章卡片 */
.dark .post-item {
  background: linear-gradient(135deg, rgba(40, 40, 80, 0.9), rgba(20, 20, 50, 0.85));
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow:
    0 8px 35px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(99, 102, 241, 0.2);
}

.dark .post-item:hover {
  background: linear-gradient(135deg, rgba(50, 50, 100, 0.95), rgba(30, 30, 70, 0.9));
  box-shadow:
    0 15px 55px rgba(99, 102, 241, 0.6),
    0 0 50px rgba(99, 102, 241, 0.4);
  border-color: var(--vp-c-brand-light);
}

.dark .post-item:hover .post-link h3 {
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.8));
}

.dark .post-date {
  color: #a0a0a0;
}

/* 暗黑标题 */
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.7));
}

.dark h2::after {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
}

.dark h3::before {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 15px rgba(99, 102, 241, 1);
  animation: starPulse 1.5s ease-in-out infinite;
}

/* 暗黑侧边栏 */
.dark .VPSidebar {
  background: rgba(10, 10, 25, 0.95) !important;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow:
    4px 0 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(99, 102, 241, 0.2);
}

.dark .VPSidebarItem .text {
  color: #c5c5c5;
}

.dark .VPSidebarItem .text:hover {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 20px rgba(99, 102, 241, 1);
}

.dark .VPSidebarItem .text::before {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 15px rgba(99, 102, 241, 1);
}

/* 暗黑代码块 */
.dark .vp-code,
.dark div[class*='language-'] {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow:
    0 10px 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(99, 102, 241, 0.3),
    inset 0 0 30px rgba(99, 102, 241, 0.08);
}

/* 暗黑页脚 */
.dark .VPFooter {
  background: rgba(10, 10, 25, 0.9);
  border-top-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 -4px 40px rgba(99, 102, 241, 0.2);
}

.dark .VPFooter a {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

/* 暗黑统计组件 */
.dark .vercount-item {
  background: linear-gradient(135deg, rgba(40, 40, 80, 0.9), rgba(20, 20, 50, 0.85));
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow:
    0 10px 45px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(99, 102, 241, 0.4);
}

.dark .vercount-item:hover {
  transform: translateY(-10px) scale(1.06);
  box-shadow:
    0 25px 70px rgba(99, 102, 241, 0.7),
    0 0 60px rgba(99, 102, 241, 0.5);
}

.dark .vercount-label {
  color: #a5a5a5;
}

.dark .vercount-value {
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 1));
}

/* 暗黑搜索框 */
.dark .VPLocalSearchBox {
  background: rgba(20, 20, 45, 0.9);
  border-color: rgba(99, 102, 241, 0.6);
  color: #f0f0f0;
  box-shadow:
    0 4px 25px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(99, 102, 241, 0.2);
}

.dark .VPLocalSearchBox:focus-within {
  border-color: var(--vp-c-brand-light);
  box-shadow:
    0 0 50px rgba(99, 102, 241, 0.7),
    0 0 100px rgba(168, 85, 247, 0.5),
    0 4px 35px rgba(0, 0, 0, 0.6);
}

/* 暗黑引用块 */
.dark blockquote {
  border-left-color: var(--vp-c-brand-light);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.3), transparent);
  color: #d5d5d5;
  box-shadow: 0 4px 25px rgba(99, 102, 241, 0.2);
  border-radius: 0 16px 16px 0;
}

.dark blockquote::before {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
}

/* 暗黑表格 */
.dark table {
  box-shadow:
    0 4px 35px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(99, 102, 241, 0.2);
  overflow: hidden;
}

.dark th {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.dark tr:nth-child(even) {
  background: rgba(99, 102, 241, 0.18);
}

.dark tr:hover {
  background: rgba(99, 102, 241, 0.25);
  box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.15);
}

/* 暗黑滚动条 */
.dark ::-webkit-scrollbar-track {
  background: rgba(99, 102, 241, 0.25);
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--vp-c-brand-gradient);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.dark ::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 1);
}

/* 暗黑社交图标 */
.dark .VPSocialLinks a {
  color: #b5b5b5;
}

.dark .VPSocialLinks a:hover {
  color: var(--vp-c-brand-light);
  text-shadow: 0 0 25px rgba(99, 102, 241, 1);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

/* 暗黑链接 */
.dark a {
  color: var(--vp-c-brand-light);
}

.dark a:hover {
  color: #c7d2fe;
  text-shadow: 0 0 20px rgba(99, 102, 241, 1);
}

/* 暗黑段落 */
.dark p {
  color: #c5c5c5;
}

.dark li {
  color: #c5c5c5;
}

/* 暗黑内联代码 */
.dark :not(pre) > code {
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #e5e5e5;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* =================================
   页面过渡动画
   ================================= */

.VPContent {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =================================
   社交图标 - 3D 旋转 + 发光
   ================================= */

.VPSocialLinks a {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.VPSocialLinks a:hover {
  transform: scale(1.3) rotate(360deg);
  color: var(--vp-c-brand);
  box-shadow:
    0 0 30px rgba(99, 102, 241, 0.8),
    0 0 60px rgba(168, 85, 247, 0.4);
}

/* =================================
   页脚美化
   ================================= */

.VPFooter {
  border-top: 2px solid rgba(99, 102, 241, 0.4);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--vp-font-family-base);
  backdrop-filter: blur(10px);
}

.dark .VPFooter {
  background: rgba(15, 15, 35, 0.85);
}

.VPFooter a {
  font-weight: 600;
}

/* =================================
   搜索框 - 光晕效果
   ================================= */

.VPLocalSearchBox {
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.4);
  transition: all 0.4s ease;
  font-family: var(--vp-font-family-base);
}

.VPLocalSearchBox:focus-within {
  border-color: var(--vp-c-brand);
  box-shadow:
    0 0 40px rgba(99, 102, 241, 0.5),
    0 0 80px rgba(168, 85, 247, 0.3);
}

/* =================================
   滚动条 - 渐变流光
   ================================= */

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 14px;
}

::-webkit-scrollbar-thumb {
  background: var(--vp-c-brand-gradient);
  border-radius: 14px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4f46e5, #9333ea, #ec4899);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.8);
}

/* =================================
   Vercount 统计组件
   ================================= */

.vercount-container {
  display: flex;
  justify-content: center;
  gap: 35px;
  padding: 35px 0;
  font-family: var(--vp-font-family-base);
}

.vercount-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 25px 40px;
  border-radius: 20px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.12),
    0 0 30px rgba(99, 102, 241, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.vercount-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.vercount-item:hover::before {
  left: 100%;
}

.vercount-item:hover {
  transform: translateY(-10px) scale(1.06);
  border-color: var(--vp-c-brand-light);
  box-shadow:
    0 20px 55px rgba(99, 102, 241, 0.4),
    0 0 50px rgba(99, 102, 241, 0.3);
}

.vercount-label {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.vercount-value {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--vp-c-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Dancing Script', cursive;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.vercount-item:hover .vercount-value {
  transform: scale(1.15);
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
}

.footer-vercount {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 18px;
  font-size: 0.95rem;
  color: #6b7280;
}

.footer-vercount span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-vercount .count {
  font-weight: 700;
  color: var(--vp-c-brand);
  font-family: 'Dancing Script', cursive;
  font-size: 1.2rem;
}

/* =================================
   引用块美化
   ================================= */

blockquote {
  border-left: 5px solid var(--vp-c-brand);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
  border-radius: 0 16px 16px 0;
  padding: 20px 28px;
  font-style: italic;
  font-family: 'Dancing Script', cursive;
  font-size: 1.15rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

blockquote::before {
  content: '"';
  font-size: 3.5rem;
  color: var(--vp-c-brand);
  font-family: 'Ma Shan Zheng', cursive;
  line-height: 1;
  text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* =================================
   表格美化
   ================================= */

table {
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 25px rgba(0, 0, 0, 0.12),
    0 0 20px rgba(99, 102, 241, 0.1);
}

th {
  background: var(--vp-c-brand-gradient);
  color: white;
  font-weight: 700;
  font-family: var(--vp-font-family-heading);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

tr:nth-child(even) {
  background: rgba(99, 102, 241, 0.08);
}

tr:hover {
  background: rgba(99, 102, 241, 0.15);
  box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.08);
}

/* =================================
   加载动画
   ================================= */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* =================================
   额外粒子效果容器
   ================================= */

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.8), transparent);
  border-radius: 50%;
  animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}
