/* ============================================================
   "片片公子" 个人博客 — 精灵森林像素艺术
   翠绿古木 · 世界树 · 林间光影
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ════════════════════════════════════════════════════════
   CSS 变量：暗色模式（月光下的古老森林）
   ════════════════════════════════════════════════════════ */
:root {
  --bg: #0a1a10;
  --bg-elevated: #0e2418;
  --bg-card: #0e2418;
  --bg-input: #081808;
  --bg-overlay: rgba(0, 0, 0, 0.25);

  --text: #b8ccb0;
  --text-secondary: #7a9a72;
  --text-muted: #4a6a42;

  --heading: #60e0a0;
  --accent: #1a4a2a;
  --accent-hover: #2a6a3a;
  --accent-text: #50d090;
  --nav-bg: #0a1a10;
  --nav-text: #b8ccb0;

  --emerald: #30c870;
  --gold: #d4b840;
  --silver: #a0c8b0;
  --deep-green: #103820;
  --leaf-light: #50e080;
  --moon: #c0d8c8;

  --border: #2a4a32;
  --border-light: #1a3020;
  --border-inner: #3a5a42;

  --shadow: 4px 4px 0 #00000060;
  --shadow-lg: 6px 6px 0 #00000080;
  --shadow-sm: 2px 2px 0 #00000040;
  --shadow-inset: inset 3px 3px 0 #00000030;
  --shadow-glow: 0 0 16px rgba(48, 200, 112, 0.25);

  --radius: 2px;
  --radius-sm: 1px;
  --transition: 0.25s ease;
  --font: Georgia, "Noto Serif SC", "SimSun", serif;
  --font-pixel: "Press Start 2P", monospace;
  --font-mono: "Consolas", "Courier New", monospace;
  --progress-bg: #0a1a10;
  --tag-bg: #183020;
  --tag-text: #50d090;
  --comment-bg: #081808;
  --scrollbar-thumb: #2a4a32;
  --scrollbar-track: #0a1a10;

  /* 世界树颜色 */
  --tree-trunk: #5a3a20;
  --tree-trunk-dark: #3a2010;
  --tree-canopy-1: #1a5a30;
  --tree-canopy-2: #207838;
  --tree-canopy-3: #289040;
  --tree-glow: #40e870;
  --tree-particle: #60f090;

  /* 精灵尘 */
  --dust-color: #50e080;
  --dust-glow: rgba(80, 224, 128, 0.6);

  /* 纹理 */
  --bg-texture: radial-gradient(ellipse at 20% 0%, rgba(48,200,112,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(48,200,112,0.03) 0%, transparent 50%);
}

/* ════════════════════════════════════════════════════════
   CSS 变量：明亮模式（金色阳光下的精灵林地）
   ════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg: #e8f0dc;
  --bg-elevated: #f2f8e8;
  --bg-card: #f2f8e8;
  --bg-input: #dce8cc;
  --bg-overlay: rgba(0, 0, 0, 0.04);

  --text: #2a3a1a;
  --text-secondary: #5a6a42;
  --text-muted: #8a9a72;

  --heading: #208040;
  --accent: #a8d888;
  --accent-hover: #c0f0a0;
  --accent-text: #208840;
  --nav-bg: #3a5230;
  --nav-text: #f2f8e8;

  --emerald: #28a850;
  --gold: #b89830;
  --silver: #609878;
  --deep-green: #508050;
  --leaf-light: #70e090;
  --moon: #fff8e0;

  --border: #98b878;
  --border-light: #c0d8a8;
  --border-inner: #a8c888;

  --shadow: 4px 4px 0 #00000020;
  --shadow-lg: 6px 6px 0 #00000030;
  --shadow-sm: 2px 2px 0 #00000015;
  --shadow-inset: inset 3px 3px 0 #00000010;
  --shadow-glow: 0 0 20px rgba(40, 168, 80, 0.15);

  --progress-bg: #d0dcc0;
  --tag-bg: #d0e0b8;
  --tag-text: #208040;
  --comment-bg: #dce8cc;
  --scrollbar-thumb: #98b878;
  --scrollbar-track: #e8f0dc;

  --tree-trunk: #8a6040;
  --tree-trunk-dark: #5a3820;
  --tree-canopy-1: #58b860;
  --tree-canopy-2: #70d078;
  --tree-canopy-3: #88e890;
  --tree-glow: #c0f8c8;
  --tree-particle: #a0f8b0;

  --dust-color: #78e890;
  --dust-glow: rgba(120, 232, 144, 0.5);

  --bg-texture: radial-gradient(ellipse at 25% 15%, rgba(255,230,150,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(140,210,150,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 40% 40%, rgba(200,230,180,0.07) 0%, transparent 60%);

  --cloud-color: rgba(180, 230, 185, 0.55);
  --cloud-color2: rgba(210, 240, 200, 0.5);
  color-scheme: light;
}

/* ════════════════════════════════════════════════════════
   全局
   ════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border: 2px solid var(--border);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--border);
}

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-texture);
  min-height: 100vh;
  cursor: url("ShuBiao32.png"), auto;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a, button, input, textarea, select, .nav-link, .read-more, .tag, .filter-btn,
.theme-toggle, .back-to-top, .hamburger, .comment-submit, .search-input {
  cursor: url("ShuBiao32.png"), auto !important;
}

a { text-decoration: none; color: var(--accent-text); transition: color var(--transition); }
a:hover { color: var(--emerald); }

ul, ol { list-style: none; }
img { max-width: 100%; height: auto; image-rendering: pixelated; }

::selection { background: var(--emerald); color: #fff; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ════════════════════════════════════════════════════════
   进度条 — 翡翠光脉
   ════════════════════════════════════════════════════════ */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 5px; z-index: 10001; width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--gold), var(--leaf-light));
  box-shadow: 0 1px 6px var(--dust-glow);
  transition: width 0.12s linear;
}

/* ════════════════════════════════════════════════════════
   天穹星体 — 导航栏下方月亮/太阳
   ════════════════════════════════════════════════════════ */
.celestial-body {
  position: fixed;
  top: 46px; left: 16px;
  z-index: 997;
  width: 52px; height: 52px;
  pointer-events: none;
}

/* 星体主体 */
.celestial-body::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  transition: all 0.5s ease;
  width: 44px; height: 44px;
  background: #f0e090;
  top: 4px; left: 4px;
  box-shadow:
    0 0 18px rgba(240, 224, 144, 0.55),
    0 0 40px rgba(240, 224, 144, 0.28),
    0 0 65px rgba(240, 224, 144, 0.10);
  animation: moonGlow 4s ease-in-out infinite;
}

/* 月牙缺口 — 用背景色圆片遮盖 */
.celestial-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  transition: all 0.5s ease;
  width: 40px; height: 40px;
  background: var(--bg);
  top: -4px; left: 14px;
}

@keyframes moonGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(240, 224, 144, 0.55), 0 0 40px rgba(240, 224, 144, 0.28), 0 0 65px rgba(240, 224, 144, 0.10); }
  50%      { box-shadow: 0 0 26px rgba(240, 224, 144, 0.70), 0 0 52px rgba(240, 224, 144, 0.38), 0 0 80px rgba(240, 224, 144, 0.16); }
}

/* ── 明亮模式：太阳 ── */
[data-theme="light"] .celestial-body::before {
  width: 36px; height: 36px;
  background: #ffb830;
  top: 8px; left: 8px;
  box-shadow:
    0 0 22px rgba(255, 184, 48, 0.65),
    0 0 48px rgba(255, 200, 60, 0.35),
    0 0 75px rgba(255, 200, 80, 0.15);
  animation: sunGlow 3s ease-in-out infinite;
}

/* 太阳光线 — 8 条像素光线 */
[data-theme="light"] .celestial-body::after {
  width: 50px; height: 50px;
  background: transparent;
  top: 1px; left: 1px;
  box-shadow:
    0  -10px 0 2px rgba(255, 184, 48, 0.55),
    0   10px 0 2px rgba(255, 184, 48, 0.55),
    -10px 0 0 2px rgba(255, 184, 48, 0.55),
    10px  0 0 2px rgba(255, 184, 48, 0.55),
    -7px -7px 0 2px rgba(255, 184, 48, 0.55),
    7px  -7px 0 2px rgba(255, 184, 48, 0.55),
    -7px  7px 0 2px rgba(255, 184, 48, 0.55),
    7px   7px 0 2px rgba(255, 184, 48, 0.55);
  animation: sunRayPulse 3s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 184, 48, 0.65), 0 0 48px rgba(255, 200, 60, 0.35), 0 0 75px rgba(255, 200, 80, 0.15); }
  50%      { box-shadow: 0 0 32px rgba(255, 184, 48, 0.80), 0 0 62px rgba(255, 200, 60, 0.48), 0 0 90px rgba(255, 200, 80, 0.22); }
}

@keyframes sunRayPulse {
  0%, 100% { opacity: 0.7; transform: rotate(0deg); }
  50%      { opacity: 1; transform: rotate(22.5deg); }
}

/* ════════════════════════════════════════════════════════
   主题切换 — 符文石（日/月图标）
   ════════════════════════════════════════════════════════ */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 1001;
  width: 44px; height: 44px;
  border: 2px solid var(--emerald);
  border-radius: 50%;
  background: var(--bg-card);
  color: transparent;
  font-size: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 3px 3px 0 #00000060, 0 0 12px var(--dust-glow);
  transition: all var(--transition);
  animation: runePulse 3s ease-in-out infinite;
  overflow: visible;
}

/* 暗色模式按钮：显示太阳图标 → 点击进入光明 */
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #ffb830;
  box-shadow:
    0 0 8px rgba(255, 184, 48, 0.6),
    0    -7px 0 1px #ffb830,
    0     7px 0 1px #ffb830,
    -7px  0 0 1px #ffb830,
    7px   0 0 1px #ffb830,
    -5px -5px 0 1px #ffb830,
    5px  -5px 0 1px #ffb830,
    -5px  5px 0 1px #ffb830,
    5px   5px 0 1px #ffb830;
  transition: all 0.4s ease;
}

.theme-toggle::after {
  display: none;
}

/* 明亮模式按钮：显示月亮图标 → 点击进入暗夜 */
[data-theme="light"] .theme-toggle::before {
  width: 14px; height: 14px;
  background: #6078b0;
  box-shadow:
    0 0 8px rgba(96, 120, 176, 0.5);
    /* 移除太阳光线 */
}

/* 月牙缺口 */
[data-theme="light"] .theme-toggle::after {
  display: block;
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg-card);
  margin-left: 5px;
  margin-top: -1px;
  transition: all 0.4s ease;
}

.theme-toggle:hover {
  background: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 #00000060, 0 0 20px var(--dust-glow);
}
.theme-toggle:hover::before {
  box-shadow:
    0 0 12px rgba(255, 184, 48, 0.8),
    0    -7px 0 1px #ffb830,
    0     7px 0 1px #ffb830,
    -7px  0 0 1px #ffb830,
    7px   0 0 1px #ffb830,
    -5px -5px 0 1px #ffb830,
    5px  -5px 0 1px #ffb830,
    -5px  5px 0 1px #ffb830,
    5px   5px 0 1px #ffb830;
}
[data-theme="light"] .theme-toggle:hover::before {
  box-shadow: 0 0 12px rgba(96, 120, 176, 0.7);
}
.theme-toggle:active { transform: translateY(1px); box-shadow: 2px 2px 0 #00000060; }

@keyframes runePulse {
  0%, 100% { box-shadow: 3px 3px 0 #00000060, 0 0 10px var(--dust-glow); }
  50%      { box-shadow: 3px 3px 0 #00000060, 0 0 22px var(--dust-glow); }
}

/* ════════════════════════════════════════════════════════
   回到顶部 — 光羽
   ════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px;
  border: 2px solid var(--emerald);
  background: var(--bg-card);
  color: var(--emerald);
  font-family: var(--font-pixel);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 3px 3px 0 #00000060;
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
}
.back-to-top.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover {
  background: var(--emerald);
  color: #081808;
  transform: translateY(-4px);
  box-shadow: 5px 5px 0 #00000060, 0 0 16px var(--dust-glow);
}
.back-to-top:active { transform: translateY(0); }

/* ════════════════════════════════════════════════════════
   精灵光点（叶间光线粒子）
   ════════════════════════════════════════════════════════ */
.fireflies {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.firefly {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--dust-color);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--dust-glow), 0 0 14px var(--dust-glow);
  animation: fireflyFloat var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.6s ease;
}
/* 暗夜萤火增强 — 更大光晕、随机色彩倾向 */
.firefly:nth-child(odd) {
  box-shadow: 0 0 8px var(--dust-glow), 0 0 18px var(--dust-glow), 0 0 30px rgba(80,224,128,0.25);
}
.firefly:nth-child(3n) {
  background: #ffe890;
  box-shadow: 0 0 6px rgba(255,232,144,0.6), 0 0 14px rgba(255,200,60,0.4), 0 0 22px rgba(255,180,40,0.2);
}
.firefly:nth-child(5n+2) {
  background: #80e8c0;
  box-shadow: 0 0 7px rgba(128,232,192,0.6), 0 0 16px rgba(96,224,160,0.4);
}
@keyframes fireflyFloat {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  will-change: transform, opacity;
  20%  { opacity: 1; }
  50%  { opacity: 0.8; transform: translateY(-60px) translateX(20px); }
  80%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-120px) translateX(-20px); }
  will-change: transform, opacity;
}

/* ════════════════════════════════════════════════════════
   萤火暗夜显隐
   ════════════════════════════════════════════════════════ */
/* 明亮模式下萤火隐去，飞鸟登场 */
[data-theme="light"] .firefly {
  opacity: 0 !important;
  animation: none !important;
}

/* ════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════
   天际飞鸟 — V形候鸟（白日可见）
   ════════════════════════════════════════════════════════ */
.sky-birds {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 160px;
  pointer-events: none;
  z-index: 1002;  /* 高于导航栏 */
  opacity: 0;
  transition: opacity 0.6s ease;
}
[data-theme="light"] .sky-birds {
  opacity: 1;
}

.bird {
  position: absolute;
  width: 14px; height: 8px;
  animation: birdFly var(--fly-dur) linear infinite;
  animation-delay: var(--fly-delay);
  will-change: transform;
}
/* 左翅 \ */
.bird::before {
  content: '';
  position: absolute;
  top: 2px; left: 0;
  width: 7px; height: 2px;
  background: #3a3828;
  border-radius: 1px;
  transform: rotate(-22deg);
  transform-origin: right center;
}
/* 右翅 / */
.bird::after {
  content: '';
  position: absolute;
  top: 2px; right: 0;
  width: 7px; height: 2px;
  background: #3a3828;
  border-radius: 1px;
  transform: rotate(22deg);
  transform-origin: left center;
}

@keyframes birdFly {
  0%   { transform: translateX(-60px) translateY(0) scaleX(1); }
  20%  { transform: translateX(20vw) translateY(-14px) scaleX(1); }
  40%  { transform: translateX(40vw) translateY(-20px) scaleX(1); }
  60%  { transform: translateX(60vw) translateY(-8px) scaleX(1); }
  80%  { transform: translateX(80vw) translateY(-18px) scaleX(1); }
  100% { transform: translateX(calc(100vw + 60px)) translateY(0) scaleX(1); }
}
   精灵云朵 — 林间雾气
   ════════════════════════════════════════════════════════ */
.clouds {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 70px;
  z-index: 996;
  pointer-events: none;
  overflow: hidden;
}
.cloud {
  position: absolute;
  background: var(--cloud-color);
  box-shadow: 12px -6px 0 var(--cloud-color), 24px -3px 0 var(--cloud-color),
    36px 0 0 var(--cloud-color), 8px 4px 0 var(--cloud-color2),
    20px 2px 0 var(--cloud-color2), 32px 5px 0 var(--cloud-color2);
  width: 14px; height: 14px;
  opacity: 0.6;
  transition: background 0.4s ease;
}
.cloud1 {
  top: 12px;
  background: var(--cloud-color);
  animation: cloudFloat 20s steps(14) infinite;
}
.cloud2 {
  top: 28px;
  background: var(--cloud-color2);
  animation: cloudFloat 28s steps(18) infinite;
  animation-delay: -6s;
}
.cloud3 {
  top: 6px;
  background: var(--cloud-color);
  animation: cloudFloat 16s steps(10) infinite;
  animation-delay: -10s;
}

@keyframes cloudFloat {
  0%   { transform: translateX(-160px); }
  100% { transform: translateX(calc(100vw + 60px)); }
}

/* ════════════════════════════════════════════════════════
   世界古树 — 全幅树冠覆顶 · 根扎底部
   ════════════════════════════════════════════════════════ */
.world-tree {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  animation: treeRise 0.9s ease-out;
}
@keyframes treeRise {
  0%   { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* ══ 树冠 — 8团叶片覆盖整个顶部 ══ */
.tree-canopy-top {
  position: absolute;
  top: -30px; left: -5%;
  width: 110%; height: 140px;
}
.leaf-cluster {
  position: absolute;
  border-radius: 50%;
  display: block;
}
.lc1 { top: 0; left: -2%; width: 160px; height: 100px;
  background: radial-gradient(ellipse at 50% 60%, var(--tree-canopy-3) 0%, rgba(40,144,64,0.4) 100%); }
.lc2 { top: -10px; left: 18%; width: 180px; height: 110px;
  background: radial-gradient(ellipse at 50% 55%, var(--tree-canopy-2) 0%, rgba(32,120,56,0.35) 100%); }
.lc3 { top: 5px; left: 38%; width: 150px; height: 95px;
  background: radial-gradient(ellipse at 50% 50%, var(--tree-canopy-1) 0%, rgba(26,90,48,0.4) 100%); }
.lc4 { top: -15px; left: 55%; width: 200px; height: 120px;
  background: radial-gradient(ellipse at 50% 55%, var(--tree-canopy-3) 0%, rgba(40,144,64,0.3) 100%); }
.lc5 { top: 0; left: 72%; width: 170px; height: 105px;
  background: radial-gradient(ellipse at 50% 60%, var(--tree-canopy-2) 0%, rgba(32,120,56,0.38) 100%); }
.lc6 { top: -8px; left: 88%; width: 140px; height: 90px;
  background: radial-gradient(ellipse at 50% 55%, var(--tree-canopy-1) 0%, rgba(26,90,48,0.4) 100%); }
.lc7 { top: 12px; left: 10%; width: 120px; height: 80px;
  background: radial-gradient(ellipse at 50% 50%, var(--tree-glow) 0%, rgba(64,232,112,0.15) 100%); }
.lc8 { top: 8px; left: 64%; width: 130px; height: 85px;
  background: radial-gradient(ellipse at 50% 50%, var(--tree-glow) 0%, rgba(64,232,112,0.12) 100%); }

/* 树冠微呼吸 */
.leaf-cluster {
  animation: leafBreathe 5s ease-in-out infinite;
  will-change: transform;
}
.lc1, .lc5 { animation-delay: 0s; }
.lc2, .lc6 { animation-delay: 1.2s; }
.lc3, .lc7 { animation-delay: 2.4s; }
.lc4, .lc8 { animation-delay: 0.6s; }
@keyframes leafBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}


/* ══ 根系 — 底部6条根指 ══ */

/* ══ 光点 ══ */
.tree-sparkles {
  position: absolute;
  top: 10px; left: 5%;
  width: 90%; height: 120px;
}
.sparkle {
  position: absolute;
  display: block;
  width: 3px; height: 3px;
  background: var(--tree-particle);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--dust-glow), 0 0 14px var(--dust-glow);
  animation: sparkleGlow 3s ease-in-out infinite;
  will-change: transform, opacity;
}
.sparkle:nth-child(1) { top: 15%; left: 12%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 22%; left: 30%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { top: 8%;  left: 48%; animation-delay: 1.0s; }
.sparkle:nth-child(4) { top: 28%; left: 66%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { top: 18%; left: 80%; animation-delay: 0.7s; }
.sparkle:nth-child(6) { top: 32%; left: 38%; animation-delay: 1.2s; }
@keyframes sparkleGlow {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50%      { opacity: 1;   transform: scale(2.5); }
}

/* ══ 精灵仙子 ══ */
.tree-fairy {
  position: absolute;
  top: 50px; left: 50%;
  width: 6px; height: 6px;
  background: #ffe890;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,232,144,0.8), 0 0 16px rgba(255,200,60,0.5);
  z-index: 2;
  animation: fairyFly 6s ease-in-out infinite;
}
.tree-fairy::after {
  content: '';
  position: absolute;
  top: -3px; left: 2px;
  width: 4px; height: 4px;
  background: rgba(255,240,160,0.5);
  border-radius: 50%;
  box-shadow: 2px 0 0 rgba(255,232,144,0.4);
  animation: fairyWings 0.18s ease-in-out infinite;
}
@keyframes fairyFly {
  0%   { transform: translate(0, 0);      opacity: 1; }
  20%  { transform: translate(60px, -20px); opacity: 0.9; }
  40%  { transform: translate(120px, 5px);  opacity: 1; }
  60%  { transform: translate(40px, 15px);  opacity: 0.7; }
  80%  { transform: translate(-30px, -10px); opacity: 0.9; }
  100% { transform: translate(0, 0);       opacity: 1; }
}
@keyframes fairyWings {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.3); }
}

/* ════════════════════════════════════════════════════════
   头部
   ════════════════════════════════════════════════════════ */
.blog-header {
  background-color: var(--bg-elevated);
  box-shadow: var(--shadow);
  padding: 80px 0 16px;
  margin-bottom: 20px;
  text-align: center;
  border: 2px solid var(--border);
  position: relative;
  transition: background-color 0.4s ease, border-color var(--transition);
  overflow: visible;
  animation: headerEntrance 0.7s ease-out;
}
.blog-header::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid var(--border-inner);
  pointer-events: none;
}
.blog-title {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  color: var(--heading);
  text-shadow: 2px 2px 0 #00000040;
  letter-spacing: 2px;
  transition: color var(--transition);
  position: relative; z-index: 5;
}
.blog-subtitle {
  color: var(--text-secondary);
  margin-top: 6px;
  font-size: 0.6rem;
  font-family: var(--font-pixel);
  animation: subtitleReveal 0.9s ease-out 0.15s both;
  position: relative; z-index: 5;
}

.avatar {
  width: 72px; height: 72px;
  border: 3px solid var(--emerald);
  border-radius: 50%;
  object-fit: cover;
  margin: -30px auto 10px;
  display: block;
  position: relative;
  z-index: 10;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 5px var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: avatarAppear 0.7s ease-out, heraldryFloat 3.5s ease-in-out infinite;
}
.avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 5px var(--emerald), 0 0 20px var(--dust-glow);
}
@keyframes heraldryFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ════════════════════════════════════════════════════════
   导航栏 — 古木枝廊
   ════════════════════════════════════════════════════════ */
.blog-nav {
  background-color: var(--nav-bg);
  margin-bottom: 24px;
  position: sticky; top: 0; z-index: 1000;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transition: background-color 0.4s ease;
}
.blog-nav .container {
  position: relative;
}
.nav-list { display: flex; justify-content: center; flex-wrap: wrap; }
.nav-item { padding: 12px 16px; }
.nav-link {
  color: var(--nav-text);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 1px;
  padding: 4px 8px;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--emerald);
  border-color: var(--emerald);
  background: rgba(48,200,112,0.06);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--dust-glow);
}

.hamburger {
  display: none;
  background: none;
  border: 2px solid var(--nav-text);
  padding: 8px;
  flex-direction: column; gap: 4px; align-items: center;
  transition: border-color var(--transition);
}
.hamburger:hover { border-color: var(--emerald); }
.hamburger span {
  display: block;
  width: 20px; height: 3px;
  background: var(--nav-text);
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 导航栏两侧 — 像素翠叶飘浮 */
.blog-nav::before,
.blog-nav::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px; height: 8px;
  background: var(--emerald);
  pointer-events: none;
  opacity: 0.55;
  image-rendering: pixelated;
  transform: translateY(-50%) rotate(45deg);
  animation: navLeafFloat 2.8s ease-in-out infinite;
}
.blog-nav::before {
  left: -4px;
  border-radius: 0 50% 50% 0;
  box-shadow: -4px -4px 0 var(--leaf-light), -8px 0 0 rgba(80,224,128,0.3);
}
.blog-nav::after {
  right: -4px;
  border-radius: 50% 0 0 50%;
  box-shadow: 4px -4px 0 var(--leaf-light), 8px 0 0 rgba(80,224,128,0.3);
  animation-delay: 0.9s;
}

/* 导航栏第二对叶子 — 更小更远 */
.blog-nav .container::before,
.blog-nav .container::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px; height: 5px;
  background: var(--gold);
  pointer-events: none;
  opacity: 0.45;
  image-rendering: pixelated;
  transform: translateY(-50%) rotate(45deg);
  animation: navLeafFloatFar 3.4s ease-in-out infinite;
}
.blog-nav .container::before {
  left: 12px;
  border-radius: 50% 0 50% 0;
  animation-delay: 0.4s;
}
.blog-nav .container::after {
  right: 12px;
  border-radius: 0 50% 0 50%;
  animation-delay: 1.4s;
}

@keyframes navLeafFloat {
  0%, 100% { opacity: 0.35; transform: translateY(-50%) rotate(45deg) translateY(0); }
  50%      { opacity: 0.8;  transform: translateY(-50%) rotate(45deg) translateY(-8px); }
}
@keyframes navLeafFloatFar {
  0%, 100% { opacity: 0.25; transform: translateY(-50%) rotate(45deg) translateY(0); }
  50%      { opacity: 0.65; transform: translateY(-50%) rotate(45deg) translateY(-5px); }
}

/* ════════════════════════════════════════════════════════
   主体
   ════════════════════════════════════════════════════════ */
.blog-main { display: flex; flex-wrap: wrap; gap: 24px; }
.articles { flex: 3; min-width: 300px; }
.sidebar  { flex: 1; min-width: 250px; }

/* ════════════════════════════════════════════════════════
   搜索
   ════════════════════════════════════════════════════════ */
.search-section {
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.search-wrapper { flex: 1; min-width: 200px; position: relative; }
.search-wrapper .icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--emerald);
  font-family: var(--font-pixel); font-size: 0.55rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 36px;
  border: 2px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9rem; font-family: var(--font);
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: all var(--transition);
}
.search-input:focus {
  border-color: var(--emerald);
  box-shadow: var(--shadow-inset), 0 0 10px var(--dust-glow);
}
.search-input::placeholder { color: var(--text-muted); }

.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  padding: 6px 14px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-pixel); font-size: 0.58rem;
  box-shadow: 2px 2px 0 #00000040;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--emerald); color: var(--emerald);
  transform: translateY(-1px); box-shadow: 3px 3px 0 #00000040;
}
.filter-btn.active {
  background: var(--emerald); color: #fff;
  border-color: var(--emerald);
  box-shadow: 2px 2px 0 #00000060, 0 0 10px var(--dust-glow);
}

.no-results {
  text-align: center; padding: 40px;
  color: var(--text-muted);
  font-family: var(--font-pixel); font-size: 0.65rem;
}

/* ════════════════════════════════════════════════════════
   文章卡片 — 精灵卷轴
   ════════════════════════════════════════════════════════ */
.article-card {
  opacity: 0;
  transform: translateY(28px);
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 20px;
  border: 2px solid var(--border);
  position: relative;
  transition: all var(--transition);
}
.article-card::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid var(--border-inner);
  pointer-events: none;
  transition: border-color var(--transition);
}
.article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 5px; height: 100%;
  background: linear-gradient(to bottom,
    var(--emerald) 0%, var(--emerald) 25%,
    var(--gold) 25%, var(--gold) 50%,
    var(--emerald) 50%, var(--emerald) 75%,
    var(--gold) 75%, var(--gold) 100%
  );
}
.article-card:hover {
  transform: translateY(-4px) perspective(600px) rotateX(1.5deg);
  box-shadow: var(--shadow-lg), 0 0 18px var(--dust-glow);
  border-color: var(--emerald);
}
.article-card:hover::after { border-color: var(--emerald); }
.article-card.revealed {
  opacity: 1;
  transform: translateY(0);
}
.article-card:nth-child(1) { transition-delay: 0.05s; }
.article-card:nth-child(2) { transition-delay: 0.12s; }
.article-card:nth-child(3) { transition-delay: 0.19s; }
.article-card:nth-child(4) { transition-delay: 0.26s; }
.article-card:nth-child(5) { transition-delay: 0.33s; }

.article-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem; line-height: 1.6;
  margin-bottom: 8px;
  color: var(--heading);
  text-shadow: 2px 2px 0 #00000030;
  transition: color var(--transition);
}
.article-title a { color: inherit; transition: color var(--transition); }
.article-title a:hover { color: var(--gold); }

.article-meta {
  font-size: 0.82rem; color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.article-meta .read-time { color: var(--text-muted); font-size: 0.78rem; }

.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  padding: 4px 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 2px solid var(--tag-text);
  font-family: var(--font-pixel); font-size: 0.52rem;
  transition: all var(--transition);
}
.tag:hover {
  background: var(--tag-text);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 8px var(--dust-glow);
}

.article-excerpt {
  color: var(--text); opacity: 0.88;
  margin-bottom: 14px; line-height: 1.7; font-size: 0.92rem;
}

.read-more {
  display: inline-block;
  padding: 9px 18px;
  background: var(--accent);
  color: var(--emerald);
  border: 2px solid var(--border);
  font-family: var(--font-pixel); font-size: 0.56rem;
  box-shadow: 3px 3px 0 #00000060;
  transition: all var(--transition);
}
.read-more:hover {
  background: var(--accent-hover);
  color: var(--gold);
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 #00000060, 0 0 14px var(--dust-glow);
}
.read-more:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 #00000060;
}

/* ════════════════════════════════════════════════════════
   侧边栏
   ════════════════════════════════════════════════════════ */
.widget {
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 20px;
  border: 2px solid var(--border);
  position: relative;
  transition: all var(--transition);
}
.widget::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border: 1px solid var(--border-inner);
  pointer-events: none;
}
.widget:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 #00000060;
}
.widget-title {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--heading);
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 2px dotted var(--border);
  text-shadow: 2px 2px 0 #00000020;
  transition: color var(--transition);
}
.widget-list li {
  padding: 8px 0;
  border-bottom: 1px dotted var(--border-light);
  font-size: 0.88rem;
  transition: padding var(--transition);
}
.widget-list li:hover { padding-left: 6px; }
.widget-list li:last-child { border-bottom: none; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag { font-size: 0.58rem; padding: 5px 10px; }

/* ════════════════════════════════════════════════════════
   底部滚动
   ════════════════════════════════════════════════════════ */
.text-carousel {
  width: 100%; overflow: hidden;
  background-color: var(--bg-elevated);
  padding: 14px 0;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  transition: background-color 0.4s ease;
}
.carousel-track {
  display: flex; gap: 24px;
  animation: scroll 25s linear infinite;
  white-space: nowrap;
}
.text-carousel:hover .carousel-track { animation-play-state: paused; }
.carousel-item {
  padding: 8px 22px;
  background: var(--accent);
  color: var(--emerald);
  font-family: var(--font-pixel); font-size: 0.5rem;
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 #00000040;
  transition: transform var(--transition);
}
@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════
   页脚
   ════════════════════════════════════════════════════════ */
.blog-footer {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  text-align: center; padding: 28px 0;
  border-top: 3px solid var(--border);
  transition: background-color 0.4s ease;
}
.footer-social { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; }
.footer-social a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  background: rgba(48,200,112,0.06);
  color: var(--emerald);
  font-family: var(--font-pixel); font-size: 0.55rem;
  box-shadow: 2px 2px 0 #00000040;
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--emerald);
  color: #081808;
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #00000040, 0 0 14px var(--dust-glow);
}
.footer-copy { font-size: 0.6rem; font-family: var(--font-pixel); opacity: 0.7; }

/* ════════════════════════════════════════════════════════
   文章详情页
   ════════════════════════════════════════════════════════ */
.article-detail {
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 30px; margin-bottom: 24px;
  border: 2px solid var(--border);
  position: relative;
  transition: background-color 0.4s ease;
}
.article-detail::after {
  content: '';
  position: absolute;
  top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 1px solid var(--border-inner);
  pointer-events: none;
}
.article-detail h1 {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--heading);
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 #00000040;
  line-height: 1.6;
  transition: color var(--transition);
}
.article-detail .meta {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 2px dotted var(--border);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.article-content { color: var(--text); font-size: 15px; line-height: 1.9; }
.article-content h2 {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--emerald);
  margin: 30px 0 12px; padding: 8px 0;
  border-bottom: 2px dotted var(--border);
  transition: color var(--transition);
}
.article-content h3 {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--heading);
  margin: 20px 0 8px;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol {
  margin-bottom: 16px; padding-left: 24px;
}
.article-content ul { list-style: square; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }
.article-content code {
  background: var(--bg-input); padding: 2px 6px;
  font-size: 0.88em; font-family: var(--font-mono);
  border: 1px solid var(--border);
}
.article-content pre {
  background: var(--bg-input); padding: 16px;
  overflow-x: auto; margin-bottom: 16px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-inset);
}
.article-content pre code { background: none; padding: 0; font-size: 0.82rem; border: none; }
.article-content blockquote {
  border-left: 5px solid var(--emerald);
  padding: 12px 18px; margin-bottom: 16px;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-left: 5px solid var(--emerald);
  font-style: italic;
}

.toc {
  background: var(--bg-input);
  padding: 16px 20px; margin-bottom: 20px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-inset);
  transition: background-color 0.4s ease;
}
.toc-title {
  font-family: var(--font-pixel);
  font-size: 0.58rem; color: var(--emerald); margin-bottom: 10px;
}
.toc-list { padding-left: 0 !important; list-style: none !important; }
.toc-list li { padding: 4px 0; transition: padding var(--transition); }
.toc-list li:hover { padding-left: 6px; }
.toc-list a { color: var(--text-secondary); font-size: 0.88rem; transition: color var(--transition); }
.toc-list a:hover { color: var(--emerald); }

.article-nav {
  display: flex; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.article-nav a {
  flex: 1; padding: 14px 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  border: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
  transition: all var(--transition);
}
.article-nav a:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--emerald);
  box-shadow: 4px 4px 0 #00000040, 0 0 10px var(--dust-glow);
}
.article-nav .nav-label {
  font-family: var(--font-pixel); font-size: 0.48rem; color: var(--text-muted);
}
.article-nav .nav-title { font-size: 0.88rem; }
.article-nav a.next { text-align: right; }

/* ════════════════════════════════════════════════════════
   评论区 — 精灵议事厅
   ════════════════════════════════════════════════════════ */
.comments-section { margin-bottom: 24px; }
.comments-title {
  font-family: var(--font-pixel);
  font-size: 0.65rem; color: var(--heading);
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 2px dotted var(--border);
}

.comment-form {
  background: var(--bg-card);
  padding: 18px; box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.comment-form .form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.comment-form input,
.comment-form textarea {
  padding: 10px 14px;
  border: 2px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9rem; font-family: var(--font);
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: all var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--emerald);
  box-shadow: var(--shadow-inset), 0 0 8px var(--dust-glow);
}
.comment-form input { flex: 1; }
.comment-form textarea { width: 100%; min-height: 80px; resize: vertical; margin-bottom: 10px; }
.comment-submit {
  padding: 9px 20px;
  background: var(--accent);
  color: var(--emerald);
  border: 2px solid var(--border);
  font-family: var(--font-pixel); font-size: 0.56rem;
  box-shadow: 3px 3px 0 #00000060;
  transition: all var(--transition);
}
.comment-submit:hover {
  background: var(--accent-hover);
  color: var(--gold);
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 #00000060, 0 0 14px var(--dust-glow);
}
.comment-submit:active { transform: translateY(1px); box-shadow: 1px 1px 0 #00000060; }

.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
  background: var(--bg-card);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border);
  border-left: 4px solid var(--emerald);
  transition: all var(--transition);
}
.comment-item:hover {
  transform: translateX(2px);
  border-left-color: var(--gold);
  box-shadow: 3px 3px 0 #00000040;
}
.comment-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 6px;
}
/* ════════════════════════════════════════════════════════
   卡片滚动渐入

/* ════════════════════════════════════════════════════════
   飘落翠叶
   ════════════════════════════════════════════════════════ */
.falling-leaf {
  position: fixed;
  pointer-events: none;
  z-index: 995;
  image-rendering: pixelated;
}
.falling-leaf .leaf-inner {
  width: 10px; height: 10px;
  background: var(--emerald);
  border-radius: 0 50% 50% 0;
  opacity: 0.65;
  box-shadow: 4px -2px 0 var(--leaf-light), 6px 2px 0 rgba(80,224,128,0.25);
  animation: leafDrift var(--fall-dur) linear infinite;
  will-change: transform;
  animation-delay: var(--fall-delay);
}
@keyframes leafDrift {
  0%   { transform: translateY(-5vh) rotate(0deg) translateX(0); opacity: 0; }
  8%   { opacity: 0.7; }
  92%  { opacity: 0.5; }
  100% { transform: translateY(105vh) rotate(var(--spin)) translateX(var(--drift)); opacity: 0; }
}

/* ════════════════════════════════════════════════════════
   光标精灵尘
   ════════════════════════════════════════════════════════ */
.cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--dust-color);
  box-shadow: 0 0 5px var(--dust-glow), 0 0 10px var(--dust-glow);
  animation: sparklePop 0.55s ease-out forwards;
}
@keyframes sparklePop {
  0%   { transform: scale(0) translate(0, 0); opacity: 0; }
  30%  { transform: scale(1.8) translate(2px, -4px); opacity: 1; }
  100% { transform: scale(0) translate(8px, -14px); opacity: 0; }
}

/* ════════════════════════════════════════════════════════
   进度条 — 翡翠光脉（增强）
   ════════════════════════════════════════════════════════ */
.progress-bar::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  background: var(--leaf-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--dust-glow), 0 0 18px var(--dust-glow);
  animation: progressSpark 1.4s ease-in-out infinite;
}
@keyframes progressSpark {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.8); }
}

/* ════════════════════════════════════════════════════════
   TOC 目录高亮
   ════════════════════════════════════════════════════════ */
.toc-list a.toc-active {
  color: var(--emerald) !important;
  padding-left: 10px;
  border-left: 3px solid var(--emerald);
  transition: all 0.25s ease;
}

.comment-author {
  font-family: var(--font-pixel); font-size: 0.55rem;
  color: var(--heading);
}
.comment-time { font-size: 0.75rem; color: var(--text-muted); }
.comment-body { color: var(--text); font-size: 0.92rem; line-height: 1.6; }
.comment-delete {
  background: none;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  font-family: var(--font-pixel); font-size: 0.45rem;
  padding: 2px 6px;
  transition: all var(--transition);
}
.comment-delete:hover { color: #e06060; border-color: #e06060; }
.no-comments {
  text-align: center; color: var(--text-muted);
  padding: 24px;
  font-family: var(--font-pixel); font-size: 0.58rem;
}

/* ════════════════════════════════════════════════════════
   响应式
   ════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   页面板块 — 翠叶藏书 / 贤者之泉 / 风之信使
   ════════════════════════════════════════════════════════ */
.page-section {
  display: none;
  margin-bottom: 30px;
}
.page-section.active {
  display: block;
  animation: sectionIn 0.4s ease-out;
}
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section-header {
  text-align: center;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--heading);
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 #00000030;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ══ 翠叶藏书 — 项目卡片 ══ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}
.project-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  transition: all var(--transition);
}
.project-card::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border: 1px solid var(--border-inner);
  pointer-events: none;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg), 0 0 14px var(--dust-glow);
}
.project-icon {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--emerald);
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 #00000020;
}
.project-card h3 {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--heading);
  margin-bottom: 8px;
  line-height: 1.5;
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 10px;
}
.project-card .tag {
  margin-right: 4px;
}


/* ══ 贤者之泉 — 像素喷泉 ══ */
.fountain-box {
  max-width: 500px;
  margin: 0 auto;
}
.fountain-pool {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow), var(--shadow-inset);
  overflow: hidden;
}
/* 泉眼底座 */
.fountain-base {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 16px;
  background: var(--border);
  border-radius: 2px;
  box-shadow:
    -8px 0 0 var(--border), 8px 0 0 var(--border),
    -16px -2px 0 rgba(42,74,50,0.6), 16px -2px 0 rgba(42,74,50,0.6),
    0 -4px 0 var(--emerald);
}
/* 水面涟漪 */
.pool-ripple {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--emerald);
  border-radius: 50%;
  opacity: 0;
  animation: rippleOut 2s ease-out infinite;
  will-change: transform, opacity;
}
.r1 { width: 20px; height: 6px; animation-delay: 0s; }
.r2 { width: 20px; height: 6px; animation-delay: 0.7s; }
.r3 { width: 20px; height: 6px; animation-delay: 1.4s; }
@keyframes rippleOut {
  0%   { width: 10px; opacity: 0.7; }
  100% { width: 160px; opacity: 0; }
}
/* 水珠粒子 */
.water-drops {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 120px;
  pointer-events: none;
}
.drop {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--dust-glow);
  animation: dropUp var(--dur) ease-out infinite;
  will-change: transform, opacity;
  animation-delay: var(--delay);
  opacity: 0;
}
.d1  { --dur: 1.2s; --delay: 0s; }
.d2  { --dur: 1.4s; --delay: 0.15s; }
.d3  { --dur: 1.1s; --delay: 0.3s; }
.d4  { --dur: 1.5s; --delay: 0.45s; }
.d5  { --dur: 1.3s; --delay: 0.6s; }
.d6  { --dur: 1.2s; --delay: 0.75s; }
.d7  { --dur: 1.6s; --delay: 0.9s; }
.d8  { --dur: 1.1s; --delay: 1.05s; }
.d9  { --dur: 1.4s; --delay: 1.2s; }
.d10 { --dur: 1.3s; --delay: 1.35s; }
/* 交替色彩 */
.drop:nth-child(odd)  { background: #60e0ff; box-shadow: 0 0 6px rgba(96,224,255,0.6); }
.drop:nth-child(3n)  { background: #ffe890; box-shadow: 0 0 6px rgba(255,232,144,0.6); }
@keyframes dropUp {
  0%   { bottom: 0;   opacity: 1; transform: translateX(-50%) scale(1); }
  60%  { opacity: 0.9; }
  100% { bottom: 110px; opacity: 0; transform: translateX(-50%) translateX(var(--drift, 0px)) scale(0.3); }
}
/* 水珠左右飘散 */
.drop:nth-child(2n)  { --drift: 10px; }
.drop:nth-child(4n)  { --drift: -8px; }
.drop:nth-child(3n+1) { --drift: 4px; }

/* ══ 风之信使 ══ */
.contact-simple {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 400px;
  margin: 0 auto;
}
.contact-qq-num {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--heading);
  margin-bottom: 16px;
  text-shadow: 2px 2px 0 #00000020;
}
.contact-qq-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--emerald);
  border: 2px solid var(--border);
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  box-shadow: 3px 3px 0 #00000060;
  transition: all var(--transition);
}
.contact-qq-btn:hover {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 #00000060, 0 0 14px var(--dust-glow);
}
@media (max-width: 768px) {
  .blog-title { font-size: 1rem; }
  .blog-subtitle { font-size: 0.5rem; }
  .blog-main { flex-direction: column; }
  .sidebar { min-width: 100%; }

  .hamburger { display: flex; }

  /* 移动端古树 */
  .tree-canopy-top { top: -15px; height: 80px; }
  .lc1 { width: 80px; height: 50px; }
  .lc2 { width: 90px; height: 55px; }
  .lc3 { width: 75px; height: 48px; }
  .lc4 { width: 100px; height: 60px; }
  .lc5 { width: 85px; height: 52px; }
  .lc6 { width: 70px; height: 45px; }
  .lc7 { width: 60px; height: 40px; }
  .lc8 { width: 65px; height: 42px; }
  .tree-sparkles { top: 4px; height: 70px; }
  .tree-fairy { top: 24px; }

  .blog-nav .container { display: flex; justify-content: space-between; align-items: center; }
  .nav-list {
    display: none; flex-direction: column;
    width: 100%;
    position: absolute; top: 100%; left: 0;
    background: var(--nav-bg);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-list.open { display: flex; }
  .nav-item { padding: 10px 16px; text-align: center; }


  .article-card { padding: 16px; }
  .article-title { font-size: 0.65rem; }
  .article-detail { padding: 18px; }
  .article-detail h1 { font-size: 0.72rem; }
  .article-content { font-size: 14px; }
  .search-section { flex-direction: column; }
  .comment-form .form-row { flex-direction: column; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }

  /* 移动端主题按钮 — 放在导航栏下方以免遮挡 */
  .theme-toggle { top: 52px; right: 10px; width: 34px; height: 34px; }

  /* 移动端星体 — 导航栏下方 */
  .celestial-body { top: 40px; left: 6px; width: 32px; height: 32px; }
  .celestial-body::before { width: 26px; height: 26px; top: 2px; left: 2px; }
  .celestial-body::after { width: 24px; height: 24px; top: -3px; left: 8px; }
  [data-theme="light"] .celestial-body::before { width: 22px; height: 22px; top: 4px; left: 4px; }
  [data-theme="light"] .celestial-body::after { width: 30px; height: 30px; top: 1px; left: 1px;
    box-shadow:
      0 -5px 0 1px rgba(255,184,48,0.55), 0 5px 0 1px rgba(255,184,48,0.55),
      -5px 0 0 1px rgba(255,184,48,0.55), 5px 0 0 1px rgba(255,184,48,0.55),
      -4px -4px 0 1px rgba(255,184,48,0.55), 4px -4px 0 1px rgba(255,184,48,0.55),
      -4px 4px 0 1px rgba(255,184,48,0.55), 4px 4px 0 1px rgba(255,184,48,0.55);
  }

  /* 移动端喷泉 */
  .fountain-pool { height: 150px; }
  .fountain-base { bottom: 24px; width: 24px; height: 12px; }
  .water-drops { bottom: 32px; height: 100px; }
  .pool-ripple { bottom: 18px; }

  /* 移动端导航栏装饰 — 缩到内侧 */
  .blog-nav::before { left: 4px; width: 5px; height: 5px; }
  .blog-nav::after  { right: 4px; width: 5px; height: 5px; }
  .blog-nav .container::before { left: 20px; }
  .blog-nav .container::after  { right: 20px; }
}

@media (max-width: 480px) {
  .container { width: 95%; padding: 0 8px; }
  .article-meta { flex-direction: column; gap: 4px; }
  .filter-tags { gap: 4px; }
  .filter-btn { padding: 4px 10px; font-size: 0.5rem; }
  .article-nav { flex-direction: column; }
  .article-title { font-size: 0.6rem; }
}
