:root {
  --ink-deep: #0f2744;
  --ink: #1a3a5c;
  --ink-soft: #2b4b6d;
  --ink-muted: #486484;
  --gold: #d4a04a;
  --gold-light: #f4d58d;
  --gold-deep: #9d7628;
  --paper: #faf5e8;
  --paper-dark: #f5edd8;
  --paper-darker: #ece2c6;
  --line: rgba(212, 160, 74, 0.45);
  --shadow: 0 10px 30px rgba(15, 39, 68, 0.15);
  --shadow-gold: 0 10px 40px rgba(212, 160, 74, 0.35);

  --font-brush: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', '楷体', 'Noto Serif SC', cursive;
  --font-title: 'ZCOOL XiaoWei', 'PingFang SC', 'Microsoft YaHei', 'STSong', 'SimSun', '宋体', serif;
  --font-body: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', 'STSong', 'SimSun', '宋体', serif;

  --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图片懒加载占位符（使用浏览器原生 loading="lazy"） */
.img-placeholder {
  background: linear-gradient(135deg, var(--paper-dark) 0%, var(--paper-darker) 100%);
  position: relative;
  overflow: hidden;
}

.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: placeholder-shimmer 1.5s infinite;
}

@keyframes placeholder-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: 
    radial-gradient(1200px 500px at 20% -10%, rgba(212, 160, 74, 0.18), transparent 60%),
    radial-gradient(900px 400px at 100% 10%, rgba(15, 39, 68, 0.12), transparent 60%),
    linear-gradient(180deg, #fbf8ef 0%, #faf3e0 50%, #f8eecd 100%);
  color: var(--ink-deep);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(157, 118, 40, 0.03) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(15, 39, 68, 0.02) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 30% 40%, rgba(212, 160, 74, 0.08), transparent 40%);
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--ink-deep);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }
}

/* 金色墨团 */
.ink-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
}

/* 导航栏登录按钮 */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  font-family: var(--font-title);
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 20px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(212, 160, 74, 0.3);
}

.nav-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 160, 74, 0.5);
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold-light);
  background: transparent;
  border: 1px solid rgba(212, 160, 74, 0.45);
  border-radius: 4px;
  cursor: pointer;
  transition: all .3s ease;
}

.nav-logout-btn:hover {
  color: var(--ink-deep);
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 100%);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 160, 74, 0.45);
}

.ink-blob-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 160, 74, 0.4) 0%, transparent 70%);
  animation: float 18s ease-in-out infinite;
}

.ink-blob-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(212, 160, 74, 0.3) 0%, transparent 70%);
  animation: float 18s ease-in-out infinite 6s;
}

.ink-blob-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 160, 74, 0.25) 0%, transparent 70%);
  animation: float 18s ease-in-out infinite 12s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.08);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.95);
  }
}

/* 金色闪光点 */
.gold-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold), 0 0 24px rgba(212, 160, 74, 0.5);
  animation: spark 3.5s ease-in-out infinite;
}

.gold-sparkle-1 { animation-delay: 0s; }
.gold-sparkle-2 { animation-delay: 0.9s; }
.gold-sparkle-3 { animation-delay: 1.8s; }
.gold-sparkle-4 { animation-delay: 2.7s; }

@keyframes spark {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

/* 装饰线 */
.head-deco {
  width: 200px;
  height: 20px;
  margin: 24px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.head-deco::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.head-deco::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: -40px 0 0 var(--gold), 40px 0 0 var(--gold);
}

/* 金色四角装饰 */
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
}

.corner-tl {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.corner-tr {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}

.corner-bl {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

.corner-br {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

/* 虚线分割 */
.divider-dashed {
  border-bottom: 1px dashed rgba(212, 160, 74, 0.35);
}

/* 宣纸卡片 */
.card-paper {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-dark) 100%);
  border: 1px solid rgba(212, 160, 74, 0.3);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 40px 30px;
  position: relative;
}

.card-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* 深色卡片 */
.card-dark {
  background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  color: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 40px 30px;
}

/* 强调卡片 */
.card-accent {
  background: linear-gradient(180deg, #fffaf0 0%, var(--paper-darker) 100%);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 40px 30px;
}

/* 按钮系统 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 50%, var(--gold-light) 60%, var(--gold) 100%);
  color: var(--ink-deep);
  font-family: var(--font-title);
  font-size: 17px;
  letter-spacing: 4px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(212, 160, 74, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 50%, var(--gold-light) 60%, var(--gold) 100%);
  color: var(--ink-deep);
  font-family: var(--font-title);
  font-size: 17px;
  letter-spacing: 4px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(212, 160, 74, 0.45);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: transparent;
  color: var(--gold-light);
  font-family: var(--font-title);
  font-size: 16px;
  letter-spacing: 3px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(212, 160, 74, 0.1);
  transform: translateY(-2px);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: transparent;
  color: var(--gold-deep);
  font-family: var(--font-title);
  font-size: 15px;
  letter-spacing: 2px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-text:hover {
  background: rgba(212, 160, 74, 0.15);
}

/* ============ 朗读模式：iOS 风格 Toggle 开关 ============ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.25);
  border: 1px solid rgba(212, 160, 74, 0.3);
  border-radius: 26px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--paper);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 100%);
  border-color: var(--gold);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateY(-50%) translateX(20px);
  background: var(--paper);
}
.toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(212, 160, 74, 0.25);
}

/* ============ 朗读模式：浮动停止控件 ============ */
#read-aloud-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 16px;
  background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  border: 1px solid var(--gold);
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 160, 74, 0.1);
  color: var(--gold-light);
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 1.5px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#read-aloud-widget.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
#read-aloud-widget .ra-waves {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 16px;
}
#read-aloud-widget .ra-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
#read-aloud-widget .ra-spin {
  animation: ra-spin 0.8s linear infinite;
  color: var(--gold);
}
@keyframes ra-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#read-aloud-widget .ra-waves span {
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
  animation: ra-wave 1s ease-in-out infinite;
}
#read-aloud-widget .ra-waves span:nth-child(1) { height: 7px; animation-delay: 0s; }
#read-aloud-widget .ra-waves span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
#read-aloud-widget .ra-waves span:nth-child(3) { height: 10px; animation-delay: 0.4s; }
@keyframes ra-wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
#read-aloud-widget .ra-text {
  white-space: nowrap;
}
#read-aloud-widget .ra-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(212, 160, 74, 0.5);
  border-radius: 14px;
  padding: 4px 12px;
  color: var(--gold-light);
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
#read-aloud-widget .ra-stop-btn:hover {
  background: rgba(212, 160, 74, 0.2);
  border-color: var(--gold);
}
@media (max-width: 640px) {
  #read-aloud-widget {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px 8px 14px;
    font-size: 12px;
  }
}


select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 36px 10px 14px;
  font-family: var(--font-title);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ink-deep);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d4a04a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  border: 1px solid rgba(212, 160, 74, 0.45);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

select:hover {
  border-color: var(--gold);
  background-color: var(--paper-dark);
}

select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 74, 0.15);
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 下拉箭头在 disabled 时变灰 */
select:disabled {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* option 选项：宣纸色背景，深色文字 */
select option {
  background-color: var(--paper);
  color: var(--ink-deep);
  padding: 8px 14px;
  line-height: 1.6;
}

select option:checked,
select option:checked:focus {
  background-color: rgba(212, 160, 74, 0.22);
  color: var(--gold-deep);
  font-weight: 500;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(15, 39, 68, 0.92) 0%, rgba(26, 58, 92, 0.88) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 160, 74, 0.3);
  height: 66px;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.navbar.nav-scrolled {
  background: linear-gradient(180deg, rgba(15, 39, 68, 0.98) 0%, rgba(15, 39, 68, 0.95) 100%);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(212, 160, 74, 0.55);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.navbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-brush);
  font-size: 30px;
  color: var(--gold-light);
  letter-spacing: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
}

.logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.logo:hover .logo-icon {
  box-shadow: 0 6px 22px rgba(212, 160, 74, 0.55);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-deep);
  font-weight: 400;
  font-size: 20px;
  font-family: var(--font-brush);
  box-shadow: 0 4px 15px rgba(212, 160, 74, 0.4);
  position: relative;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(15, 39, 68, 0.3);
  border-radius: 2px;
}

/* ============ 全局搜索按钮（灵动岛风格长方形圆角药丸） ============ */
.nav-search {
  position: relative;
  margin-left: 18px;
}
.nav-search-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.15), rgba(212, 160, 74, 0.06));
  border: 1px solid rgba(212, 160, 74, 0.4);
  border-radius: 22px;
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              color 0.25s ease;
  overflow: hidden;
  white-space: nowrap;
}
.nav-search-btn:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.28), rgba(212, 160, 74, 0.12));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(212, 160, 74, 0.28);
}
.nav-search-btn.active {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.35), rgba(212, 160, 74, 0.18));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(212, 160, 74, 0.35);
}
.nav-search-btn-icon { flex-shrink: 0; transition: transform 0.3s ease; }
.nav-search-btn:hover .nav-search-btn-icon { transform: scale(1.08); }
.nav-search-btn-text { display: inline-block; }
.nav-search-btn-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 10px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(212, 160, 74, 0.85);
  background: rgba(212, 160, 74, 0.12);
  border: 1px solid rgba(212, 160, 74, 0.25);
  border-radius: 4px;
  margin-left: 2px;
}
@media (max-width: 768px) {
  .nav-search-btn-kbd { display: none; }
  .nav-search-btn-text { display: none; }
  .nav-search-btn { padding: 7px 12px; }
  .nav-search { margin-left: 12px; }
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  color: var(--paper);
  font-family: var(--font-title);
  font-size: 15px;
  letter-spacing: 2px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-light);
}

/* 下划线由 animations.css 的 .nav-link::after 统一处理，
   此处不再重复定义，避免定位冲突导致横线歪斜。 */

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============ 全局搜索（灵动岛下拉式，无背景模糊） ============ */

/* nav-search 容器允许子元素溢出（下拉面板能伸出导航栏） */
.nav-search { overflow: visible; }

/* 全屏遮罩已废弃：改用 document click 监听外部点击关闭，保持 body 可滚动 */
.gs-overlay {
  display: none !important;
}

/* 下拉面板：从按钮位置向下"拉伸"为正方形（灵动岛 morphing 风格） */
.gs-modal {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(460px, calc(100vw - 32px));
  height: min(460px, 70vh);
  background: linear-gradient(180deg, rgba(15, 39, 68, 0.99) 0%, rgba(26, 58, 92, 0.99) 100%);
  border: 1px solid rgba(212, 160, 74, 0.45);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 160, 74, 0.08);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  /* 灵动岛展开动画：从按钮位置向下"延展" */
  transform-origin: top left;
}
.gs-modal.gs-animating {
  animation: gsModalExpand 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes gsModalExpand {
  from {
    opacity: 0;
    transform: scaleY(0.5) scaleX(0.8);
    border-radius: 22px;
  }
  to {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
    border-radius: 18px;
  }
}

/* 关闭动画：灵动岛"收回"效果（从当前尺寸收缩回按钮位置） */
.gs-modal.gs-closing {
  animation: gsModalCollapse 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes gsModalCollapse {
  from {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
    border-radius: 18px;
  }
  to {
    opacity: 0;
    transform: scaleY(0.4) scaleX(0.85);
    border-radius: 22px;
  }
}

/* 顶部小三角指示器（连接按钮与面板，灵动岛视觉连贯） */
.gs-modal::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 32px;
  width: 12px; height: 12px;
  background: rgba(15, 39, 68, 0.99);
  border-left: 1px solid rgba(212, 160, 74, 0.45);
  border-top: 1px solid rgba(212, 160, 74, 0.45);
  transform: rotate(45deg);
  z-index: 1;
}
@media (max-width: 768px) {
  .gs-modal { width: calc(100vw - 24px); }
  .gs-modal::before { left: 20px; }
}

/* 顶部 Tab 头 */
.gs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 0 14px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.18);
  flex-shrink: 0;
}
.gs-tabs { display: flex; gap: 4px; }
.gs-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: transparent; border: none;
  color: rgba(250, 245, 232, 0.55);
  font-size: 13px;
  font-family: var(--font-title);
  letter-spacing: 1.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.gs-tab:hover { color: var(--paper); }
.gs-tab.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}
.gs-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: rgba(250, 245, 232, 0.55);
  cursor: pointer; border-radius: 50%; transition: all 0.2s;
}
.gs-close:hover { color: var(--gold-light); background: rgba(212, 160, 74, 0.15); }

/* 面板切换 */
.gs-pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.gs-pane.active { display: flex; }

/* 搜索输入框 */
.gs-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.18);
  flex-shrink: 0;
}
.gs-input-icon { color: var(--gold); flex-shrink: 0; opacity: 0.7; }
.gs-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--paper);
  font-size: 15px;
  font-family: var(--font-body);
  letter-spacing: 1px;
}
.gs-input::placeholder { color: rgba(250, 245, 232, 0.4); }
.gs-clear {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: rgba(250, 245, 232, 0.45);
  cursor: pointer; border-radius: 50%; transition: all 0.2s;
}
.gs-clear:hover { color: var(--gold-light); background: rgba(212, 160, 74, 0.15); }

/* 搜索结果 */
.gs-results {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 6px 0 10px;
}
.gs-results::-webkit-scrollbar { width: 5px; }
.gs-results::-webkit-scrollbar-thumb { background: rgba(212, 160, 74, 0.3); border-radius: 3px; }

.gs-hint {
  padding: 50px 20px; text-align: center;
  color: rgba(250, 245, 232, 0.5);
  font-size: 13px; letter-spacing: 2px;
  font-family: var(--font-title);
}
.gs-hint-icon { font-size: 30px; margin-bottom: 12px; opacity: 0.6; }
.gs-hint-sub { font-size: 11px; opacity: 0.7; margin-top: 4px; letter-spacing: 1.5px; }

.gs-group-title {
  padding: 10px 16px 4px;
  font-size: 11px; letter-spacing: 3px;
  color: var(--gold);
  font-family: var(--font-title);
  display: flex; align-items: center; gap: 8px;
}
.gs-group-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.25), transparent);
}

.gs-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: var(--paper); text-decoration: none;
  cursor: pointer; transition: background 0.15s;
}
.gs-item:hover { background: rgba(212, 160, 74, 0.1); }
.gs-item-thumb {
  width: 42px; height: 42px;
  border-radius: 8px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(212, 160, 74, 0.25);
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-family: var(--font-brush); font-size: 16px;
}
.gs-item-body { flex: 1; min-width: 0; }
.gs-item-title {
  font-size: 14px; color: var(--paper);
  font-family: var(--font-title); letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gs-item-title mark {
  background: rgba(212, 160, 74, 0.3);
  color: var(--gold-light); padding: 0 2px; border-radius: 2px;
}
.gs-item-meta {
  font-size: 12px; color: rgba(250, 245, 232, 0.55);
  margin-top: 3px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gs-item-meta .tag {
  font-size: 10px; padding: 1px 6px;
  border-radius: 4px; letter-spacing: 1px;
  font-family: var(--font-title);
}
.tag-attraction { background: rgba(74,144,226,0.2); color: #7ab8ff; border: 1px solid rgba(74,144,226,0.3); }
.tag-post { background: rgba(46,125,91,0.2); color: #6fc49b; border: 1px solid rgba(46,125,91,0.3); }
.tag-diary { background: rgba(212,160,74,0.15); color: var(--gold-light); border: 1px solid rgba(212,160,74,0.3); }
.tag-user { background: rgba(155,89,182,0.15); color: #c89be2; border: 1px solid rgba(155,89,182,0.3); }
.tag-ai { background: rgba(26,90,138,0.2); color: #7abfff; border: 1px solid rgba(26,90,138,0.3); font-size: 10px; padding: 0 4px; border-radius: 3px; }

.gs-empty {
  padding: 32px 16px; text-align: center;
  color: rgba(250, 245, 232, 0.4); font-size: 13px;
}
.gs-loading {
  padding: 20px; text-align: center;
  color: rgba(250,245,232,0.6); font-size: 13px;
}
.gs-loading::before {
  content: ''; display: inline-block;
  width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid rgba(212,160,74,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: gsSpin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes gsSpin { to { transform: rotate(360deg); } }

/* ============ AI 对话面板 ============ */
.gs-chat {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px;
}
.gs-chat::-webkit-scrollbar { width: 5px; }
.gs-chat::-webkit-scrollbar-thumb { background: rgba(212, 160, 74, 0.3); border-radius: 3px; }

.gs-chat-welcome {
  text-align: center; padding: 40px 16px 24px;
}
.gs-chat-avatar {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,160,74,0.25), rgba(26,90,138,0.4));
  border: 1px solid rgba(212, 160, 74, 0.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
}
.gs-chat-welcome-title {
  font-family: var(--font-title);
  font-size: 17px; color: var(--paper);
  letter-spacing: 2px; margin-bottom: 6px;
}
.gs-chat-welcome-desc {
  font-size: 13px; color: rgba(250, 245, 232, 0.55);
  line-height: 1.6; max-width: 420px; margin: 0 auto 20px;
}
.gs-chat-suggest {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.gs-suggest-btn {
  padding: 7px 14px;
  background: rgba(212, 160, 74, 0.08);
  border: 1px solid rgba(212, 160, 74, 0.3);
  border-radius: 20px;
  color: var(--gold-light);
  font-size: 12px;
  font-family: var(--font-title);
  letter-spacing: 1px;
  cursor: pointer; transition: all 0.2s;
}
.gs-suggest-btn:hover {
  background: rgba(212, 160, 74, 0.18);
  border-color: var(--gold);
  color: var(--paper);
}

/* 消息气泡 */
.gs-msg {
  display: flex; gap: 10px; margin-bottom: 14px;
  animation: gsMsgIn 0.25s ease both;
}
@keyframes gsMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.gs-msg-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.gs-msg.user .gs-msg-avatar {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--gold-light);
  border: 1px solid rgba(212, 160, 74, 0.3);
}
.gs-msg.ai .gs-msg-avatar {
  background: linear-gradient(135deg, rgba(212,160,74,0.25), rgba(26,90,138,0.4));
  color: var(--gold-light);
  border: 1px solid rgba(212, 160, 74, 0.4);
}
.gs-msg-body { flex: 1; min-width: 0; }
.gs-msg-name {
  font-size: 11px; color: rgba(250, 245, 232, 0.5);
  margin-bottom: 4px; letter-spacing: 1px;
}
.gs-msg-bubble {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--paper);
  max-width: 100%;
  word-break: break-word;
}
.gs-msg.user .gs-msg-bubble {
  background: linear-gradient(135deg, rgba(26, 90, 138, 0.6), rgba(15, 39, 68, 0.6));
  border: 1px solid rgba(212, 160, 74, 0.2);
}
.gs-msg.ai .gs-msg-bubble {
  background: rgba(250, 247, 240, 0.06);
  border: 1px solid rgba(212, 160, 74, 0.2);
}
.gs-msg-cards {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.gs-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid rgba(212, 160, 74, 0.18);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer; transition: all 0.2s;
}
.gs-card:hover {
  background: rgba(212, 160, 74, 0.08);
  border-color: rgba(212, 160, 74, 0.4);
  transform: translateX(2px);
}
.gs-card-thumb {
  width: 36px; height: 36px;
  border-radius: 6px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(212, 160, 74, 0.25);
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-family: var(--font-brush); font-size: 14px;
}
.gs-card-body { flex: 1; min-width: 0; }
.gs-card-title {
  font-size: 13px; color: var(--paper);
  font-family: var(--font-title); letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gs-card-meta {
  font-size: 11px; color: rgba(250, 245, 232, 0.5);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gs-card-action {
  display: flex; align-items: center;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.15), rgba(26, 90, 138, 0.2));
  border: 1px solid rgba(212, 160, 74, 0.4);
  border-radius: 8px;
  text-decoration: none; cursor: pointer;
  color: var(--gold-light); font-family: var(--font-title);
  font-size: 13px; letter-spacing: 1px;
  transition: all 0.2s;
}
.gs-card-action:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.25), rgba(26, 90, 138, 0.3));
  transform: translateX(2px);
}
.gs-card-action svg { margin-right: 6px; }

.gs-typing {
  display: inline-flex; gap: 3px;
  padding: 12px 16px;
  background: rgba(250, 247, 240, 0.06);
  border: 1px solid rgba(212, 160, 74, 0.2);
  border-radius: 12px;
}
.gs-typing span {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: gsBounce 1.2s infinite;
}
.gs-typing span:nth-child(2) { animation-delay: 0.2s; }
.gs-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes gsBounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* 输入框 */
.gs-chat-input-wrap {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(212, 160, 74, 0.18);
  flex-shrink: 0;
}
.gs-chat-input {
  flex: 1;
  background: rgba(250, 247, 240, 0.05);
  border: 1px solid rgba(212, 160, 74, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--paper);
  font-size: 14px;
  font-family: var(--font-body);
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color 0.2s;
}
.gs-chat-input::placeholder { color: rgba(250, 245, 232, 0.35); }
.gs-chat-input:focus { border-color: var(--gold); }
.gs-chat-send {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border: none; border-radius: 50%;
  color: #fff; cursor: pointer;
  transition: all 0.2s;
}
.gs-chat-send:hover { transform: scale(1.05); box-shadow: 0 4px 14px rgba(212, 160, 74, 0.4); }
.gs-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* 小屏幕自适应（保持正方形灵动岛下拉风格，不全屏、不锁滚动） */
@media (max-width: 640px) {
  .gs-modal {
    /* 宽度等于高度，形成正方形（受 60vh 限制避免遮挡过多内容） */
    width: calc(100vw - 24px);
    height: min(calc(100vw - 24px), 60vh);
    border-radius: 16px;
    border-left: 1px solid rgba(212, 160, 74, 0.45);
    border-right: 1px solid rgba(212, 160, 74, 0.45);
  }
  .gs-tab { padding: 10px 10px; font-size: 12px; }
  .gs-input { font-size: 14px; }
  .gs-chat-welcome { padding: 24px 12px 16px; }
}

.ai-guide-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.15), rgba(212, 160, 74, 0.08));
  border: 1px solid rgba(212, 160, 74, 0.4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-guide-nav-btn:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.3), rgba(212, 160, 74, 0.15));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 2px 12px rgba(212, 160, 74, 0.3);
  transform: translateY(-1px);
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-deep);
  font-family: var(--font-brush);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(212, 160, 74, 0.3);
}

.user-avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 160, 74, 0.5);
}

.nav-settings {
  position: relative;
  margin-left: 8px;
}

.avatar-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.2) 0%, rgba(212, 160, 74, 0.05) 100%);
  border: 2px solid rgba(212, 160, 74, 0.3);
  border-radius: 50%;
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212, 160, 74, 0.1);
}

.avatar-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.avatar-btn * {
  pointer-events: none;
}

.avatar-btn:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.3) 0%, rgba(212, 160, 74, 0.1) 100%);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(212, 160, 74, 0.25);
}

.avatar-btn:hover::before {
  opacity: 0.6;
}

.avatar-btn:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(212, 160, 74, 0.15);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 200px;
  background: linear-gradient(180deg, rgba(15, 39, 68, 0.99) 0%, rgba(20, 48, 78, 0.98) 100%);
  border: 1px solid rgba(212, 160, 74, 0.3);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 160, 74, 0.05);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  will-change: transform, opacity;
  z-index: 1000;
  overflow: hidden;
}

.settings-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.settings-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: rgba(15, 39, 68, 0.99);
  border-left: 1px solid rgba(212, 160, 74, 0.3);
  border-top: 1px solid rgba(212, 160, 74, 0.3);
  transform: rotate(45deg);
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: var(--paper);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.settings-menu-item:hover {
  background: rgba(212, 160, 74, 0.12);
  color: var(--gold-light);
}

.settings-menu-item:active {
  background: rgba(212, 160, 74, 0.2);
}

.settings-menu-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.settings-menu-item:hover svg {
  opacity: 1;
}

.settings-menu-header {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(212, 160, 74, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 160, 74, 0.3), transparent);
  margin: 5px 0;
}

/* 页面标题 */
.page-title {
  text-align: center;
  padding: 60px 0;
}

.page-title h2 {
  font-family: var(--font-brush);
  font-size: 42px;
  color: var(--ink-deep);
  letter-spacing: 8px;
  margin-bottom: 16px;
}

.page-title p {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink-muted);
  letter-spacing: 3px;
}

/* 区块标题 */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--font-brush);
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: 2px;
  margin-bottom: 20px;
  border: 1px solid rgba(15, 39, 68, 0.2);
}

.section-title {
  font-family: var(--font-brush);
  font-size: 42px;
  color: var(--ink-deep);
  letter-spacing: 8px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink-muted);
  letter-spacing: 3px;
}

/* 主内容区 */
.main-content {
  padding-top: 66px;
  position: relative;
  z-index: 1;
}

/* 页脚 */
.footer {
  background: linear-gradient(180deg, transparent 0%, rgba(11, 26, 46, 0.4) 10%, var(--ink-deep) 40%, var(--ink-deep) 100%);
  color: var(--paper);
  padding: 80px 0 30px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 160, 74, 0.3) 30%, var(--gold) 50%, rgba(212, 160, 74, 0.3) 70%, transparent 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--gold-light);
  letter-spacing: 6px;
  margin-bottom: 12px;
}

.footer-slogan {
  font-family: var(--font-brush);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 6px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: rgba(250, 245, 232, 0.6);
  line-height: 1.8;
  font-size: 14px;
}

.footer-section h4 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 20px;
  font-family: var(--font-title);
  letter-spacing: 2px;
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-section a {
  color: rgba(250, 245, 232, 0.6);
  font-size: 14px;
  font-family: var(--font-title);
}

.footer-section a:hover {
  color: var(--gold-light);
}

.footer-cta {
  text-align: center;
  margin: 40px 0;
}

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

.footer-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer-qrcode {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(212, 160, 74, 0.15);
  color: rgba(250, 245, 232, 0.4);
  font-size: 13px;
  letter-spacing: 2px;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-bottom-left .footer-qrcode {
  width: 72px;
  height: auto;
  border-radius: 3px;
  flex-shrink: 0;
  object-fit: contain;
}

.footer-bottom-left .footer-deepseek {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
}

.footer-bottom-left .footer-chuangzaoli {
  width: 72px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.footer-bottom-right {
  display: flex;
  gap: 20px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--paper-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-deep);
}

/* 滚动进入动画 */
.scroll-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 导航栏 span 不换行 ==================== */
.logo,
.logo span,
.nav-link,
.nav-link span,
.ai-guide-nav-btn,
.ai-guide-nav-btn span,
.nav-search-btn,
.nav-search-btn span,
.nav-search-btn svg,
.avatar-btn,
.settings-menu-item,
.settings-menu-item span,
.side-drawer-logo,
.side-drawer-logo span,
.side-drawer-link,
.side-drawer-link span {
  white-space: nowrap;
}

/* ==================== 汉堡按钮 ==================== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(212, 160, 74, 0.35);
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.12), rgba(212, 160, 74, 0.04));
  border-radius: 10px;
  cursor: pointer;
  color: var(--gold-light);
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  margin-right: 7px;
  transition: all 0.3s ease;
  transform-origin: center center;
}
.hamburger-btn span:nth-child(2) {
  width: 16px;
}
.hamburger-btn span:nth-child(3) {
  width: 12px;
}
.hamburger-btn:hover {
  border-color: rgba(212, 160, 74, 0.6);
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.22), rgba(212, 160, 74, 0.08));
  box-shadow: 0 4px 14px rgba(212, 160, 74, 0.18);
}
.hamburger-btn:active {
  transform: scale(0.96);
}
.hamburger-btn.active span {
  align-items: center;
}
.hamburger-btn.active span:nth-child(1) {
  width: 22px;
  transform: translateY(7px) rotate(45deg);
  margin-right: 0;
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger-btn.active span:nth-child(3) {
  width: 22px;
  transform: translateY(-7px) rotate(-45deg);
  margin-right: 0;
}

/* ==================== 遮罩层 ==================== */
.menu-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  z-index: 1098;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-mask.show {
  opacity: 1;
  visibility: visible;
}

/* ==================== 侧边抽屉 ==================== */
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 86vw;
  height: 100dvh;
  height: 100vh;
  background: linear-gradient(180deg, #1a3a5c 0%, #102643 100%);
  border-left: 1px solid rgba(212, 160, 74, 0.35);
  z-index: 1099;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  will-change: transform;
}
.side-drawer.show {
  transform: translateX(0);
}

.side-drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at top right, rgba(212, 160, 74, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* ===== 抽屉头部 ===== */
.side-drawer-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.25);
  z-index: 1;
  background: rgba(15, 39, 68, 0.6);
}
.side-drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-brush);
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--gold-light);
}
.side-drawer-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-deep);
  font-weight: 400;
  font-size: 20px;
  font-family: var(--font-brush);
  box-shadow: 0 4px 14px rgba(212, 160, 74, 0.35);
  position: relative;
}
.side-drawer-logo-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(15, 39, 68, 0.3);
  border-radius: 2px;
}
.side-drawer-close {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 160, 74, 0.3);
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.1), rgba(212, 160, 74, 0.02));
  color: var(--gold-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.side-drawer-close:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.22), rgba(212, 160, 74, 0.08));
  border-color: rgba(212, 160, 74, 0.55);
  transform: rotate(90deg);
}
.side-drawer-close:active {
  transform: rotate(90deg) scale(0.94);
}

/* ===== 抽屉导航列表 ===== */
.side-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 24px;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.side-drawer-nav::-webkit-scrollbar {
  width: 4px;
}
.side-drawer-nav::-webkit-scrollbar-thumb {
  background: rgba(212, 160, 74, 0.35);
  border-radius: 4px;
}

.side-drawer-group-title {
  padding: 18px 20px 8px;
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold);
  opacity: 0.85;
  font-weight: 600;
}

.side-drawer-divider {
  height: 1px;
  margin: 12px 16px;
  background: linear-gradient(90deg, transparent, rgba(212, 160, 74, 0.28), transparent);
}

.side-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  font-family: var(--font-title);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--paper);
  cursor: pointer;
  width: 100%;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  text-align: left;
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
}
.side-drawer-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0.9;
  transition: all 0.25s ease;
}
.side-drawer-link:hover {
  position: relative;
  overflow: hidden;
}
.side-drawer-link:hover {
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.12), transparent);
  color: var(--gold-light);
  border-left-color: var(--gold);
  padding-left: 24px;
}
.side-drawer-link:hover svg {
  transform: translateX(2px);
  opacity: 1;
}
.side-drawer-link:active {
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.22), transparent);
  transform: translateX(2px);
}

.side-drawer-link.side-drawer-login {
  color: var(--gold-light);
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.08), transparent);
}
.side-drawer-link.side-drawer-login:hover {
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.18), transparent);
}
.side-drawer-link.side-drawer-logout {
  color: #e67e7e;
}
.side-drawer-link.side-drawer-logout svg {
  color: #e67e7e;
  opacity: 0.9;
}
.side-drawer-link.side-drawer-logout:hover {
  background: linear-gradient(90deg, rgba(230, 126, 126, 0.12), transparent);
  border-left-color: #e67e7e;
  color: #f5b3b3;
}
/* 响应式 */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }
  .ai-guide-nav-btn {
    display: none;
  }
  .hamburger-btn {
    display: inline-flex;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .navbar-inner {
    padding: 0 16px;
  }

  .logo {
    font-size: 22px;
    gap: 8px;
  }

  .nav-user {
    gap: 8px;
  }

  .nav-settings .avatar-btn {
    width: 40px;
    height: 40px;
  }

  .hamburger-btn {
    width: 40px;
    height: 40px;
  }
  .hamburger-btn span {
    width: 20px;
    height: 2px;
  }
  .hamburger-btn span:nth-child(2) {
    width: 14px;
  }
  .hamburger-btn span:nth-child(3) {
    width: 10px;
  }

  .side-drawer {
    width: 84%;
    max-width: 340px;
  }
  .side-drawer-link {
    padding: 13px 16px;
    font-size: 15px;
    letter-spacing: 1.5px;
  }
  .side-drawer-group-title {
    padding: 14px 16px 8px;
    font-size: 12px;
  }
  .side-drawer-logo {
    font-size: 24px;
    letter-spacing: 3px;
  }
  .side-drawer-logo-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .nav-search-btn-kbd {
    font-size: 10px;
  }

  .section-title {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .attractions-grid {
    grid-template-columns: 1fr;
  }

  .ai-guide-tabs {
    flex-direction: column;
  }

  .ai-guide-tab {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-stat-number {
    font-size: 28px;
  }
  
  .hero-stat-label {
    font-size: 12px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .chat-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .chat-send-btn {
    width: 100%;
  }
}

.qr-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.qr-status-default {
  color: var(--ink-muted);
  background: var(--paper-dark);
}

.qr-status-success {
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.qr-status-info {
  color: #17a2b8;
  background: rgba(23, 162, 184, 0.1);
}



/* ==================== 移动端性能优化：禁用重绘/离屏渲染 ==================== */

/* 1) 所有移动端（平板+手机，<=1080px）禁用 backdrop-filter 用纯色替代 */
@media (max-width: 1080px) {
  /* —— 导航栏：用更不透明的纯色背景替代模糊 —— */
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: linear-gradient(180deg, rgba(15, 39, 68, 0.98) 0%, rgba(26, 58, 92, 0.96) 100%) !important;
  }
  .navbar.nav-scrolled {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: linear-gradient(180deg, rgba(15, 39, 68, 1) 0%, rgba(15, 39, 68, 0.98) 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  }

  /* —— 设置菜单：纯色替代模糊 —— */
  .settings-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #173253 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
  }

  /* —— 遮罩层：纯色半透明替代模糊 —— */
  .menu-mask {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 22, 40, 0.68) !important;
  }

  /* —— Hero标签：纯色背景替代模糊 —— */
  .hero-tag,
  [class*="hero-tag"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* —— 四角龙纹：移动端完全隐藏（400+ box-shadow 极度昂贵） —— */
  .dragon-pattern,
  #dragon-pattern-tl,
  #dragon-pattern-tr,
  #dragon-pattern-bl,
  #dragon-pattern-br {
    display: none !important;
  }

  /* —— 简化高成本 box-shadow（保留一层浅阴影即可） —— */
  .logo-icon {
    box-shadow: 0 2px 6px rgba(212, 160, 74, 0.25) !important;
  }
  .avatar-btn {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  }
  .avatar-btn::before {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
  }
  .side-drawer {
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2) !important;
  }
  .side-drawer-logo-icon {
    box-shadow: 0 2px 6px rgba(212, 160, 74, 0.22) !important;
  }
  .hamburger-btn:hover {
    box-shadow: 0 2px 6px rgba(212, 160, 74, 0.14) !important;
  }
  .hamburger-btn {
    box-shadow: none !important;
  }
  .side-drawer-close:hover {
    box-shadow: none !important;
  }
  .side-drawer-link:hover {
    box-shadow: none !important;
  }

  /* —— 减少 transform/transition 的 GPU 合成，仅保留主要交互 —— */
  .nav-search-btn,
  .nav-link,
  .nav-link::after,
  .side-drawer-close,
  .hamburger-btn span {
    transition-duration: 0.15s !important;
  }

  /* —— 禁用 hero-buttons 的大型 hover 阴影 —— */
  .btn-primary:hover,
  .btn-outline:hover,
  [class*="btn-"]:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  /* —— 禁用卡片大阴影，保留极浅的单一层 —— */
  .feature-card,
  .attraction-card,
  .footer-seal-btn,
  .section-card,
  [class*="-card"] {
    box-shadow: 0 2px 8px rgba(15, 39, 68, 0.1) !important;
  }
  .feature-card:hover,
  .attraction-card:hover {
    transform: none !important;
    box-shadow: 0 2px 10px rgba(15, 39, 68, 0.14) !important;
  }
}

/* 2) 手机端（<=640px）更激进优化 */
@media (max-width: 640px) {
  /* —— 所有 filter/box-shadow 降到最低 —— */
  * {
    -webkit-tap-highlight-color: transparent;
  }
  /* 禁用 scroll-animate 进入动画（节省 rAF 计算成本），改为直接显示 */
  .scroll-animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
  }
  /* 禁用装饰性动画（float/pulse等） */
  [class*="animate-float"],
  [class*="animate-pulse"],
  [class*="animate-breathe"],
  [class*="animate-rotate-slow"] {
    animation: none !important;
    transition: none !important;
  }
  /* 简化输入框和表单阴影 */
  input, select, textarea, button,
  .form-card,
  .profile-card {
    box-shadow: none !important;
  }
  /* 简化按钮悬浮 */
  .btn-primary:active,
  .btn-outline:active,
  .btn-sms-code:active,
  .btn-danger:active {
    transform: scale(0.98);
  }
  /* 减小 drawer 滑入动画时间，降低 GPU 合成周期 */
  .side-drawer {
    transition: transform 0.22s ease-out !important;
  }
  .menu-mask {
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
  }
  /* will-change 仅用于抽屉展开时的一帧，避免常驻占用GPU */
  .side-drawer {
    will-change: auto !important;
  }
  .side-drawer.show {
    will-change: transform;
  }
}

/* 3) 进一步手机小屏（<=430px）极限优化 */
@media (max-width: 430px) {
  /* 移除所有不必要的装饰阴影 */
  .logo-icon {
    box-shadow: none !important;
  }
  .avatar-btn,
  .avatar-btn::before {
    box-shadow: none !important;
  }
  .hamburger-btn {
    box-shadow: none !important;
  }
  /* 简化边框 */
  .form-card,
  .profile-section,
  .attractions-grid > *,
  .features-grid > * {
    border: 1px solid rgba(212, 160, 74, 0.18) !important;
  }
}

/* 4) 全局：降低 scroll-animate 动画默认 transition 时长（桌面端也受益） */
.scroll-animate {
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}
