/* ==========================================================================
   卓大人网址导航 - 古风水墨美学样式表
   ========================================================================== */

/* ===== Variables: 日间·设色山水 ===== */
:root {
  --bg-primary: #f5f0e8;
  --bg-secondary: #ede4d3;
  --text-primary: #2c2c2c;
  --text-secondary: #5a4a3a;
  --text-muted: #8b7b6b;
  --accent: #c04040;
  --accent-hover: #a03030;
  --accent-light: rgba(192, 64, 64, 0.12);
  --gold: #b8860b;
  --gold-light: rgba(184, 134, 11, 0.15);
  --border: #d4c5b2;
  --border-light: #e8dcc8;
  --input-bg: rgba(255, 252, 245, 0.85);
  --input-focus: rgba(192, 64, 64, 0.2);
  --shadow: rgba(44, 44, 44, 0.08);
  --shadow-lg: rgba(44, 44, 44, 0.15);
  --cloud-color: rgba(180, 160, 140, 0.25);
  --mist-color-1: rgba(200, 190, 170, 0.25);
  --mist-color-2: rgba(220, 210, 190, 0.2);
  --seal-color: #c04040;
  --tab-bg: rgba(245, 240, 232, 0.7);
  --tab-bg-hover: rgba(192, 64, 64, 0.08);
  --tab-bg-active: rgba(192, 64, 64, 0.15);
  --tab-border-active: #c04040;
  --btn-search-bg: #c04040;
  --btn-search-text: #f5f0e8;
  --btn-search-hover: #a03030;
  --mountain-far: rgba(120, 100, 80, 0.08);
  --mountain-mid: rgba(100, 85, 65, 0.12);
  --mountain-near: rgba(80, 70, 55, 0.18);
  --lantern-body: #c04040;
  --lantern-glow: rgba(255, 180, 60, 0);
  --scroll-wood: linear-gradient(180deg, #a07830, #c9a13e 30%, #dabb55 50%, #c9a13e 70%, #a07830);
  --parchment-line: rgba(192, 64, 64, 0.06);
}

/* ===== Variables: 夜间·墨荷夜色 ===== */
[data-theme="dark"] {
  --bg-primary: #0f0d14;
  --bg-secondary: #1a1520;
  --text-primary: #d4cfc4;
  --text-secondary: #b0a898;
  --text-muted: #7a7068;
  --accent: #d4a843;
  --accent-hover: #c09830;
  --accent-light: rgba(212, 168, 67, 0.12);
  --gold: #d4a843;
  --gold-light: rgba(212, 168, 67, 0.15);
  --border: #3a3040;
  --border-light: #2a2430;
  --input-bg: rgba(20, 16, 26, 0.88);
  --input-focus: rgba(212, 168, 67, 0.2);
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.5);
  --cloud-color: rgba(40, 32, 55, 0.35);
  --mist-color-1: rgba(50, 40, 60, 0.3);
  --mist-color-2: rgba(40, 35, 50, 0.25);
  --seal-color: #d4a843;
  --tab-bg: rgba(26, 21, 32, 0.7);
  --tab-bg-hover: rgba(212, 168, 67, 0.08);
  --tab-bg-active: rgba(212, 168, 67, 0.15);
  --tab-border-active: #d4a843;
  --btn-search-bg: #d4a843;
  --btn-search-text: #1a1520;
  --btn-search-hover: #c09830;
  --mountain-far: rgba(20, 16, 30, 0.25);
  --mountain-mid: rgba(25, 20, 35, 0.35);
  --mountain-near: rgba(15, 12, 22, 0.5);
  --lantern-body: #ff5e00;
  --lantern-glow: rgba(255, 140, 30, 0.5);
  --scroll-wood: linear-gradient(180deg, #3a2a18, #5a4428 30%, #6b5530 50%, #5a4428 70%, #3a2a18);
  --parchment-line: rgba(212, 168, 67, 0.05);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: "Ma Shan Zheng", "Noto Serif SC", "SimSun", "STSong", serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* ===== Background Layers ===== */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* 水墨山水 SVG 背景 */
.bg-mountains { z-index: 0; }
.mountain-svg {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
}
.mountain { transition: fill 0.6s ease; }
.mountain-far  { fill: var(--mountain-far); }
.mountain-mid  { fill: var(--mountain-mid); }
.mountain-near { fill: var(--mountain-near); }

/* 云雾飘动 */
.bg-mist {
  background:
    radial-gradient(ellipse 80% 25% at 15% 70%, var(--mist-color-1) 0%, transparent 60%),
    radial-gradient(ellipse 90% 20% at 75% 65%, var(--mist-color-2) 0%, transparent 55%);
  animation: mistDrift 18s ease-in-out infinite;
}

/* 宣纸纤维纹理 + 洒金碎屑 */
.bg-texture {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(139,119,90,0.025) 3px, rgba(139,119,90,0.025) 4px),
    repeating-linear-gradient(90deg, transparent 0, transparent 5px, rgba(139,119,90,0.015) 5px, rgba(139,119,90,0.015) 6px),
    radial-gradient(1px 1px at 20% 30%, rgba(212,168,67,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 55%, rgba(212,168,67,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 20%, rgba(212,168,67,0.25) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(212,168,67,0.15) 0%, transparent 100%),
    radial-gradient(0.8px 0.8px at 10% 60%, rgba(212,168,67,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 75%, rgba(212,168,67,0.18) 0%, transparent 100%);
  opacity: 0.6;
}

/* ===== Clouds ===== */
.cloud { position: fixed; pointer-events: none; z-index: 1; opacity: 0.3; }
.cloud::before { content: ''; display: block; width: inherit; height: inherit; border-radius: 50%; background: var(--cloud-color); filter: blur(40px); }
.cloud-1 { top: 8%;  width: 350px; height: 80px;  animation: cloudL 30s linear infinite; }
.cloud-2 { top: 22%; width: 280px; height: 60px;  animation: cloudR 35s linear -10s infinite; }
.cloud-3 { top: 38%; width: 320px; height: 70px;  animation: cloudL 25s linear -18s infinite; }

@keyframes mistDrift {
  0%, 100% { opacity: 0.5; transform: translateX(0) scaleY(1); }
  50% { opacity: 0.65; transform: translateX(2%) scaleY(1.03); }
}
@keyframes cloudL { from { transform: translateX(-120%); } to { transform: translateX(calc(100vw + 120%)); } }
@keyframes cloudR { from { transform: translateX(calc(100vw + 120%)); } to { transform: translateX(-120%); } }

/* ===== Particle Canvas ===== */
.particle-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

/* ===== 宫灯 ===== */
.lantern-container {
  position: fixed; left: 4%; top: 0; z-index: 3; pointer-events: none;
  transform-origin: top center; animation: swing 5s ease-in-out infinite alternate;
}
.lantern-wire {
  width: 2px; height: 55px; margin: 0 auto;
  background: linear-gradient(180deg, var(--text-muted), var(--gold));
}
.lantern { display: flex; flex-direction: column; align-items: center; }
.lantern-top-cap, .lantern-bottom-cap {
  width: 40px; height: 10px; border-radius: 3px;
  background: var(--gold);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), inset 0 -2px 4px rgba(0,0,0,0.2);
}
.lantern-body {
  width: 72px; height: 95px;
  background: var(--lantern-body);
  border-radius: 36px / 18px;
  margin: -3px 0; overflow: hidden; position: relative;
  box-shadow:
    inset -12px -12px 24px rgba(0,0,0,0.25),
    inset 8px 8px 16px rgba(255,255,255,0.15),
    0 0 30px var(--lantern-glow);
  transition: box-shadow 0.6s ease, background 0.6s ease;
}
[data-theme="dark"] .lantern-body {
  box-shadow:
    inset -12px -12px 24px rgba(0,0,0,0.3),
    inset 8px 8px 16px rgba(255,200,100,0.3),
    0 0 60px rgba(255,140,30,0.5),
    0 0 120px rgba(255,100,0,0.2);
}
.lantern-ribs {
  position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 30%, rgba(0,0,0,0.15) 32%, transparent 34%),
    linear-gradient(90deg, transparent 48%, rgba(0,0,0,0.12) 50%, transparent 52%),
    linear-gradient(90deg, transparent 66%, rgba(0,0,0,0.15) 68%, transparent 70%);
}
.lantern-glow {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px;
  background: radial-gradient(circle, rgba(255,220,100,0.9) 0%, rgba(255,180,50,0.3) 50%, transparent 70%);
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity 0.6s ease;
}
[data-theme="dark"] .lantern-glow {
  opacity: 1; animation: flicker 3s ease-in-out infinite alternate;
}
.lantern-char {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: "Zhi Mang Xing", "Ma Shan Zheng", "STKaiti", serif;
  font-size: 1.8rem; color: var(--gold); opacity: 0.7;
  text-shadow: 0 0 8px rgba(184,134,11,0.3);
}
[data-theme="dark"] .lantern-char { color: #fff3d0; text-shadow: 0 0 12px rgba(255,220,100,0.6); }
.lantern-tassel {
  display: flex; flex-direction: column; align-items: center; margin-top: -1px;
}
.tassel-knot {
  width: 12px; height: 12px; background: var(--gold); border-radius: 50%;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}
.tassel-threads {
  width: 16px; height: 45px; margin-top: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 2.5px);
  border-radius: 0 0 4px 4px;
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}

@keyframes swing { 0% { rotate: -4deg; } 100% { rotate: 4deg; } }
@keyframes flicker {
  0%   { opacity: 0.6; transform: translate(-50%,-50%) scale(0.9); }
  50%  { opacity: 1;   transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity: 0.7; transform: translate(-50%,-50%) scale(0.95); }
}

/* ===== 动态诗词（右侧竖排） ===== */
.poetry-container {
  position: fixed; right: 5%; top: 20%;
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  font-size: 1.5rem; line-height: 2.2; letter-spacing: 0.3em;
  opacity: 0.7; pointer-events: auto; z-index: 3;
  color: var(--text-primary);
  cursor: pointer; user-select: none;
  transition: opacity 0.5s ease, transform 0.3s ease;
}
.poetry-container:hover {
  opacity: 0.95;
  transform: scale(1.03);
}
.poetry-line {
  margin-left: 16px;
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  text-shadow: 1px 1px 2px var(--shadow);
}
.poetry-line.fade-out { opacity: 0; transform: translateY(-14px); filter: blur(6px); }

/* 作者区域：分割线 + 印章 */
.poetry-author-wrap {
  writing-mode: horizontal-tb;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 32px;
}
.poetry-divider {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--accent); opacity: 0.35;
  border-radius: 1px;
}

/* 印章式作者名 */
.poetry-seal {
  writing-mode: vertical-rl; text-orientation: upright;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; min-height: 60px; padding: 10px 6px;
  border: 2.5px solid var(--seal-color);
  color: var(--seal-color);
  font-family: "Zhi Mang Xing", "STKaiti", serif;
  font-size: 1.3rem; line-height: 2; letter-spacing: 0.15em;
  border-radius: 6px;
  background: var(--accent-light);
  box-shadow:
    inset 0 0 0 5px rgba(192,64,64,0.03),
    2px 2px 8px var(--shadow),
    0 0 0 1px var(--border-light);
  opacity: 0.88;
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.4s ease;
}
.poetry-container:hover .poetry-seal {
  box-shadow:
    inset 0 0 0 5px rgba(192,64,64,0.05),
    3px 3px 12px var(--shadow-lg),
    0 0 0 1.5px var(--accent);
  transform: rotate(-3deg);
}
.poetry-seal.fade-out { opacity: 0; transform: rotate(-8deg) scale(0.75); filter: blur(3px); }

/* 朝代标签 */
.poetry-dynasty {
  writing-mode: horizontal-tb;
  font-family: "ZCOOL XiaoWei", "STKaiti", serif;
  font-size: 0.7rem; color: var(--text-muted);
  letter-spacing: 0.2em; opacity: 0.6;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.poetry-container:hover .poetry-dynasty { opacity: 0.85; }
.poetry-dynasty.fade-out { opacity: 0; transform: translateY(-6px); filter: blur(2px); }

/* 诗词出处 */
.poetry-source {
  writing-mode: horizontal-tb;
  display: block;
  font-family: "ZCOOL XiaoWei", "STKaiti", serif;
  font-size: 0.72rem; color: var(--text-muted);
  letter-spacing: 0.15em; opacity: 0.5;
  margin-top: 14px; text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.poetry-container:hover .poetry-source { opacity: 0.75; }
.poetry-source.fade-out { opacity: 0; transform: translateY(-4px); filter: blur(2px); }

/* 换一首提示 */
.poetry-hint {
  writing-mode: horizontal-tb;
  display: flex; align-items: center; gap: 4px;
  margin-top: 18px;
  font-size: 0.78rem; color: var(--text-muted); opacity: 0;
  transition: opacity 0.35s ease;
}
.poetry-hint .hint-text {
  font-family: "Ma Shan Zheng", "STKaiti", serif;
  letter-spacing: 0.15em;
}
.poetry-container:hover .poetry-hint { opacity: 0.7; }

/* ===== 太极·主题切换 ===== */
.theme-toggle {
  position: fixed; top: 24px; right: 24px; z-index: 100;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 16px var(--shadow);
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden; padding: 0;
}
.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 24px var(--gold-light);
  border-color: var(--gold);
}
.theme-toggle:active { transform: scale(0.95); }

.taiji {
  width: 30px; height: 30px; border-radius: 50%;
  position: relative; overflow: hidden;
  border: 1.5px solid var(--text-primary);
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.theme-toggle:hover .taiji { transform: rotate(180deg); }
.taiji-white, .taiji-black {
  position: absolute; width: 100%; height: 50%;
}
.taiji-white {
  top: 0; background: var(--bg-primary);
  border-radius: 15px 15px 0 0;
}
.taiji-white::after {
  content: ''; position: absolute; bottom: -7.5px; left: 0;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-primary);
}
.taiji-black {
  bottom: 0; background: var(--text-primary);
  border-radius: 0 0 15px 15px;
}
.taiji-black::after {
  content: ''; position: absolute; top: -7.5px; right: 0;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--text-primary);
}
.taiji-dot {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  top: 50%; transform: translateY(-50%);
}
.dark-dot  { background: var(--text-primary); left: 5px; }
.light-dot { background: var(--bg-primary);  right: 5px; }

/* ===== Hero Section ===== */
.hero-section {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 20px;
}
.hero-container {
  width: 100%; max-width: 900px;
  display: flex; flex-direction: column; align-items: center;
}

/* ===== Title ===== */
.hero-title-wrap {
  text-align: center; margin-bottom: 48px;
  position: relative;
  animation: fadeIn 1s ease 0.2s forwards; opacity: 0;
}
@keyframes fadeIn { to { opacity: 1; } }
.hero-title {
  font-family: "ZCOOL XiaoWei", "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  font-size: 4.2rem; font-weight: 700;
  letter-spacing: 0.2em; line-height: 1.3;
  display: inline-flex; align-items: baseline;
  color: var(--text-primary);
  text-shadow: 2px 2px 0 var(--shadow), 4px 4px 8px var(--shadow-lg);
  transition: color 0.6s ease;
}
.hero-title::after {
  content: ''; position: absolute;
  bottom: -8px; left: 10%; width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

/* 逐字动画 */
.char {
  display: inline-block; opacity: 0;
  filter: blur(12px);
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}
.char.in {
  opacity: 1; filter: blur(0);
  transform: translateY(0) scale(1);
}

.hero-subtitle {
  font-family: "ZCOOL XiaoWei", "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  font-size: 1.15rem; color: var(--text-muted);
  margin-top: 16px; letter-spacing: 0.4em;
  animation: fadeIn 1s ease 1.6s forwards; opacity: 0;
}

/* ===== Scroll Wrapper (画卷) ===== */
.scroll-wrapper {
  display: flex; align-items: stretch;
  width: 100%; max-width: 820px; margin: 0 auto;
  transform-origin: center;
  animation: scrollIn 1.2s cubic-bezier(0.25,0.8,0.25,1) 0.6s backwards;
}
@keyframes scrollIn {
  0%   { opacity: 0; transform: scaleX(0.3) scaleY(0.95); filter: blur(8px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { transform: scaleX(1) scaleY(1); filter: blur(0); }
}

/* 画轴端盖 */
.scroll-cap {
  width: 30px; border-radius: 15px; z-index: 3; position: relative;
  background: var(--scroll-wood);
  box-shadow:
    inset 0 0 10px rgba(0,0,0,0.3),
    inset 0 4px 8px rgba(255,255,255,0.15),
    0 4px 20px var(--shadow-lg);
  transition: background 0.6s ease;
}
.scroll-cap::before {
  content: ''; position: absolute; inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.1);
}
.scroll-cap-left  { margin-right: -5px; }
.scroll-cap-right { margin-left: -5px; }
.scroll-cap-detail {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #dabb55, #8b6914);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4), 0 0 8px rgba(184,134,11,0.2);
}
[data-theme="dark"] .scroll-cap-detail {
  background: radial-gradient(circle at 35% 35%, #d4a843, #4a3818);
}

/* 画卷纸面 */
.scroll-container {
  flex: 1; z-index: 2;
  padding: 28px 32px; position: relative;
  background: linear-gradient(180deg, var(--input-bg), rgba(255,252,245,0.6) 50%, var(--input-bg));
  box-shadow: inset 0 0 30px rgba(139,119,90,0.12), 0 8px 32px var(--shadow-lg);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}
[data-theme="dark"] .scroll-container {
  background: linear-gradient(180deg, var(--input-bg), rgba(20,16,26,0.6) 50%, var(--input-bg));
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.5);
}
.scroll-paper {
  position: relative; padding: 4px 0;
  /* 朱砂格线（乌丝栏） */
  background:
    repeating-linear-gradient(0deg,
      transparent 0, transparent 31px,
      var(--parchment-line) 31px, var(--parchment-line) 32px
    );
}
.scroll-paper::before, .scroll-paper::after {
  content: ''; position: absolute; left: 0; right: 0;
  height: 1px; background: var(--accent); opacity: 0.2;
}
.scroll-paper::before { top: 0; }
.scroll-paper::after  { bottom: 0; }

/* ===== Search Tabs ===== */
.search-box { width: 100%; max-width: 720px; margin: 0 auto; }
.search-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  overflow-x: auto; padding: 4px 2px 8px;
  justify-content: center; scrollbar-width: none;
}
.search-tabs::-webkit-scrollbar { display: none; }
.search-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; min-height: 42px;
  border: 1.5px solid var(--border-light); border-radius: 999px;
  background: var(--tab-bg); color: var(--text-secondary);
  cursor: pointer;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 0.88rem; white-space: nowrap;
  flex-shrink: 0; user-select: none;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.search-tab i {
  font-size: 0.9rem; opacity: 0.7;
  transition: opacity 0.3s ease;
}
.search-tab:hover i { opacity: 1; }
.tab-name {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 0.9rem;
}
.tab-sub {
  font-family: "Noto Serif SC", serif;
  font-size: 0.6rem; opacity: 0.5;
  margin-left: -2px;
}
.search-tab:hover {
  background: var(--tab-bg-hover); border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}
.search-tab:active { transform: translateY(0) scale(0.97); }
.search-tab.active {
  background: var(--tab-bg-active);
  border-color: var(--tab-border-active);
  color: var(--accent); font-weight: 700;
  box-shadow: 0 4px 12px var(--accent-light), inset 0 0 0 1px var(--accent);
}

/* ===== Search Input ===== */
.search-input-group {
  display: flex; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px var(--shadow-lg), inset 0 0 0 1px var(--border-light);
  background: var(--input-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.search-input-group:focus-within {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--shadow-lg), 0 0 0 4px var(--input-focus), inset 0 0 0 1px var(--accent-light);
}
.search-input {
  flex: 1; padding: 16px 20px; border: none; outline: none;
  background: transparent; min-width: 0;
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 1.05rem; color: var(--text-primary); letter-spacing: 0.05em;
}
.search-input::placeholder {
  color: var(--text-muted); font-style: italic;
  transition: opacity 0.3s ease;
}
.search-input:focus::placeholder { opacity: 0.5; }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 28px; border: none;
  background: var(--btn-search-bg); color: var(--btn-search-text);
  cursor: pointer;
  font-family: "Zhi Mang Xing", "Ma Shan Zheng", "STKaiti", serif;
  font-size: 1.1rem; letter-spacing: 0.15em;
  white-space: nowrap; position: relative; overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.search-btn::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%,-50%);
  transition: width 0.6s ease, height 0.6s ease;
}
.search-btn:hover {
  background: var(--btn-search-hover);
  letter-spacing: 0.22em;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-light);
}
.search-btn:active { transform: translateY(0) scale(0.98); }
.search-btn:active::before { width: 300px; height: 300px; }

/* ===== Quick Nav ===== */
.quick-nav {
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: center; margin-top: 48px;
  padding: 0 16px; max-width: 800px;
}
.quick-link {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 68px;
}
/* 中式花窗/格栅图标框 */
.quick-icon {
  width: 50px; height: 50px;
  border-radius: 12px; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  font-size: 1.3rem; color: var(--accent);
  box-shadow: inset 0 0 8px var(--shadow), 0 2px 8px var(--shadow);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
/* 花窗格栅装饰 */
.quick-icon::before {
  content: ''; position: absolute; inset: 3px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  opacity: 0.5;
  transition: all 0.4s ease;
}
.quick-icon::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  border-radius: inherit;
}
.quick-link:hover { color: var(--accent); transform: translateY(-5px); }
.quick-link:hover .quick-icon {
  background: var(--accent); color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-light);
  transform: rotate(5deg) scale(1.08);
}
.quick-link:hover .quick-icon::before {
  border-color: rgba(255,255,255,0.3); opacity: 0.8;
}
.quick-link:active .quick-icon { transform: rotate(5deg) scale(0.95); }
.quick-label {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 0.82rem; letter-spacing: 0.12em;
}

/* ===== Entry Animations ===== */
.animate-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.25s; }
.animate-delay-3 { transition-delay: 0.4s; }
.animate-delay-4 { transition-delay: 0.55s; }

/* ===== Ripple ===== */
.ripple {
  position: absolute; border-radius: 50%;
  background: var(--accent-light);
  transform: scale(0);
  animation: rippleOut 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut { to { transform: scale(4); opacity: 0; } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .poetry-container { display: none; }
}

@media (max-width: 768px) {
  .lantern-container { left: 2%; scale: 0.65; transform-origin: top left; }
  .theme-toggle { top: 16px; right: 16px; width: 42px; height: 42px; }
  .taiji { width: 24px; height: 24px; }
  .hero-section { padding: 30px 16px; }
  .hero-title-wrap { margin-bottom: 32px; }
  .hero-title { font-size: 2.5rem; letter-spacing: 0.12em; }
  .hero-subtitle { font-size: 0.95rem; letter-spacing: 0.3em; }

  .scroll-wrapper { max-width: 100%; }
  .scroll-cap { width: 20px; border-radius: 10px; }
  .scroll-container { padding: 20px 18px; }

  .search-box { max-width: 100%; }
  .search-tabs { justify-content: flex-start; gap: 5px; }
  .search-tab { padding: 6px 10px; font-size: 0.78rem; min-height: 36px; }
  .tab-sub { display: none; }
  .search-input { padding: 14px 16px; font-size: 0.95rem; }
  .search-btn { padding: 14px 18px; font-size: 0.95rem; gap: 4px; }

  .quick-nav { gap: 14px; margin-top: 36px; }
  .quick-link { width: 58px; }
  .quick-icon { width: 42px; height: 42px; font-size: 1.1rem; border-radius: 10px; }
  .quick-label { font-size: 0.75rem; }

  .cloud-1 { width: 180px; height: 40px; }
  .cloud-2 { width: 140px; height: 30px; }
  .cloud-3 { width: 160px; height: 35px; }
}

@media (max-width: 480px) {
  .hero-section { padding: 20px 12px; }
  .hero-title-wrap { margin-bottom: 24px; }
  .hero-title { font-size: 1.85rem; }
  .hero-subtitle { font-size: 0.8rem; letter-spacing: 0.2em; }
  .scroll-cap { width: 12px; border-radius: 6px; }
  .scroll-container { padding: 14px 12px; }
  .search-tab { padding: 5px 8px; font-size: 0.7rem; gap: 2px; min-height: 32px; }
  .search-tab i { font-size: 0.72rem; }
  .search-input { padding: 10px 12px; font-size: 0.82rem; }
  .search-btn { padding: 10px 14px; font-size: 0.82rem; }
  .quick-nav { gap: 8px; margin-top: 28px; }
  .quick-link { width: 46px; }
  .quick-icon { width: 34px; height: 34px; font-size: 0.95rem; border-radius: 8px; }
  .quick-icon::before { border-radius: 6px; }
  .quick-label { font-size: 0.65rem; }
  .cloud-1 { width: 120px; height: 28px; }
  .cloud-2 { width: 100px; height: 22px; }
  .cloud-3 { width: 110px; height: 24px; }
}
