﻿/* ============================================
   NovaCraft Design System — IMT WordPress Theme
   基于 NovaCraft Studio 设计规范
   ============================================ */

/* ----- CSS 自定义属性 (Design Tokens) ----- */
:root {
  /* === 品牌主色 === */
  --color-brand-500: #7c3aed;
  --color-brand-400: #a78bfa;
  --color-brand-300: #c4b5fd;
  --color-brand-glow: rgba(124, 58, 237, 0.18);

  /* === 品牌辅色 === */
  --color-accent-blue: #3b82f6;
  --color-accent-cyan: #06b6d4;
  --color-accent-pink: #ec4899;
  --color-accent-orange: #f97316;
  --color-accent-green: #10b981;

  /* === 品牌渐变 === */
  --gradient-brand: 135deg, #7c3aed 0%, #3b82f6 50%, #06b6d4 100%;
  --gradient-accent: 135deg, #8b5cf6 0%, #6366f1 100%;
  --gradient-warm: 135deg, #ec4899 0%, #f97316 100%;
  --gradient-cool: 135deg, #10b981 0%, #06b6d4 100%;

  /* === 中性色 — 浅色模式 === */
  --neutral-0: #ffffff;
  --neutral-50: #f8f9fb;
  --neutral-100: #f0f2f5;
  --neutral-200: #e2e5ea;
  --neutral-300: #c8cdd4;
  --neutral-500: #6b7280;
  --neutral-700: #374151;
  --neutral-900: #111827;

  /* === 语义色 === */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* === 字体 === */
  --font-sans: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Courier New', monospace;

  /* === 字号阶梯 === */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --lh-xs: 1.4;
  --lh-sm: 1.5;
  --lh-base: 1.6;
  --lh-lg: 1.6;
  --lh-xl: 1.4;
  --lh-2xl: 1.3;
  --lh-3xl: 1.2;
  --lh-4xl: 1.15;
  --lh-5xl: 1.1;

  /* === 字重 === */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* === 间距 (4px基准) === */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* === 圆角 === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* === 阴影 === */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.09), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* === 动效 === */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* === 玻璃态 === */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(20px) saturate(160%);
  --glass-bg-heavy: rgba(255, 255, 255, 0.88);
  --glass-bg-light: rgba(255, 255, 255, 0.4);
}

/* ========== 隐藏 WordPress 前端登录状态栏 ========== */
#wpadminbar {
  display: none !important;
}

/* 修复 WordPress admin bar 造成的顶部偏移 */
html {
  margin-top: 0 !important;
}

/* 如果有其他主题自定义的顶部用户栏 */
body.logged-in header.index-header {
  top: 0;
}

/* ========== 全局 Reset 增强 ========== */
body {
  font-family: var(--font-sans);
  background: var(--neutral-50);
  color: var(--neutral-700);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-brand-500);
  transition: color var(--duration-base) var(--ease-default);
}

a:hover {
  color: var(--color-brand-400);
}

/* 选中文本 */
::selection {
  background: var(--color-brand-300);
  color: var(--neutral-900);
}

/* 焦点可见 */
:focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 2px;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track-piece {
  background-color: transparent;
}
::-webkit-scrollbar-thumb:vertical,
::-webkit-scrollbar-thumb:horizontal {
  background-color: var(--neutral-300);
  border-radius: 3px;
}

/* ========== 页头导航 ========== */
header.index-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 19999;
  background: var(--glass-bg-heavy);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

header.index-header.header-bg {
  box-shadow: var(--shadow-md);
}

/* 导航容器：左右结构 */
header.index-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-6);
  flex-wrap: nowrap;
}

/* ====== Logo ====== */
.nav-logo {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: 0.12em;
  color: var(--neutral-900);
  text-decoration: none;
  background: linear-gradient(var(--gradient-brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  user-select: none;
  transition: opacity var(--duration-fast) var(--ease-default),
    filter var(--duration-fast) var(--ease-default);
  position: relative;
}

.nav-logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(var(--gradient-brand));
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-base) var(--ease-default);
}

.nav-logo:hover {
  opacity: 0.85;
  filter: brightness(1.1);
}

.nav-logo:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ====== 导航菜单列表 ====== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 桌面端：隐藏手机抽屉顶栏 */
.drawer-header {
  display: none;
}

.nav-menu li {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
}

/* 菜单项链接 */
.nav-menu li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--space-5);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--neutral-700);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  position: relative;
  transition: color var(--duration-fast) var(--ease-default),
    background var(--duration-fast) var(--ease-default),
    transform var(--duration-fast) var(--ease-spring);
  transform: translateY(0);
}

/* Hover：微光背景 + 轻微上浮 + 颜色偏移 */
.nav-menu li > a:hover {
  color: var(--color-brand-500);
  background: rgba(124, 58, 237, 0.08);
}

/* Hover 放射光晕 */
.nav-menu li > a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124, 58, 237, 0.12) 0%,
    transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-default);
  pointer-events: none;
  z-index: -1;
}

.nav-menu li > a:hover::after {
  opacity: 1;
}

/* Hover 下划线动画 */
.nav-menu li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2.5px;
  background: linear-gradient(var(--gradient-brand));
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-base) var(--ease-spring);
}

.nav-menu li > a:hover::before {
  transform: scaleX(0.7);
}

/* 当前激活态 */
.nav-menu li.active > a {
  color: var(--color-brand-500);
  font-weight: var(--weight-semibold);
  background: rgba(124, 58, 237, 0.06);
}

.nav-menu li.active > a::before {
  transform: scaleX(1);
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.nav-menu li.active > a::after {
  opacity: 0;
}

/* 导航栏滚动缩进 (通过 header-bg 触发) */
header.index-header.header-bg {
  height: 56px;
}

header.index-header.header-bg nav {
  height: 56px;
}

header.index-header.header-bg .nav-logo {
  font-size: var(--text-2xl);
  letter-spacing: 0.1em;
}

header.index-header.header-bg .nav-menu li {
  height: 56px;
}

header.index-header.header-bg .nav-menu li > a {
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

/* ====== 移动端汉堡按钮 ====== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  z-index: 20000;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-default);
}

.nav-toggle:hover {
  background: rgba(124, 58, 237, 0.06);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--neutral-700);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-spring);
  transform-origin: center;
}

/* 汉堡 → X 动画 */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====== 移动端遮罩 ====== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 19998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-default);
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========== Hero 区域 ========== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(124, 58, 237, 0.35) 0%,
      rgba(59, 130, 246, 0.25) 50%,
      rgba(6, 182, 212, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  padding: 0 var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

/* ========== Hero 浮动光球 ========== */
.hero-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.35;
  animation: orbFloat 9s ease-in-out infinite alternate;
}

.orb-blue {
  width: 440px;
  height: 440px;
  background: var(--color-brand-500);
  top: -14%;
  left: -8%;
  animation-delay: 0s;
}

.orb-orange {
  width: 340px;
  height: 340px;
  background: #f97316;
  bottom: -10%;
  right: -6%;
  animation-delay: -4.5s;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, -36px) scale(1.12); }
}

/* ========== 搜索框 ========== */
.search-box.zhuige-search-form,
.zhuige-search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 680px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.search-box.zhuige-search-form:focus-within,
.zhuige-search-form:focus-within {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.search-box .search-input,
.zhuige-search-form input {
  flex: 1;
  height: 52px;
  padding: 0 var(--space-4) 0 var(--space-6);
  font-size: var(--text-base);
  color: var(--neutral-900);
  border: none;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  background: var(--neutral-0);
  outline: none;
  min-width: 0;
  font-family: var(--font-sans);
}

.search-box .search-input::placeholder,
.zhuige-search-form input::placeholder {
  color: var(--neutral-300);
  font-size: var(--text-sm);
}

.search-box .zhuige-btn-search,
.zhuige-search-form a {
  flex-shrink: 0;
  height: 52px;
  padding: 0 var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: #fff;
  background: linear-gradient(var(--gradient-brand));
  border: none;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-default);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.search-box .zhuige-btn-search:hover,
.zhuige-search-form a:hover {
  opacity: 0.9;
  color: #fff;
}

/* 搜索图标 */
.zhuige-search-form a span {
  display: block;
  height: 24px;
  width: 24px;
  background-image: url(../images/search_gy.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: 0 0;
}

/* ========== 面包屑 ========== */
.zhuige-breadcrumb {
  color: var(--neutral-500);
  font-size: var(--text-sm);
}
.zhuige-breadcrumb a {
  color: var(--neutral-500);
  font-size: var(--text-sm);
  text-decoration: none;
}
.zhuige-breadcrumb a:hover {
  color: var(--color-brand-500);
}
.zhuige-breadcrumb .current {
  color: var(--neutral-700);
  font-weight: var(--weight-medium);
}

/* ========== 白色卡片块 ========== */
.zhuige-box {
  background: var(--neutral-0);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  transition: box-shadow var(--duration-base) var(--ease-default);
  overflow: hidden; /* 建立 BFC，防止 margin 溢出 */
}

.zhuige-box:hover {
  box-shadow: var(--shadow-md);
}

/* 列表容器 */
.zhuige-arc-list,
.zhuige-list-container {
  background: var(--neutral-0);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  overflow: hidden;
}

/* ========== 文章列表项 ========== */
.zhuige-base-list {
  margin: 0 -var(--space-5);
  padding: 0 var(--space-5);
  transition: background var(--duration-fast) var(--ease-default);
}

.zhuige-base-list:hover {
  background: rgba(124, 58, 237, 0.03);
}

.zhuige-list {
  display: flex;
  align-items: flex-start;
  padding: var(--space-4) 0;
  gap: var(--space-4);
}

.zhuige-list .zhuige-list-img {
  flex: 0 0 180px;
  height: 140px;
  width: 180px;
  margin-right: var(--space-3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.zhuige-list-cover {
  display: block;
  height: 140px;
  width: 180px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.zhuige-list-cover img {
  height: 100%;
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-default);
}

.zhuige-list-cover:hover img {
  transform: scale(1.06);
}

.zhuige-list-text {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.zhuige-list-text h5.text-title a {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  color: var(--neutral-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--duration-fast) var(--ease-default);
}

.zhuige-list-text h5.text-title a:hover {
  color: var(--color-brand-500);
}

/* 置顶标记 */
.zhuige-list-text h5.set-top span {
  height: 22px;
  line-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: #fff;
  background: linear-gradient(var(--gradient-warm));
  margin-right: var(--space-2);
  white-space: nowrap;
  transform: scale(0.9);
}

/* 摘要 */
.sub-title {
  line-height: 1.6;
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--neutral-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sub-title a {
  font-size: var(--text-sm);
  color: var(--neutral-500);
}

/* 元数据 */
.data-info > text {
  position: relative;
  margin-right: var(--space-4);
  font-size: var(--text-xs);
  color: var(--neutral-500);
  white-space: nowrap;
  height: 1em;
  line-height: 1em;
}

.data-info > text::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: 3px;
  background: var(--neutral-300);
  height: 3px;
  top: 5px;
  right: -11px;
}

.data-info > text:last-child::after {
  display: none;
}

.data-info > text a {
  margin-left: 12px;
  color: var(--neutral-500);
}

/* 列表分隔线 */
.zhuige-base-list .zhuige-list {
  border-top: 1px solid var(--neutral-200);
}

.zhuige-arc-list > .zhuige-base-list:first-of-type .zhuige-list {
  border-top: none;
}

/* ========== 加载更多按钮 ========== */
.zhuige-list-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 var(--space-8);
  background: var(--neutral-0);
  color: var(--neutral-700);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  border: 1px solid var(--neutral-200);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-default);
  box-shadow: var(--shadow-xs);
}

.zhuige-list-more a:hover {
  background: linear-gradient(var(--gradient-brand));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--color-brand-glow);
}

/* ========== 空态提示 ========== */
.zhuige-none-tips {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}

.zhuige-none-tips img {
  height: 120px;
  width: auto;
  opacity: 0.5;
  margin-bottom: var(--space-6);
}

.zhuige-none-tips p {
  font-size: var(--text-lg);
  color: var(--neutral-500);
  font-weight: var(--weight-medium);
}

/* ========== 页脚 ========== */
footer {
  background: var(--neutral-900);
  color: var(--neutral-500);
  padding: var(--space-6) 0;
}

footer .container {
  padding: var(--space-5) var(--space-8);
}

.zhuige-site-links {
  padding-bottom: var(--space-4) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-4);
}

.zhuige-site-links span,
.zhuige-site-links a {
  color: var(--neutral-500);
  margin-right: var(--space-3);
  white-space: nowrap;
  font-size: var(--text-sm);
  text-decoration: none;
}

.zhuige-site-links a:hover {
  color: #fff;
}

.zhuige-copyright,
.zhuige-copyright text {
  color: var(--neutral-500);
  font-size: var(--text-xs);
}

.zhuige-copyright text a {
  color: var(--neutral-500);
}

.zhuige-copyright text a:hover {
  color: #fff;
}

/* ========== 文章详情页 ========== */
.zhuige-view-title {
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-6);
}

.zhuige-view-title h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--lh-3xl);
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

/* 文章内容排版 */
.zhuige-view-article {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--neutral-700);
  display: flow-root; /* 建立 BFC，清除浮动并包含子元素 margin */
}

.zhuige-view-article h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  margin: var(--space-8) 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--neutral-100);
}

.zhuige-view-article h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--neutral-900);
  margin: var(--space-6) 0 var(--space-3);
}

.zhuige-view-article h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--neutral-700);
  margin: var(--space-5) 0 var(--space-2);
}

.zhuige-view-article p {
  margin-bottom: var(--space-4);
  line-height: 1.8;
}

/* 图片全局 */
.zhuige-view-article img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: var(--space-5) auto;
  transition: transform var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
  cursor: zoom-in;
}

/* 图片懒加载占位 */
.zhuige-view-article img[loading="lazy"] {
  background: var(--neutral-100);
  min-height: 120px;
}

/* 图片加载完成 */
.zhuige-view-article img.loaded {
  background: none;
  animation: scaleIn 0.5s var(--ease-out) both;
}

/* WordPress 图片对齐 */
.zhuige-view-article .alignleft,
.zhuige-view-article img.alignleft {
  float: left;
  margin: var(--space-3) var(--space-5) var(--space-3) 0;
  max-width: 50%;
}

.zhuige-view-article .alignright,
.zhuige-view-article img.alignright {
  float: right;
  margin: var(--space-3) 0 var(--space-3) var(--space-5);
  max-width: 50%;
}

.zhuige-view-article .aligncenter,
.zhuige-view-article img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  float: none;
}

/* 全宽 / 宽幅图片 —— 突破容器约束 */
.zhuige-view-article .alignwide,
.zhuige-view-article img.alignwide,
.zhuige-view-article figure.alignwide {
  max-width: calc(100% + var(--space-10));
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  border-radius: var(--radius-md);
}

.zhuige-view-article .alignfull,
.zhuige-view-article img.alignfull,
.zhuige-view-article figure.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

/* Figure 容器（WP 块编辑器） */
.zhuige-view-article figure {
  margin: var(--space-6) 0;
  max-width: 100%;
}

.zhuige-view-article figure img {
  margin-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.zhuige-view-article figure.has-caption img,
.zhuige-view-article figure.wp-caption img {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* 图片说明 */
.zhuige-view-article figcaption,
.zhuige-view-article .wp-caption-text {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--neutral-500);
  text-align: center;
  line-height: 1.5;
  background: var(--neutral-50);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--neutral-200);
  border-top: none;
}

/* === WordPress 画廊网格 === */
.zhuige-view-article .wp-block-gallery,
.zhuige-view-article .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.zhuige-view-article .wp-block-gallery figure,
.zhuige-view-article .gallery figure,
.zhuige-view-article .gallery .gallery-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
}

.zhuige-view-article .wp-block-gallery img,
.zhuige-view-article .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 0;
  transition: transform var(--duration-slow) var(--ease-default);
}

.zhuige-view-article .wp-block-gallery figure:hover img,
.zhuige-view-article .gallery .gallery-item:hover img {
  transform: scale(1.05);
}

/* 画廊 1 列（窄屏自动） */
.zhuige-view-article .wp-block-gallery.columns-1,
.zhuige-view-article .gallery-columns-1 {
  grid-template-columns: 1fr;
}

/* 画廊 2 列 */
.zhuige-view-article .wp-block-gallery.columns-2,
.zhuige-view-article .gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 画廊 3 列 */
.zhuige-view-article .wp-block-gallery.columns-3,
.zhuige-view-article .gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 画廊 4 列 */
.zhuige-view-article .wp-block-gallery.columns-4,
.zhuige-view-article .gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 画廊 Figcaption 在网格中隐藏，灯箱展示 */
.zhuige-view-article .wp-block-gallery figcaption,
.zhuige-view-article .gallery .gallery-caption {
  display: none;
}

.zhuige-view-article a {
  color: var(--color-brand-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zhuige-view-article a:hover {
  color: var(--color-brand-400);
}

.zhuige-view-article blockquote {
  border-left: 4px solid var(--color-brand-400);
  padding: var(--space-3) var(--space-5);
  margin: var(--space-5) 0;
  background: rgba(124, 58, 237, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--neutral-700);
  font-style: italic;
}

.zhuige-view-article ul,
.zhuige-view-article ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.zhuige-view-article li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

.zhuige-view-article code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--neutral-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-brand-500);
}

.zhuige-view-article pre {
  background: var(--neutral-900);
  color: #e2e5ea;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-5) 0;
  line-height: 1.6;
}

.zhuige-view-article pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ========== 搜索页头部（小号） ========== */
.mini-search .zhuige-search-box {
  height: 320px;
}

.mini-search .zhuige-search-bg {
  height: 320px;
}

.mini-search .zhuige-main-search {
  padding: 80px 0 0;
}

.zhuige-main-search {
  width: 60%;
  padding: 140px 0 0;
  margin: 0 auto;
  position: relative;
  z-index: 9;
}

.zhuige-main-search h1 {
  padding: var(--space-3) 0 0;
  text-align: center;
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.zhuige-main-search h6 {
  text-align: center;
  padding: var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.zhuige-search-box {
  z-index: 9;
  top: 0;
  left: 0;
  width: 100%;
  height: 480px;
}

.zhuige-search-bg {
  height: 480px;
  width: 100%;
  overflow: hidden;
}

.zhuige-search-bg img,
.zhuige-search-bg video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* 背景上叠加渐变 */
.zhuige-search-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(124, 58, 237, 0.4) 0%,
      rgba(59, 130, 246, 0.3) 50%,
      rgba(6, 182, 212, 0.25) 100%);
  z-index: 1;
}

.zhuige-search-bg img,
.zhuige-search-bg video {
  position: relative;
}

/* ========== 图片库 (旧版兼容) ========== */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.gallery img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* ========== 增强 Lightbox ========== */
#lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: none;
  background: rgba(0, 0, 0, 0.92);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-default);
}
#lightbox[open] {
  opacity: 1;
}
#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 主图区域 */
.lightbox-main {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.lightbox-img {
  max-width: 92vw;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  touch-action: none;
  cursor: grab;
  transition: transform 0.15s ease, opacity 0.2s ease;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}
.lightbox-img:active {
  cursor: grabbing;
}

/* 左右导航按钮 */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all var(--duration-fast) var(--ease-default);
  line-height: 1;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}
.nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}
.prev-btn { left: var(--space-4); }
.next-btn { right: var(--space-4); }

/* 关闭按钮 */
.close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-default);
}
.close-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  transform: rotate(90deg);
}

/* 图片计数器 */
.image-index {
  position: absolute;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  z-index: 20;
  pointer-events: none;
}

/* === 底部缩略图条 === */
.thumb-strip {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-6);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.thumb-strip::-webkit-scrollbar {
  height: 3px;
}
.thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.thumb-strip .thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  opacity: 0.45;
}
.thumb-strip .thumb:hover {
  opacity: 0.8;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}
.thumb-strip .thumb.active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
}
.thumb-strip .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 空图提示 */
.lightbox-empty {
  color: rgba(255, 255, 255, 0.35);
  font-size: var(--text-lg);
  text-align: center;
  user-select: none;
}

/* ========== 入场动画 ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

.scale-in {
  animation: scaleIn var(--duration-base) var(--ease-out) both;
}

/* 卡片序列延迟 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ========== 页面过渡动画 ========== */
.main-body {
  min-height: 400px;
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

/* ========== 标签热词 ========== */
.zhuige-search-tag {
  padding: var(--space-5) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.zhuige-search-tag a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-default);
}

.zhuige-search-tag a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ========== 辅助工具类 ========== */
.pt-20 { padding-top: var(--space-5); }
.pt-30 { padding-top: var(--space-8); }
.pb-20 { padding-bottom: var(--space-5); }
.mb-20 { margin-bottom: var(--space-5); }
.mb-30 { margin-bottom: var(--space-8); }
.mt-10 { margin-top: var(--space-3); }
.mt-20 { margin-top: var(--space-5); }
.mr-20 { margin-right: var(--space-5); }
.p-20 { padding: var(--space-5); }
.pl-20 { padding-left: var(--space-5); }
.pr-20 { padding-right: var(--space-5); }

/* ========== 响应式设计 ========== */

/* 平板以下 */
@media (max-width: 860px) {
  :root {
    --space-20: 48px;
    --space-16: 40px;
    --space-12: 32px;
  }

  .hero-section {
    min-height: 420px;
  }

  .zhuige-main-search {
    width: 85%;
    padding: 100px 0 0;
  }

  .zhuige-main-search h1 {
    font-size: var(--text-2xl);
  }

  .zhuige-list {
    flex-direction: column;
  }

  .zhuige-list .zhuige-list-img {
    flex: unset;
    height: 200px;
    width: 100%;
    margin-right: 0;
    margin-bottom: var(--space-3);
  }

  .zhuige-list-cover {
    height: 200px;
    width: 100%;
  }

  .zhuige-view-title h1 {
    font-size: var(--text-2xl);
  }

  /* ====== 导航：平板端显示汉堡 ====== */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px var(--space-4) var(--space-6);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--neutral-200);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    transition: right var(--duration-base) var(--ease-spring);
    overflow-y: auto;
    z-index: 19999;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.open {
    right: 0;
  }

  /* 抽屉菜单项错落入场 */
  .nav-menu li {
    opacity: 0;
    transform: translateX(24px);
    transition: all var(--duration-base) var(--ease-spring);
  }

  .nav-menu.open li {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-menu.open li:nth-child(2) { transition-delay: 0.10s; }
  .nav-menu.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-menu.open li:nth-child(4) { transition-delay: 0.20s; }
  .nav-menu.open li:nth-child(5) { transition-delay: 0.25s; }
  .nav-menu.open li:nth-child(6) { transition-delay: 0.30s; }
  .nav-menu.open li:nth-child(7) { transition-delay: 0.35s; }
  .nav-menu.open li:nth-child(8) { transition-delay: 0.40s; }

  .nav-menu li > a {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
  }

  .nav-menu li > a::before {
    display: none;
  }

  /* 移动端 Ripple 效果伪元素 */
  .nav-menu li > a .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
  }

  @keyframes ripple {
    to { transform: scale(4); opacity: 0; }
  }

  .nav-menu li.active > a {
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-brand-500);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-sm);
  }

  /* 侧滑手势指示条（抽屉顶部） */
  .nav-menu::before {
    content: '';
    display: block;
    width: 32px;
    height: 4px;
    background: var(--neutral-300);
    border-radius: 2px;
    margin: 0 auto var(--space-4);
    opacity: 0;
  }

  /* ====== 灯箱导航按钮 ====== */
  .nav-btn {
    display: flex !important;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .prev-btn { left: var(--space-2); }
  .next-btn { right: var(--space-2); }

  /* 平板端图片浮动取消 */
  .zhuige-view-article .alignleft,
  .zhuige-view-article img.alignleft,
  .zhuige-view-article .alignright,
  .zhuige-view-article img.alignright {
    float: none;
    max-width: 100%;
    margin: var(--space-5) auto;
    display: block;
  }

  /* 宽幅退化为满宽 */
  .zhuige-view-article .alignwide,
  .zhuige-view-article img.alignwide,
  .zhuige-view-article figure.alignwide {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: var(--radius-sm);
  }

  /* 画廊降为 2 列 */
  .zhuige-view-article .wp-block-gallery,
  .zhuige-view-article .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .zhuige-view-article .wp-block-gallery.columns-3,
  .zhuige-view-article .wp-block-gallery.columns-4,
  .zhuige-view-article .gallery-columns-3,
  .zhuige-view-article .gallery-columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 缩略图条高度收缩 */
  .thumb-strip {
    height: 68px;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
  }
  .thumb-strip .thumb {
    width: 44px;
    height: 44px;
  }

  /* ====== 手机端抽屉顶栏 ====== */
  .nav-menu.open .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--neutral-200);
    margin-bottom: var(--space-2);
  }

  .drawer-logo {
    font-size: var(--text-xl);
    font-weight: var(--weight-extrabold);
    letter-spacing: 0.12em;
    background: linear-gradient(var(--gradient-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius-sm);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-700);
    transition: background var(--duration-fast) var(--ease-default),
      color var(--duration-fast) var(--ease-default);
  }

  .drawer-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
  }

  /* 重置移动端 li/a 高度 */
  .nav-menu li {
    height: auto;
    display: block;
  }

  .nav-menu li > a {
    height: auto;
    display: flex;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-sm);
    font-size: var(--text-base) !important;
  }

  /* 移动端激活态：左侧品牌色竖线 */
  .nav-menu li.active > a {
    background: rgba(124, 58, 237, 0.06);
    border-left: 3px solid var(--color-brand-500);
    padding-left: calc(var(--space-5) - 3px);
  }

  /* 菜单项间分割线 */
  .nav-menu li + li:not(.drawer-header) {
    border-top: 1px solid var(--neutral-100);
  }

  /* 抽屉滚动条 */
  .nav-menu::-webkit-scrollbar {
    width: 4px;
  }
  .nav-menu::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 2px;
  }
}

/* 手机 */
@media (max-width: 560px) {
  :root {
    --space-20: 32px;
    --space-12: 24px;
  }

  .hero-section {
    min-height: 360px;
  }

  .hero-content {
    padding: 0 var(--space-4);
  }

  .zhuige-main-search {
    width: 92%;
    padding: 60px 0 0;
  }

  .zhuige-main-search h1 {
    font-size: var(--text-xl);
  }

  .zhuige-main-search h6 {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }

  .search-box.zhuige-search-form,
  .zhuige-search-form {
    border-width: 1.5px;
  }

  .search-box .search-input,
  .zhuige-search-form input {
    height: 44px;
    font-size: var(--text-sm);
    padding: 0 var(--space-3) 0 var(--space-4);
  }

  .search-box .zhuige-btn-search,
  .zhuige-search-form a {
    height: 44px;
    padding: 0 var(--space-4);
    font-size: var(--text-xs);
  }

  .zhuige-view-title h1 {
    font-size: var(--text-xl);
  }

  .zhuige-list-text h5.text-title a {
    font-size: var(--text-base);
  }

  .zhuige-list-container .zhuige-list-text h5.text-title a,
  .zhuige-arc-list .zhuige-list-text h5.text-title a {
    font-size: var(--text-base);
  }

  .mini-search .zhuige-search-box {
    height: 240px;
  }

  .mini-search .zhuige-search-bg {
    height: 240px;
  }

  .mini-search .zhuige-main-search {
    padding: 50px 0 0;
  }

  /* ====== 导航小屏优化 ====== */
  .nav-logo {
    font-size: var(--text-xl);
    letter-spacing: 0.1em;
  }

  .nav-menu {
    width: 260px;
    padding: 72px var(--space-3) var(--space-5);
  }

  .nav-menu li > a {
    padding: var(--space-3) var(--space-3);
    font-size: var(--text-base);
  }

  /* 手机端：图片满宽，突破容器内边距 */
  .zhuige-view-article img {
    border-radius: 0;
    margin: var(--space-4) calc(-1 * var(--space-5));
    max-width: calc(100% + var(--space-10));
    width: calc(100% + var(--space-10));
  }

  /* figure 同步满宽 */
  .zhuige-view-article figure {
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
    max-width: calc(100% + var(--space-10));
  }

  .zhuige-view-article figure img {
    border-radius: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .zhuige-view-article figcaption,
  .zhuige-view-article .wp-caption-text {
    border-radius: 0;
    padding: var(--space-3) var(--space-5);
  }

  /* 画廊降至 1 列 */
  .zhuige-view-article .wp-block-gallery,
  .zhuige-view-article .gallery {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
  }
  .zhuige-view-article .wp-block-gallery.columns-2,
  .zhuige-view-article .wp-block-gallery.columns-3,
  .zhuige-view-article .wp-block-gallery.columns-4,
  .zhuige-view-article .gallery-columns-2,
  .zhuige-view-article .gallery-columns-3,
  .zhuige-view-article .gallery-columns-4 {
    grid-template-columns: 1fr;
  }

  .zhuige-view-article .wp-block-gallery figure,
  .zhuige-view-article .gallery .gallery-item {
    aspect-ratio: auto;
    border-radius: 0;
  }

  .zhuige-view-article .wp-block-gallery img,
  .zhuige-view-article .gallery img {
    border-radius: 0;
    aspect-ratio: auto;
    height: auto;
  }

  /* 灯箱小屏适配 */
  .lightbox-img {
    max-width: 96vw;
    max-height: calc(100vh - 100px);
  }

  .nav-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .prev-btn { left: 4px; }
  .next-btn { right: 4px; }

  .close-btn {
    top: var(--space-2);
    right: var(--space-2);
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .image-index {
    top: var(--space-2);
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }

  .thumb-strip {
    height: 56px;
    padding: var(--space-1) var(--space-2);
  }
  .thumb-strip .thumb {
    width: 36px;
    height: 36px;
  }
}

/* 小屏手机 */
@media (max-width: 380px) {
  .hero-content {
    padding: 0 var(--space-3);
  }

  header.index-header nav {
    padding: 0 var(--space-3);
  }

  .nav-logo {
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
  }

  .nav-menu {
    width: 100%;
    padding: 68px var(--space-3) var(--space-4);
  }

  .nav-menu li > a {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-2);
  }

  .zhuige-main-search {
    width: 96%;
  }

  .zhuige-list .zhuige-list-img {
    height: 160px;
  }

  .zhuige-list-cover {
    height: 160px;
  }

  /* 灯箱极限小屏 */
  .nav-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .close-btn {
    width: 32px;
    height: 32px;
  }
  .thumb-strip {
    height: 48px;
  }
  .thumb-strip .thumb {
    width: 32px;
    height: 32px;
  }
  .lightbox-img {
    max-height: calc(100vh - 90px);
  }
}
