:root {
  color-scheme: dark;

  /* ===== 重新设计的主题颜色系统 ===== */
  /* 深色主题 (默认) - 采用更现代的色彩方案 */
  --bg-0: #0a0f1a;
  --bg-1: #121826;
  --bg-2: #1a2232;
  --bg-3: #242c3d;
  --glass-bg: rgba(30, 41, 59, 0.3);
  --glass-border: rgba(148, 163, 184, 0.2);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --accent-light: #93c5fd;
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.2);

  /* 浅色主题 - 更柔和现代的配色 */
  --light-bg-0: #f8fafc;
  --light-bg-1: #f1f5f9;
  --light-bg-2: #e2e8f0;
  --light-bg-3: #cbd5e1;
  --light-glass-bg: rgba(226, 232, 240, 0.6);
  --light-glass-border: rgba(148, 163, 184, 0.3);
  --light-text: #1e293b;
  --light-text-muted: #475569;
  --light-text-dim: #64748b;
  --light-accent: #3b82f6;
  --light-accent-strong: #2563eb;
  --light-accent-light: #60a5fa;
  --light-shadow: 0 25px 50px rgba(148, 163, 184, 0.15);
  --light-shadow-glass: 0 8px 32px rgba(148, 163, 184, 0.1);

  /* ===== 统一动效系统 - 重构版 ===== */
  /* 缓动函数 */
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* 过渡时间 */
  --transition-instant: 0.1s;
  --transition-fast: 0.2s;
  --transition-base: 0.3s;
  --transition-smooth: 0.4s;
  --transition-slow: 0.6s;
  --transition-modal: 0.5s;
  --transition-theme: 0.8s;

  /* 动画配置 */
  --animation-scale-sm: scale(1.02);
  --animation-scale-md: scale(1.05);
  --animation-scale-lg: scale(1.1);
  --animation-translate-up-sm: translateY(-2px);
  --animation-translate-up-md: translateY(-4px);
  --animation-translate-up-lg: translateY(-8px);
  --animation-translate-down-sm: translateY(1px);
  --animation-rotate-sm: rotate(5deg);

  /* 阴影效果 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);
  --shadow-accent: 0 8px 25px rgba(56, 189, 248, 0.3);
  --shadow-accent-lg: 0 15px 40px rgba(56, 189, 248, 0.4);

  /* 模糊效果 */
  --blur-sm: blur(4px);
  --blur-md: blur(8px);
  --blur-lg: blur(16px);

  /* 透明度 */
  --opacity-disabled: 0.5;
  --opacity-hover: 0.8;
  --opacity-active: 0.6;
  --opacity-theme-transition: 0.7;
}

/* ===== 高级动画系统 ===== */

/* 页面加载动画 - 重构版 */
@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    filter: var(--blur-lg);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(1.01);
    filter: var(--blur-sm);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* 优雅淡入动画 */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 缩放淡入动画 */
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  70% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 弹性弹入动画 */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 滑动进入动画 */
@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 脉冲光效 */
@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
  }
}

/* 背景浮动动画 */
@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(30px, -20px, 0) scale(1.05);
  }
  66% {
    transform: translate3d(-20px, 15px, 0) scale(0.98);
  }
}

/* ===== 滚动特效动画 ===== */

/* 视差滚动效果 */
@keyframes parallax {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-20px) scale(1.02);
  }
}

/* 元素渐现动画 */
@keyframes fadeInUpStaggered {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* 滚动触发动画 */
@keyframes scrollReveal {
  0% {
    opacity: 0;
    transform: translateY(80px) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* 波浪形背景动画 */
@keyframes wave {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-5px) translateY(-3px);
  }
  50% {
    transform: translateX(0) translateY(-5px);
  }
  75% {
    transform: translateX(5px) translateY(-2px);
  }
}

/* 粒子效果动画 */
@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(20px, -15px) scale(1.1);
    opacity: 0.5;
  }
  50% {
    transform: translate(10px, -25px) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translate(-15px, -10px) scale(1.05);
    opacity: 0.4;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition:
    background var(--transition-theme) var(--ease-in-out-quart),
    color var(--transition-theme) var(--ease-in-out-quart);
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, var(--bg-2) 0%, var(--bg-0) 60%)
    fixed;
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.2px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  animation: pageLoad 1s var(--ease-out-cubic) forwards;
}

/* 浅色主题 */
body.theme-light {
  color: var(--light-text);
  background: radial-gradient(
      circle at top,
      var(--light-bg-2) 0%,
      var(--light-bg-0) 60%
    )
    fixed;
}

body.theme-light .glass {
  background: var(--light-glass-bg);
  border-color: var(--light-glass-border);
  box-shadow: var(--light-shadow);
}

body.theme-light .nav a:hover {
  background: rgba(15, 23, 42, 0.08);
}

body.theme-light .btn.ghost {
  border-color: rgba(15, 23, 42, 0.25);
  color: var(--light-text);
  background: rgba(15, 23, 42, 0.08);
}

/* 主题切换过渡效果 */
body.theme-transition {
  transition:
    background var(--transition-theme) var(--ease-in-out-quart),
    color var(--transition-theme) var(--ease-in-out-quart);
}

body.theme-transition * {
  transition:
    background-color var(--transition-theme) var(--ease-in-out-quart),
    border-color var(--transition-theme) var(--ease-in-out-quart),
    box-shadow var(--transition-theme) var(--ease-in-out-quart);
}

body.is-home {
  scrollbar-width: none;
}

body.is-home::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-orbs::before,
.bg-orbs::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: float 16s ease-in-out infinite;
}

.bg-orbs::before {
  top: -80px;
  left: -60px;
  background: radial-gradient(
    circle,
    rgba(125, 211, 252, 0.5),
    transparent 65%
  );
}

.bg-orbs::after {
  bottom: -120px;
  right: -80px;
  background: radial-gradient(
    circle,
    rgba(248, 250, 252, 0.35),
    transparent 70%
  );
  animation-delay: -6s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, -30px, 0) scale(1.08);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 24px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  z-index: 999;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 16px;
}

img {
  max-width: 100%;
  border-radius: 16px;
}

.site-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  width: 100%;
  flex: 1;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  transition: all var(--transition-smooth) var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
  will-change: transform, opacity, backdrop-filter;
}

/* 玻璃质感增强效果 */
.glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-smooth) var(--ease-out-cubic);
}

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

/* ===== 弹窗模态框动画系统 ===== */

/* 模态框遮罩层动画 */
@keyframes modalOverlayIn {
  0% {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  100% {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes modalOverlayOut {
  0% {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
  100% {
    opacity: 0;
    backdrop-filter: blur(0);
  }
}

/* 模态框内容动画 */
@keyframes modalContentIn {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.95) rotateX(-5deg);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
  }
}

@keyframes modalContentOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(40px) scale(0.9) rotateX(5deg);
    filter: blur(8px);
  }
}

/* 搜索框特定动画 */
@keyframes searchDialogIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    filter: blur(8px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes searchDialogOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(6px);
  }
}

/* ===== 重新设计的搜索框样式 ===== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px) saturate(1.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-modal) var(--ease-out-cubic);
  will-change: opacity, backdrop-filter;
}

body.theme-light .search-overlay {
  background: rgba(248, 250, 252, 0);
}

.search-overlay.is-visible {
  opacity: 1;
}

.search-dialog {
  width: min(90%, 680px);
  max-height: 75vh;
  border-radius: 20px;
  padding: 0;
  background: var(--bg-1);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  transform: scale(0.95) translateY(-20px);
  opacity: 0;
  transition:
    transform var(--transition-modal) var(--ease-out-back),
    opacity var(--transition-modal) var(--ease-out-cubic);
  will-change: transform, opacity;
  overflow: hidden;
}

body.theme-light .search-dialog {
  background: var(--light-bg-1);
  border-color: var(--light-glass-border);
  box-shadow: var(--light-shadow-glass);
}

.search-overlay.is-visible .search-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.search-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
}

body.theme-light .search-header {
  background: var(--light-bg-2);
  border-bottom-color: var(--light-glass-border);
}

.search-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

body.theme-light .search-header h2 {
  color: var(--light-text);
}

.search-close {
  background: var(--bg-3);
  border: 1px solid var(--glass-border);
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all var(--transition-base) var(--ease-out-cubic);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

body.theme-light .search-close {
  background: var(--light-bg-3);
  border-color: var(--light-glass-border);
  color: var(--light-text-muted);
}

.search-close:hover {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: var(--bg-1);
  transform: scale(1.1) rotate(90deg);
}

body.theme-light .search-close:hover {
  background: var(--light-accent);
  border-color: var(--light-accent-strong);
  color: white;
}

.search-input {
  padding: 28px;
}

body.theme-light .search-input {
  background: var(--light-bg-1);
}

.search-input input {
  width: 100%;
  padding: 18px 24px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 2px solid var(--glass-border);
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--transition-base) var(--ease-out-cubic);
  font-weight: 500;
}

body.theme-light .search-input input {
  background: var(--light-bg-2);
  border-color: var(--light-glass-border);
  color: var(--light-text);
}

.search-input input::placeholder {
  color: var(--text-dim);
  font-weight: normal;
}

body.theme-light .search-input input::placeholder {
  color: var(--light-text-dim);
}

.search-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: var(--bg-3);
  transform: translateY(-2px);
}

body.theme-light .search-input input:focus {
  border-color: var(--light-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: var(--light-bg-3);
}

.search-results {
  max-height: 350px;
  overflow-y: auto;
  padding: 0 28px 28px;
  background: var(--bg-1);
}

body.theme-light .search-results {
  background: var(--light-bg-1);
}

.search-empty {
  text-align: center;
  padding: 56px 28px;
  color: var(--text-dim);
  font-size: 1rem;
  font-style: italic;
}

body.theme-light .search-empty {
  color: var(--light-text-dim);
}

.search-item {
  display: block;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base) var(--ease-out-cubic);
  cursor: pointer;
}

body.theme-light .search-item {
  background: var(--light-bg-2);
  border-color: var(--light-glass-border);
}

.search-item:hover {
  background: var(--bg-3);
  border-color: var(--accent-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-sm);
}

body.theme-light .search-item:hover {
  background: var(--light-bg-3);
  border-color: var(--light-accent-light);
}

.search-item-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.3;
}

body.theme-light .search-item-title {
  color: var(--light-text);
}

.search-item-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0.8;
}

body.theme-light .search-item-excerpt {
  color: var(--light-text-muted);
}

/* ===== 性能优化和设备适配 ===== */

/* 减少动画对性能的影响 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 硬件加速优化 */
.hardware-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 移动设备优化 */
@media (max-width: 768px) {
  /* 简化移动设备上的动画 */
  .btn:hover {
    transform: none;
  }

  .nav a:hover {
    transform: none;
  }

  /* 移动设备搜索框优化 */
  .search-dialog {
    width: 95%;
    margin: 20px;
    border-radius: 20px;
  }

  .search-header {
    padding: 20px 20px 12px;
  }

  .search-input {
    padding: 20px;
  }

  .search-results {
    padding: 0 20px 20px;
    max-height: 60vh;
  }

  /* 移动设备头部优化 */
  .site-header {
    margin: 16px auto 24px;
    width: calc(100% - 32px);
  }

  .header-inner {
    padding: 12px 20px;
    gap: 16px;
  }

  .nav {
    gap: 12px;
    font-size: 0.9rem;
  }

  .nav a {
    padding: 8px 12px;
  }
}

/* 平板设备优化 */
@media (max-width: 1024px) and (min-width: 769px) {
  .site-wrapper {
    padding: 0 20px 60px;
  }

  .search-dialog {
    width: 85%;
  }
}

/* 高DPI设备优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* 增强高DPI设备的视觉效果 */
  .glass {
    backdrop-filter: blur(32px) saturate(1.4);
    -webkit-backdrop-filter: blur(32px) saturate(1.4);
  }

  .site-header.scrolled {
    backdrop-filter: blur(40px) saturate(1.9);
    -webkit-backdrop-filter: blur(40px) saturate(1.9);
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 移除触摸设备上不必要的hover效果 */
  .btn:hover::before,
  .btn:hover::after,
  .nav a:hover::before,
  .nav a:hover::after {
    opacity: 0;
    transition: none;
  }

  /* 增强触摸反馈 */
  .btn:active,
  .nav a:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
  }
}

/* 低电量模式优化 */
@media (prefers-reduced-data: reduce) {
  /* 减少动画和视觉效果以节省数据 */
  .bg-orbs::before,
  .bg-orbs::after {
    animation: none;
    opacity: 0.3;
  }

  .glass::before {
    display: none;
  }
}

/* 打印样式优化 */
@media print {
  /* 打印时移除所有动画和视觉效果 */
  * {
    animation: none !important;
    transition: none !important;
  }

  .glass,
  .site-header {
    background: white !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .bg-orbs {
    display: none;
  }
}

/* ===== 统一动效风格语言 ===== */

/* 统一的动效类 */
.motion-enter {
  animation: fadeInUp 0.6s var(--ease-out-cubic) forwards;
}

.motion-exit {
  animation: fadeOutDown 0.4s var(--ease-in-cubic) forwards;
}

.motion-scale {
  animation: scaleIn 0.5s var(--ease-out-back) forwards;
}

.motion-bounce {
  animation: bounceIn 0.7s var(--ease-bounce) forwards;
}

/* 状态变化动画 */
.state-change {
  transition: all var(--transition-base) var(--ease-out-cubic);
}

.state-change-fast {
  transition: all var(--transition-fast) var(--ease-out-quad);
}

.state-change-slow {
  transition: all var(--transition-slow) var(--ease-in-out-quart);
}

/* 焦点状态动画 */
.focus-animation:focus-visible {
  animation: glowPulse 0.6s var(--ease-out-cubic);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 加载状态动画 */
.loading-animation {
  position: relative;
  overflow: hidden;
}

.loading-animation::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

/* 错误状态动画 */
.error-shake {
  animation: shake 0.5s var(--ease-out-cubic);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* 成功状态动画 */
.success-pulse {
  animation: successPulse 0.6s var(--ease-out-cubic);
}

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

/* 页面切换动画 */
.page-transition-enter {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s var(--ease-out-cubic) forwards;
}

.page-transition-exit {
  opacity: 1;
  transform: translateY(0);
  animation: fadeOutDown 0.4s var(--ease-in-cubic) forwards;
}

/* 统一动效风格类 */
.animate-fade-in {
  animation: fadeInUp 0.6s var(--ease-out-cubic) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s var(--ease-out-back) forwards;
}

.animate-bounce-in {
  animation: bounceIn 0.7s var(--ease-bounce) forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s var(--ease-out-cubic) forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s var(--ease-out-cubic) forwards;
}

/* 延迟动画 */
.animate-delay-1 {
  animation-delay: 0.1s;
}
.animate-delay-2 {
  animation-delay: 0.2s;
}
.animate-delay-3 {
  animation-delay: 0.3s;
}
.animate-delay-4 {
  animation-delay: 0.4s;
}
.animate-delay-5 {
  animation-delay: 0.5s;
}

/* 视差滚动元素 */
.parallax-element {
  transition: transform var(--transition-slow) var(--ease-out-cubic);
  will-change: transform;
}

/* 滚动触发动画容器 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: all var(--transition-slow) var(--ease-out-cubic);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-header {
  position: sticky;
  top: 20px;
  z-index: 10;
  margin: 24px auto 32px;
  width: min(1200px, calc(100% - 48px));
  border-radius: 24px;
  transition:
    transform var(--transition-base),
    background var(--transition-base),
    backdrop-filter var(--transition-base);
  will-change: transform, backdrop-filter;
}

.site-header.scrolled {
  transform: translateY(-6px) scale(0.98);
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
}

/* ===== 数据加载动画系统 ===== */

/* 骨架屏加载动画 */
@keyframes skeletonPulse {
  0%,
  100% {
    background-color: rgba(255, 255, 255, 0.05);
  }
  50% {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

@keyframes skeletonShimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* 进度条动画 */
@keyframes progressBar {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 加载旋转器 */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 渐进加载动画 */
@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 骨架屏基础样式 */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.06) 75%
  );
  background-size: 200px 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.skeleton::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: skeletonShimmer 2s ease-in-out infinite;
}

/* 加载状态容器 */
.loading-container {
  position: relative;
  overflow: hidden;
}

.loading-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}

/* ===== 数据加载动画 - 优化版 ===== */

/* 内容渐进加载动画 */
.content-loading {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  animation: contentFadeIn 0.8s var(--ease-out-cubic) forwards;
}

.content-loading:nth-child(1) {
  animation-delay: 0.1s;
}
.content-loading:nth-child(2) {
  animation-delay: 0.2s;
}
.content-loading:nth-child(3) {
  animation-delay: 0.3s;
}
.content-loading:nth-child(4) {
  animation-delay: 0.4s;
}
.content-loading:nth-child(5) {
  animation-delay: 0.5s;
}

/* 文章卡片加载动画 */
.post-card {
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  animation: fadeInUp 0.6s var(--ease-out-cubic) forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
}

/* 图片懒加载动画 */
.lazy-image {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.5s var(--ease-out-cubic),
    transform 0.5s var(--ease-out-cubic);
}

.lazy-image.loaded {
  opacity: 1;
  transform: scale(1);
}

/* 进度指示器 */
.loading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transform: translateX(-100%);
  z-index: 10000;
}

.loading-progress.active {
  animation: progressBar 1.5s var(--ease-out-cubic) infinite;
}

/* 头部导航项动画 - 优化版 */
.nav a {
  position: relative;
  padding: 10px 16px;
  border-radius: 12px;
  transition: all var(--transition-smooth);
  will-change: transform, background;
}

.nav a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(125, 211, 252, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--transition-smooth);
  opacity: 0;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.nav a:hover::before {
  width: 120%;
  height: 120%;
  opacity: 1;
}

.nav a:hover::after {
  width: 70%;
}

.nav a:active {
  transform: translateY(0) scale(1);
  transition-duration: 0.1s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  letter-spacing: 0.6px;
}

.logo-mark {
  color: var(--accent-strong);
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a {
  transition: color 0.2s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== 主题切换按钮 ===== */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out-cubic);
  display: flex;
  align-items: center;
  padding: 2px;
}

.theme-toggle::before {
  content: "🌙";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.8;
  transition: all var(--transition-base) var(--ease-out-cubic);
}

.theme-toggle::after {
  content: "☀️";
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
  transition: all var(--transition-base) var(--ease-out-cubic);
}

.theme-toggle .toggle-handle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  transition: transform var(--transition-base) var(--ease-out-cubic);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.theme-toggle:hover .toggle-handle {
  transform: scale(1.1);
}

.theme-toggle.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
}

.theme-toggle.active .toggle-handle {
  transform: translateX(20px);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.theme-toggle.active::before {
  opacity: 0.6;
}

.theme-toggle.active::after {
  opacity: 0.9;
}

/* ===== 按钮系统 - 重构版 ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base) var(--ease-out-cubic);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  will-change: transform, box-shadow, background;
  isolation: isolate;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--transition-slow) var(--ease-out-cubic);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left var(--transition-slow) var(--ease-in-out-quart);
  pointer-events: none;
  z-index: -1;
}

.btn.primary {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.95),
    rgba(14, 165, 233, 0.7)
  );
  color: #0b1020;
  box-shadow: var(--shadow-accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: var(--animation-translate-up-md) var(--animation-scale-sm);
  box-shadow: var(--shadow-accent-lg);
  border-color: rgba(56, 189, 248, 0.5);
}

.btn:hover::before {
  width: 120%;
  height: 120%;
  opacity: 1;
}

.btn:hover::after {
  left: 100%;
}

.btn:active {
  transform: var(--animation-translate-down-sm) scale(0.98);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-instant) var(--ease-out-quad);
}

.btn:active::before {
  width: 0;
  height: 0;
  opacity: 0;
  transition: all var(--transition-fast) var(--ease-out-quad);
}

/* 按钮水波纹效果 - 优化版 */
.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--transition-smooth);
  opacity: 0;
  pointer-events: none;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(125, 211, 252, 0.25) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.35s ease-out,
    height 0.35s ease-out,
    opacity 0.35s ease-out;
  opacity: 0;
  pointer-events: none;
}

.btn:hover::before {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.btn:active::after {
  width: 60px;
  height: 60px;
  opacity: 1;
  transition:
    width 0.2s ease-out,
    height 0.2s ease-out,
    opacity 0.1s;
}

.hero {
  padding: 64px 48px;
  border-radius: 32px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(125, 211, 252, 0.2),
    transparent 60%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-family: "Playfair Display", serif;
  margin-bottom: 16px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 24px;
  padding: 24px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(125, 211, 252, 0.1),
    transparent
  );
  transition: left var(--transition-smooth);
}

.post-card-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.post-card:hover {
  transform: var(--animation-translate-up) var(--animation-scale-in);
  box-shadow: var(--shadow-card);
}

.post-card:hover::before {
  left: 100%;
}

/* 文章卡片加载动画 */
.post-card.animate-in {
  animation: slideInUp 0.6s var(--transition-smooth) forwards;
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.post-excerpt {
  color: #cbd5f5;
  font-size: 0.95rem;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.read-more {
  color: var(--accent);
  font-weight: 500;
}

.post {
  padding: 40px;
  border-radius: 28px;
}

.post-header h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 12px;
}

.post-content {
  display: grid;
  gap: 18px;
  color: #d6e1ff;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 24px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
}

.post-content pre {
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.85);
  overflow-x: auto;
}

.archive {
  padding: 32px;
  border-radius: 28px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-radius: 18px;
}

.page-info {
  color: var(--muted);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px 80px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 20px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

/* === 搜索框动画系统 - 优化版 === */

/* 搜索遮罩层 - 平滑淡入效果 */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent;
  backdrop-filter: blur(28px) saturate(3);
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: all var(--transition-modal);
  will-change: opacity, transform, backdrop-filter;
  pointer-events: none;
}

.search-overlay.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 搜索对话框 - 平滑弹入效果 */
.search-dialog {
  width: min(720px, calc(100% - 48px));
  max-height: min(600px, calc(100vh - 100px));
  padding: 28px;
  border-radius: 28px;
  transform: translateZ(0) scale(0.95);
  opacity: 0;
  animation: dialogSlideIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.08s;
}

/* 对话框平滑滑入动画 */
@keyframes dialogSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    filter: blur(4px);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.01) translateY(-2px);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* 搜索状态下的页面样式 */
body.search-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 搜索状态下页面内容被隐藏，避免遮挡 */
body.search-open .site-wrapper,
body.search-open .site-footer {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

/* 搜索状态下头部保持稳定 */
body.search-open .site-header {
  transform: none !important;
  transition: none !important;
  opacity: 0;
  pointer-events: none;
}

body.search-open .header-inner {
  transform: none !important;
  transition: none !important;
}

/* 搜索输入框 */
.search-input {
  position: relative;
  margin-bottom: 16px;
}

.search-input input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  transition: all var(--transition-smooth);
  will-change: transform, box-shadow;
}

.search-input input::placeholder {
  color: var(--muted);
}

.search-input input:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(125, 211, 252, 0.4);
}

/* 搜索结果列表 */
.search-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow: auto;
}

/* 搜索结果项 */
.search-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-smooth);
  will-change: transform, box-shadow;
}

.search-item:hover {
  transform: var(--animation-translate-up);
  box-shadow: var(--shadow-hover);
  border-color: rgba(125, 211, 252, 0.4);
}

.search-item-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.search-item-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
}

/* 搜索空状态 */
.search-empty {
  padding: 16px 0;
  text-align: center;
  color: var(--muted);
}

/* 搜索头部 */
.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-header h2 {
  font-size: 1.2rem;
}

/* 搜索关闭按钮 */
.search-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-base);
  will-change: transform, background-color;
}

.search-close:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.1);
}

/* 隐藏属性 */
.search-overlay[hidden] {
  display: none;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text);
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.tag-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(125, 211, 252, 0.2),
    transparent
  );
  transition: left var(--transition-smooth);
}

.tag-chip:hover {
  transform: var(--animation-translate-up) var(--animation-scale-in);
  border-color: rgba(125, 211, 252, 0.6);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow-hover);
}

.tag-chip:hover::before {
  left: 100%;
}

.tag-chip:active {
  transform: var(--animation-translate-down-sm);
}

.tag-name {
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.tag-count {
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* 标签页面特定样式 */
.archive.tags-page {
  min-height: 60vh;
}

.archive.tags-page h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tags-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.archive-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.archive-title {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.archive-actions .btn {
  padding: 6px 14px;
}

@media (max-width: 700px) {
  .archive-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-actions {
    width: 100%;
  }
}

#pjax-container {
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    filter 0.28s ease;
  will-change: opacity, transform;
}

#pjax-container.pjax-exit {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(10px);
}

#pjax-container.pjax-enter {
  opacity: 0;
  transform: translateY(12px);
}

#pjax-container.pjax-enter.pjax-enter-active {
  opacity: 1;
  filter: none;
  transform: translateY(0);
}

/* === 全局动画工具类 === */
.animate-fade-in {
  animation: fadeIn 0.4s var(--transition-modal) forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s var(--transition-modal) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s var(--transition-bounce) forwards;
}

.animate-glow {
  animation: glowPulse 2s ease-in-out infinite;
}

/* 动画关键帧定义 */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
  }
}

/* 统一交互元素动画 - 优化版 */
.btn,
.post-card,
.tag-chip,
.search-item {
  transition: all var(--transition-smooth);
  will-change: transform, box-shadow;
}

.btn:hover {
  transform: var(--animation-translate-up) var(--animation-scale-in);
  box-shadow: var(--shadow-hover);
}

.post-card:hover {
  transform: var(--animation-translate-up) var(--animation-scale-in);
  box-shadow: var(--shadow-card);
}

.tag-chip:hover {
  transform: var(--animation-translate-up) var(--animation-scale-in);
  box-shadow: var(--shadow-hover);
}

.search-item:hover {
  transform: var(--animation-translate-up);
  box-shadow: var(--shadow-hover);
}

/* 页面加载动画统一 */
.pjax-enter-active {
  animation: slideUp 0.4s var(--transition-modal) forwards;
}

/* 性能优化和动画降级 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .glass::before,
  .post-card::before,
  .tag-chip::before {
    display: none !important;
  }
}

/* 低性能设备优化 */
@media (max-width: 768px) {
  .bg-orbs::before,
  .bg-orbs::after {
    animation-duration: 24s !important;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .post-card:hover {
    transform: none !important;
  }

  .btn:hover {
    transform: none !important;
  }

  .tag-chip:hover {
    transform: none !important;
  }

  .site-header .nav a:hover {
    background: transparent !important;
    transform: none !important;
  }

  .site-header .nav a:hover::after {
    width: 0 !important;
  }
}

/* 高刷新率屏幕优化 */
@media (min-resolution: 120dpi) {
  .glass {
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
  }

  .site-header.scrolled {
    backdrop-filter: blur(32px) saturate(1.9) !important;
    -webkit-backdrop-filter: blur(32px) saturate(1.9) !important;
  }
}

/* 电池节能模式优化 */
@media (prefers-reduced-data: reduce) {
  .bg-orbs {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav {
    width: 100%;
    justify-content: center;
    order: 3;
    margin-top: 8px;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .hero {
    padding: 48px 32px;
  }
}

@media (max-width: 600px) {
  .site-wrapper {
    padding: 0 16px 60px;
  }

  .site-header {
    margin: 16px auto 24px;
    width: calc(100% - 32px);
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 36px 24px;
  }

  .post {
    padding: 28px 22px;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .search-dialog {
    padding: 20px;
  }
}
