:root {
  color-scheme: light;
  --bg-primary: #f3ead8;
  --bg-secondary: #e7d7b9;
  --text-primary: #2b2118;
  --text-secondary: #5c422b;
  --text-muted: #91785a;
  --accent: #9f2f27;
  --accent-hover: #7f211d;
  --accent-light: rgba(159, 47, 39, 0.14);
  --gold: #b17b16;
  --gold-light: rgba(177, 123, 22, 0.18);
  --paper-edge: rgba(114, 78, 42, 0.18);
  --border: #c8a977;
  --border-light: #ead9b7;
  --input-bg: rgba(255, 248, 228, 0.9);
  --input-focus: rgba(159, 47, 39, 0.22);
  --shadow: rgba(54, 34, 18, 0.1);
  --shadow-lg: rgba(54, 34, 18, 0.22);
  --cloud-color: rgba(152, 128, 92, 0.28);
  --seal-color: #9f2f27;
  --tab-bg: rgba(251, 241, 215, 0.78);
  --tab-bg-hover: rgba(159, 47, 39, 0.1);
  --tab-bg-active: rgba(159, 47, 39, 0.18);
  --btn-search-bg: #9f2f27;
  --btn-search-text: #fff4d8;
  --btn-search-hover: #7f211d;
  --lantern-body: #a73028;
  --lantern-glow: rgba(255, 175, 55, 0.05);
  --scroll-wood: linear-gradient(180deg, #70431e, #a66f2b 22%, #d2a24a 50%, #9a6327 78%, #5c3518);
  --parchment-line: rgba(159, 47, 39, 0.08);
  --overlay: linear-gradient(180deg, rgba(245, 236, 216, 0.28), rgba(239, 222, 190, 0.42));
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-ui: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-display: "STKaiti", "KaiTi", "Kaiti SC", "Noto Serif SC", "SimSun", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #100c0b;
  --bg-secondary: #1c1512;
  --text-primary: #e3d4b5;
  --text-secondary: #c3ad85;
  --text-muted: #85745d;
  --accent: #d6a54a;
  --accent-hover: #c08c2f;
  --accent-light: rgba(214, 165, 74, 0.14);
  --gold: #d6a54a;
  --gold-light: rgba(214, 165, 74, 0.18);
  --paper-edge: rgba(214, 165, 74, 0.16);
  --border: #4f3a25;
  --border-light: #2d2118;
  --input-bg: rgba(27, 20, 16, 0.9);
  --input-focus: rgba(214, 165, 74, 0.22);
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-lg: rgba(0, 0, 0, 0.58);
  --cloud-color: rgba(54, 42, 30, 0.38);
  --seal-color: #d6a54a;
  --tab-bg: rgba(30, 22, 18, 0.76);
  --tab-bg-hover: rgba(214, 165, 74, 0.1);
  --tab-bg-active: rgba(214, 165, 74, 0.18);
  --btn-search-bg: #d6a54a;
  --btn-search-text: #1c1512;
  --btn-search-hover: #c08c2f;
  --lantern-body: #e05c23;
  --lantern-glow: rgba(255, 144, 32, 0.55);
  --scroll-wood: linear-gradient(180deg, #24150c, #4f3219 24%, #7c5927 50%, #4f3219 76%, #1a0f09);
  --parchment-line: rgba(214, 165, 74, 0.07);
  --overlay: linear-gradient(180deg, rgba(9, 7, 6, 0.2), rgba(9, 7, 6, 0.48));
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family: var(--font-display);
  background: radial-gradient(circle at 18% 12%, rgba(177, 123, 22, 0.08), transparent 28%), radial-gradient(circle at 82% 18%, rgba(159, 47, 39, 0.07), transparent 26%), linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  transition: background-color 0.6s ease, color 0.6s ease;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.bg-layer,
.particle-canvas,
.cloud {
  position: fixed;
  pointer-events: none;
}

.bg-layer,
.particle-canvas {
  inset: 0;
}

.bg-layer {
  z-index: 0;
}

.bg-overlay {
  z-index: 0;
  background: var(--overlay);
  transition: background 0.6s ease;
}

.particle-canvas,
.cloud {
  z-index: 1;
}

.cloud {
  opacity: 0.3;
}

.cloud::before {
  display: block;
  width: inherit;
  height: inherit;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--cloud-color), transparent 70%);
  content: "";
}

.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;
}

.lantern-container {
  position: fixed;
  top: 0;
  left: 4%;
  z-index: 3;
  pointer-events: none;
  transform-origin: top center;
  animation: swing 5s ease-in-out infinite alternate;
}

.lantern,
.lantern-tassel,
.poetry-author-wrap,
.hero-section,
.hero-container,
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lantern-wire {
  width: 2px;
  height: 55px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--text-muted), var(--gold));
}

.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 {
  position: relative;
  width: 72px;
  height: 95px;
  margin: -3px 0;
  overflow: hidden;
  border-radius: 36px / 18px;
  background: var(--lantern-body);
  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,
.lantern-glow,
.lantern-char {
  position: absolute;
}

.lantern-ribs {
  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 {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 100, 0.9) 0%, rgba(255, 180, 50, 0.3) 50%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.6s ease;
}

[data-theme="dark"] .lantern-glow {
  opacity: 1;
  animation: flicker 3s ease-in-out infinite alternate;
}

.lantern-char {
  top: 50%;
  left: 50%;
  color: var(--gold);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.8rem;
  opacity: 0.7;
  text-shadow: 0 0 8px rgba(184, 134, 11, 0.3);
  transform: translate(-50%, -50%);
}

[data-theme="dark"] .lantern-char {
  color: #fff3d0;
  text-shadow: 0 0 12px rgba(255, 220, 100, 0.6);
}

.tassel-knot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.tassel-threads {
  width: 16px;
  height: 45px;
  margin-top: 2px;
  border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 2.5px);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}

.poetry-container {
  position: fixed;
  top: 20%;
  right: 5%;
  z-index: 3;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.5rem;
  line-height: 2.2;
  letter-spacing: 0.3em;
  text-orientation: upright;
  writing-mode: vertical-rl;
  cursor: pointer;
  opacity: 0.7;
  pointer-events: auto;
  user-select: none;
  background: transparent;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.poetry-container:hover {
  opacity: 0.95;
  transform: scale(1.03);
}

.poetry-line {
  margin-left: 16px;
  text-shadow: 1px 1px 2px var(--shadow);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.poetry-line.fade-out {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(-14px);
}

.poetry-author-wrap {
  gap: 10px;
  margin-top: 32px;
  writing-mode: horizontal-tb;
}

.poetry-divider {
  display: block;
  width: 24px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.35;
}

.poetry-seal {
  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);
  border-radius: 6px;
  color: var(--seal-color);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.3rem;
  line-height: 2;
  letter-spacing: 0.15em;
  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;
  text-orientation: upright;
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.4s ease;
  writing-mode: vertical-rl;
}

.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;
  filter: blur(3px);
  transform: rotate(-8deg) scale(0.75);
}

.poetry-dynasty,
.poetry-source {
  color: var(--text-muted);
  font-family: "STKaiti", "KaiTi", serif;
  letter-spacing: 0.15em;
  opacity: 0.55;
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  writing-mode: horizontal-tb;
}

.poetry-dynasty {
  font-size: 0.7rem;
}

.poetry-source {
  display: block;
  margin-top: 14px;
  font-size: 0.72rem;
  text-align: center;
}

.poetry-container:hover .poetry-dynasty,
.poetry-container:hover .poetry-source {
  opacity: 0.78;
}

.poetry-dynasty.fade-out,
.poetry-source.fade-out {
  opacity: 0;
  filter: blur(2px);
  transform: translateY(-6px);
}

.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 50%;
  place-items: center;
  background: var(--bg-secondary);
  box-shadow: 0 2px 16px var(--shadow);
  cursor: pointer;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px var(--gold-light);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.taiji {
  position: relative;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1.5px solid var(--text-primary);
  border-radius: 50%;
  transition: transform 0.8s var(--ease);
}

.theme-toggle:hover .taiji {
  transform: rotate(180deg);
}

.taiji-white,
.taiji-black {
  position: absolute;
  width: 100%;
  height: 50%;
}

.taiji-white {
  top: 0;
  border-radius: 15px 15px 0 0;
  background: var(--bg-primary);
}

.taiji-black {
  bottom: 0;
  border-radius: 0 0 15px 15px;
  background: var(--text-primary);
}

.taiji-white::after,
.taiji-black::after,
.taiji-dot {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.taiji-white::after,
.taiji-black::after {
  width: 15px;
  height: 15px;
}

.taiji-white::after {
  bottom: -7.5px;
  left: 0;
  background: var(--bg-primary);
}

.taiji-black::after {
  top: -7.5px;
  right: 0;
  background: var(--text-primary);
}

.taiji-dot {
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%);
}

.dark-dot {
  left: 5px;
  background: var(--text-primary);
}

.light-dot {
  right: 5px;
  background: var(--bg-primary);
}

.hero-section {
  position: relative;
  z-index: 2;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.hero-container {
  width: 100%;
  max-width: 900px;
}

.hero-title-wrap {
  position: relative;
  margin-bottom: 48px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s ease 0.2s forwards;
}

.hero-title {
  display: inline-flex;
  align-items: baseline;
  color: var(--text-primary);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(1.85rem, 8vw, 4.35rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: clamp(0.12em, 2vw, 0.22em);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.35), 4px 5px 12px var(--shadow-lg);
  transition: color 0.6s ease;
}

.hero-title::after {
  position: absolute;
  bottom: -8px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  content: "";
  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);
}

.scroll-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  filter: drop-shadow(0 16px 24px var(--shadow-lg));
  transform-origin: center;
  animation: scrollIn 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.6s backwards;
}

.scroll-cap {
  position: relative;
  z-index: 3;
  width: 30px;
  border-radius: 15px;
  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,
.search-tab::before,
.search-input-group::before,
.quick-icon::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.scroll-cap::before {
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: inherit;
}

.scroll-cap-left {
  margin-right: -5px;
}

.scroll-cap-right {
  margin-left: -5px;
}

.scroll-cap-detail {
  position: absolute;
  top: 50%;
  left: 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);
  transform: translate(-50%, -50%);
}

[data-theme="dark"] .scroll-cap-detail {
  background: radial-gradient(circle at 35% 35%, #d4a843, #4a3818);
}

.scroll-container {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  padding: 34px 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(120, 79, 36, 0.1), transparent 8%, transparent 92%, rgba(120, 79, 36, 0.1)), linear-gradient(180deg, rgba(255, 252, 235, 0.95), rgba(246, 230, 190, 0.78) 50%, rgba(255, 248, 224, 0.92));
  box-shadow: inset 0 0 36px rgba(111, 75, 36, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 8px 32px var(--shadow-lg);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

[data-theme="dark"] .scroll-container {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.22)), linear-gradient(180deg, rgba(33, 24, 18, 0.94), rgba(23, 17, 14, 0.82) 50%, rgba(33, 24, 18, 0.92));
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(214, 165, 74, 0.1), 0 8px 32px rgba(0, 0, 0, 0.55);
}

.scroll-paper {
  position: relative;
  min-width: 0;
  padding: 8px 0;
  background: linear-gradient(90deg, var(--parchment-line) 0 1px, transparent 1px 24px), repeating-linear-gradient(0deg, transparent 0, transparent 31px, var(--parchment-line) 31px, var(--parchment-line) 32px);
}

.scroll-paper::before,
.scroll-paper::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: 0.2;
}

.scroll-paper::before {
  top: 0;
}

.scroll-paper::after {
  bottom: 0;
}

.scroll-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  opacity: 0.58;
}

.corner-left-top {
  top: -5px;
  left: -10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner-right-top {
  top: -5px;
  right: -10px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.corner-left-bottom {
  bottom: -5px;
  left: -10px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.corner-right-bottom {
  right: -10px;
  bottom: -5px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.search-box {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  margin: 0 auto;
}

.search-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.search-heading-mark {
  display: grid;
  width: 24px;
  height: 24px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  place-items: center;
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1;
}

.search-heading-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  opacity: 0.7;
}

.search-tabs {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 14px;
  padding: 3px 2px 9px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar {
  display: none;
}

.search-tab {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 8px 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px 14px;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--tab-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  user-select: none;
  scroll-snap-align: start;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.search-tab::before {
  inset: 4px;
  border: 1px solid rgba(177, 123, 22, 0.18);
  border-radius: inherit;
}

.search-tab i {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.search-tab:hover {
  border-color: var(--accent);
  background: var(--tab-bg-hover);
  box-shadow: 0 6px 16px var(--shadow);
  transform: translateY(-2px);
}

.search-tab:hover i {
  opacity: 1;
}

.search-tab:active {
  transform: translateY(0) scale(0.97);
}

.search-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  background: var(--tab-bg-active);
  box-shadow: 0 4px 12px var(--accent-light), inset 0 0 0 1px var(--accent);
}

.tab-name {
  font-size: 0.84rem;
}

.tab-sub {
  margin-left: -2px;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  opacity: 0.65;
}

.search-input-group {
  position: relative;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 64px;
  border-radius: 8px;
  background: var(--input-bg);
  box-shadow: 0 8px 32px var(--shadow-lg), inset 0 0 0 1px var(--border-light);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.search-input-group::before {
  inset: 4px;
  border: 1px solid rgba(177, 123, 22, 0.22);
  border-radius: 4px;
}

.search-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--shadow-lg), 0 0 0 4px var(--input-focus), inset 0 0 0 1px var(--accent-light);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 16px 14px 16px 4px;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-style: normal;
  transition: opacity 0.3s ease;
}

.search-input:focus::placeholder {
  opacity: 0.5;
}

.search-input-icon {
  align-self: center;
  flex: 0 0 auto;
  margin-left: 20px;
  color: var(--accent);
  font-size: 1.05rem;
  opacity: 0.8;
}

.search-btn {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1;
  gap: 7px;
  min-width: 126px;
  justify-content: center;
  padding: 14px 22px;
  overflow: hidden;
  border: 0;
  color: var(--btn-search-text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  background: var(--btn-search-bg);
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.search-btn::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  content: "";
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.search-btn:hover {
  background: var(--btn-search-hover);
  box-shadow: 0 6px 20px var(--accent-light);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: translateY(0) scale(0.98);
}

.search-btn:active::before {
  width: 300px;
  height: 300px;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 800px;
  margin-top: 48px;
  padding: 0 16px;
}

.quick-link {
  gap: 8px;
  width: 68px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}

.quick-icon {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 50% 50% 8px 8px;
  place-items: center;
  color: var(--accent);
  font-size: 1.3rem;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.2), transparent 45%), var(--bg-secondary);
  box-shadow: inset 0 0 8px var(--shadow), 0 2px 8px var(--shadow);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.quick-icon::before {
  inset: 5px;
  border: 1px solid var(--border-light);
  border-radius: 50% 50% 6px 6px;
  opacity: 0.65;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}

.quick-icon::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
  opacity: 0.55;
}

.quick-link:hover {
  color: var(--accent);
  transform: translateY(-5px);
}

.quick-link:hover .quick-icon {
  border-color: var(--accent);
  color: var(--bg-primary);
  background: 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-size: 0.82rem;
  letter-spacing: 0.12em;
}

.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 {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-light);
  pointer-events: none;
  transform: scale(0);
  animation: rippleOut 0.6s ease-out forwards;
}

.search-tab:focus-visible,
.search-btn:focus-visible,
.theme-toggle:focus-visible,
.quick-link:focus-visible,
.poetry-container:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@keyframes cloudL {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(calc(100vw + 120%));
  }
}

@keyframes cloudR {
  from {
    transform: translateX(calc(100vw + 120%));
  }

  to {
    transform: translateX(-120%);
  }
}

@keyframes swing {
  from {
    rotate: -4deg;
  }

  to {
    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);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: scaleX(0.3) scaleY(0.95);
  }

  60% {
    opacity: 1;
    filter: blur(0);
  }

  100% {
    filter: blur(0);
    transform: scaleX(1) scaleY(1);
  }
}

@keyframes rippleOut {
  to {
    opacity: 0;
    transform: scale(4);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@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;
  }

  .scroll-wrapper {
    max-width: 100%;
  }

  .scroll-cap {
    width: 20px;
    border-radius: 10px;
  }

  .scroll-container {
    padding: 24px 18px;
  }

  .search-heading {
    font-size: 0.82rem;
  }

  .search-tabs {
    justify-content: flex-start;
    gap: 5px;
  }

  .search-tab {
    min-height: 40px;
    padding: 7px 11px;
    font-size: 0.8rem;
  }

  .tab-sub {
    font-size: 0.75rem;
    opacity: 0.75;
  }

  .search-input {
    padding: 14px 12px 14px 4px;
    font-size: 0.92rem;
  }

  .search-input-icon {
    margin-left: 14px;
  }

  .search-btn {
    gap: 4px;
    min-width: 112px;
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .quick-nav {
    gap: 14px;
    margin-top: 36px;
  }

  .quick-link {
    width: 58px;
  }

  .quick-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.1rem;
  }

  .quick-label {
    font-size: 0.875rem;
  }

  .cloud-1 {
    width: 180px;
    height: 40px;
  }

  .cloud-2 {
    width: 140px;
    height: 30px;
  }

  .cloud-3 {
    width: 160px;
    height: 35px;
  }

  .particle-canvas,
  .cloud {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 20px 12px;
  }

  .hero-title-wrap {
    margin-bottom: 24px;
  }

  .scroll-cap {
    width: 12px;
    border-radius: 6px;
  }

  .scroll-container {
    padding: 14px 12px;
  }

  .search-heading {
    gap: 7px;
    margin-bottom: 11px;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
  }

  .search-heading-mark {
    width: 21px;
    height: 21px;
  }

  .search-tab {
    min-height: 40px;
    gap: 4px;
    padding: 7px 10px;
    font-size: 0.875rem;
  }

  .search-tab i {
    font-size: 0.875rem;
  }

  .search-input {
    padding: 13px 8px 13px 2px;
    font-size: 0.88rem;
  }

  .search-input-icon {
    margin-left: 10px;
    font-size: 0.95rem;
  }

  .search-btn {
    min-width: 94px;
    padding: 13px 10px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
  }

  .quick-nav {
    gap: 8px;
    margin-top: 28px;
  }

  .quick-link {
    width: 56px;
  }

  .quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .quick-icon::before {
    border-radius: 6px;
  }

  .quick-label {
    font-size: 0.875rem;
  }

  .cloud-1 {
    width: 120px;
    height: 28px;
  }

  .cloud-2 {
    width: 100px;
    height: 22px;
  }

  .cloud-3 {
    width: 110px;
    height: 24px;
  }
}

@media (max-width: 360px) {
  .hero-section {
    padding-right: 8px;
    padding-left: 8px;
  }

  .scroll-container {
    padding-right: 8px;
    padding-left: 8px;
  }

  .search-heading {
    white-space: normal;
  }

  .search-heading-line {
    display: none;
  }

  .search-input-group {
    min-height: 58px;
  }

  .search-input-icon {
    margin-left: 8px;
  }

  .search-input {
    padding-right: 4px;
    font-size: 0.82rem;
  }

  .search-btn {
    min-width: 48px;
    width: 48px;
    padding: 10px;
  }

  .search-btn span {
    display: none;
  }
}
