/* =========================================================
   董海棠博客 - 升级版全局样式 v2
   设计语言：米色画布 + 琥珀金 + 现代衬线 + 终端美学
   ========================================================= */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700;900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* === 设计 Token === */
:root {
  /* 颜色系统 - 更温润的米色与金色 */
  --haitang-bg: #FBF6EB;
  --haitang-bg-deep: #F5EEDF;
  --haitang-canvas: #F2E8D5;
  --haitang-nav-bg: rgba(251, 246, 235, 0.85);
  --haitang-accent: #C18A4A;
  --haitang-accent-deep: #9C6A33;
  --haitang-accent-warm: #D9A368;
  --haitang-accent-soft: #E5BC8C;
  --haitang-accent-light: rgba(193, 138, 74, 0.12);
  --haitang-text: #2A2620;
  --haitang-text-light: #5C5448;
  --haitang-text-muted: #8E8472;
  --haitang-gallery-bg: #F0E7D2;
  --haitang-about-bg: #F2EBD9;
  --haitang-footer-bg: #1F1B16;
  --haitang-footer-text: #F5EEDF;
  --haitang-footer-muted: rgba(245, 238, 223, 0.6);
  --haitang-tag-bg: #EFDFC3;
  --haitang-tag-text: #8A6332;
  --haitang-border: rgba(74, 56, 32, 0.1);
  --haitang-border-strong: rgba(74, 56, 32, 0.18);
  --haitang-card: #FFFCF5;
  --haitang-card-shadow: 0 1px 2px rgba(74, 56, 32, 0.04), 0 4px 16px rgba(74, 56, 32, 0.06);
  --haitang-card-shadow-hover: 0 4px 12px rgba(74, 56, 32, 0.08), 0 12px 40px rgba(74, 56, 32, 0.12);
  --haitang-danger: #D75757;
  --haitang-success: #4F9F7A;

  /* 字体 - 中文衬线 + 英文现代无衬线 + 等宽 */
  --haitang-font-body: "Inter", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --haitang-font-display: "Noto Serif SC", "Inter", serif;
  --haitang-font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  /* 间距与圆角 */
  --haitang-section-padding: 80px;
  --haitang-nav-height: 76px;
  --haitang-radius-sm: 6px;
  --haitang-radius-md: 12px;
  --haitang-radius-lg: 18px;
  --haitang-radius-xl: 24px;
  --haitang-container: 1240px;
}

/* === 暗色模式 === */
html[data-theme="dark"] {
  --haitang-bg: #15120E;
  --haitang-bg-deep: #1B1812;
  --haitang-canvas: #1F1B14;
  --haitang-nav-bg: rgba(21, 18, 14, 0.88);
  --haitang-text: #F0E8D6;
  --haitang-text-light: #B8AE99;
  --haitang-text-muted: #847A66;
  --haitang-gallery-bg: #1B1812;
  --haitang-about-bg: #1B1812;
  --haitang-tag-bg: #3A2F1E;
  --haitang-tag-text: #D9A368;
  --haitang-border: rgba(245, 238, 223, 0.08);
  --haitang-border-strong: rgba(245, 238, 223, 0.15);
  --haitang-card: #1F1B14;
  --haitang-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4);
  --haitang-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.5);
  --haitang-accent-light: rgba(193, 138, 74, 0.18);
}

/* === 全局画布纹理 === */
body {
  margin: 0;
  font-family: var(--haitang-font-body);
  background-color: var(--haitang-bg);
  background-image:
    radial-gradient(at 12% 8%, rgba(217, 163, 104, 0.08) 0px, transparent 50%),
    radial-gradient(at 88% 92%, rgba(193, 138, 74, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(229, 188, 140, 0.03) 0px, transparent 70%);
  color: var(--haitang-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: 0.005em;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

html { scroll-behavior: smooth; }

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}
/* 工具按钮：生成照片切换 */
.ai-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--haitang-border);
  background: var(--haitang-card);
  color: var(--haitang-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: inherit;
}
.ai-tool-btn:hover {
  background: var(--haitang-border-strong);
  color: var(--haitang-text);
}
.ai-tool-btn.active {
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  border-color: var(--haitang-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.3);
}
.ai-tool-btn svg {
  width: 16px;
  height: 16px;
}
.ai-tool-label {
  letter-spacing: 0.02em;
}
/* 图片消息样式 */
.ai-msg-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  border-radius: 10px;
  margin-top: 6px;
  object-fit: contain;
  background: var(--haitang-bg);
  border: 1px solid var(--haitang-border);
}
.ai-image-cap {
  font-size: 12px;
  color: var(--haitang-text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
a:hover { color: var(--haitang-accent); }

img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul, ol { list-style: none; }

::selection {
  background: var(--haitang-accent);
  color: #fff;
}

/* === 滚动条 === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--haitang-border-strong);
  border-radius: 10px;
  border: 2px solid var(--haitang-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--haitang-accent); }

/* ============ 导航栏 ============ */
.main-navigation-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--haitang-nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--haitang-border);
  height: var(--haitang-nav-height);
  display: flex;
  align-items: center;
  padding: 0 40px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  --nav-pct: 0;
}
.main-navigation-bar.scrolled {
  box-shadow: 0 4px 24px rgba(74, 56, 32, 0.04);
}
/* 顶部滚动进度条 */
.nav-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.nav-progress::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--haitang-accent-warm), var(--haitang-accent));
  transform: scaleX(var(--nav-pct, 0));
  transform-origin: left center;
  transition: transform 0.08s linear;
  box-shadow: 0 0 8px rgba(193, 138, 74, 0.45);
}
.nav-inner {
  width: 100%;
  max-width: var(--haitang-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.nav-left:hover { opacity: 0.85; }
.nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  font-family: var(--haitang-font-display);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  text-indent: -9999px;
  overflow: hidden;
}
.nav-name-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-name {
  font-family: var(--haitang-font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--haitang-text);
  letter-spacing: 0.01em;
}
.nav-subtitle {
  font-size: 11px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--haitang-text-light);
  position: relative;
  transition: color 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--haitang-accent);
  transform: scaleX(0);
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  pointer-events: none;
}
.nav-link:hover {
  color: var(--haitang-text);
  background: transparent;
}
.nav-link:hover::after {
  transform: scaleX(0.7);
  background: var(--haitang-accent-light);
}
.nav-link.active {
  color: var(--haitang-accent);
  font-weight: 600;
}
.nav-link.active::after {
  transform: scaleX(1);
  background: var(--haitang-accent);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--haitang-text-muted);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--haitang-border-strong);
  background: transparent;
  color: var(--haitang-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.theme-toggle:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  transform: rotate(15deg);
  background: var(--haitang-accent-light);
}
/* 搜索按钮 */
.nav-search-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--haitang-border-strong);
  background: transparent;
  color: var(--haitang-text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.nav-search-toggle:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
  transform: scale(1.05);
}
.nav-search-toggle svg {
  width: 16px;
  height: 16px;
}
/* 搜索 modal */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.search-modal {
  width: 92%;
  max-width: 640px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 6px;
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.search-overlay.open .search-modal {
  transform: translateY(0) scale(1);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--haitang-border);
}
.search-input-wrap > svg {
  width: 20px;
  height: 20px;
  color: var(--haitang-text-muted);
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--haitang-text);
  outline: none;
  font-family: inherit;
  min-width: 0;
}
.search-input::placeholder {
  color: var(--haitang-text-muted);
}
.search-hint-key {
  font-size: 11px;
  color: var(--haitang-text-muted);
  padding: 3px 8px;
  border: 1px solid var(--haitang-border);
  border-radius: 4px;
  font-family: monospace;
  flex-shrink: 0;
}
.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.search-section-label {
  font-size: 11px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px 6px;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-radius: 10px;
  margin: 2px 0;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.search-result:hover,
.search-result.active {
  background: var(--haitang-accent-light);
  border-color: var(--haitang-accent);
}
.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--haitang-bg);
  border: 1px solid var(--haitang-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--haitang-accent);
  flex-shrink: 0;
}
.search-result-text {
  flex: 1;
  min-width: 0;
}
.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--haitang-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-desc {
  font-size: 12px;
  color: var(--haitang-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-arrow {
  color: var(--haitang-text-muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.search-result:hover .search-result-arrow,
.search-result.active .search-result-arrow {
  color: var(--haitang-accent);
  transform: translateX(3px);
}
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--haitang-text-muted);
  font-size: 14px;
}
.search-empty strong {
  color: var(--haitang-text);
}
.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--haitang-border);
  font-size: 11px;
  color: var(--haitang-text-muted);
  background: var(--haitang-bg);
}
.search-footer-keys {
  display: flex;
  gap: 12px;
}
.search-footer-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.search-footer-key kbd {
  font-family: monospace;
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--haitang-border);
  border-radius: 3px;
  background: var(--haitang-card);
}
/* AI 对话 modal */
.ai-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  /* 模糊层：只做 backdrop-filter，不带背景色 */
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  contain: layout style;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
/* 独立的遮罩层（伪元素）：只做半透明黑色，不模糊 */
.ai-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 8, 0.4);
  z-index: -1;
  pointer-events: none;
}
/* AI 模态框打开时：把页面内所有高 z-index 元素（导航栏、进度条、toast 等）
   临时压到 modal 之下（z-index 0），让 backdrop-filter 能完整模糊整页背景 */
body.ai-modal-open .main-navigation-bar,
body.ai-modal-open .page-progress,
body.ai-modal-open .nav-progress,
body.ai-modal-open .toast-container,
body.ai-modal-open .modal-overlay {
  z-index: 0 !important;
}
body.ai-modal-open .ai-overlay { z-index: 200; }

/* 整页模糊：用 filter:blur() 把 main 整个模糊掉
   （不能用 backdrop-filter，浏览器对文字会做锐化优化，糊不掉）
   ⚠️ 必须作用在 <main> 上，不能给 body 加（会破坏 fixed 定位，弹窗跟着糊） */
body.ai-modal-open main,
body.ai-modal-open .main-navigation-bar,
body.ai-modal-open .page-progress,
body.ai-modal-open .nav-progress,
body.ai-modal-open .footer,
body.ai-modal-open .page-footer,
body.ai-modal-open .scroll-indicator {
  filter: blur(8px) saturate(140%);
  -webkit-filter: blur(8px) saturate(140%);
  pointer-events: none;
  user-select: none;
  transition: filter 0.25s ease;
}
.ai-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.ai-modal {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: min(78vh, 720px);
  min-height: 540px;
  max-height: calc(100vh - 32px);
  margin: 0 16px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  align-self: center;
  box-sizing: border-box;
}
.ai-overlay.open .ai-modal {
  transform: translateY(0) scale(1);
}
.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--haitang-border);
  background: var(--haitang-bg);
}
.ai-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--haitang-font-display);
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.35);
  position: relative;
  text-indent: -9999px;
  overflow: hidden;
}
.ai-avatar::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5DD39E;
  border: 2px solid var(--haitang-bg);
}
.ai-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--haitang-text);
  line-height: 1.2;
}
.ai-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--haitang-text-muted);
  margin-top: 2px;
}
.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5DD39E;
  box-shadow: 0 0 6px rgba(93, 211, 158, 0.6);
  animation: aiDot 1.6s ease-in-out infinite;
}
@keyframes aiDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.ai-msg-bubble pre code {
  background: none;
  padding: 0;
  display: inline;
}
/* 代码块样式（让 AI 回复里的代码看着舒服） */
.ai-msg-bubble code {
  font-family: var(--haitang-font-mono);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.5;
}
.ai-msg-bubble pre {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  white-space: pre;
  margin: 6px 0;
  font-family: var(--haitang-font-mono);
  font-size: 13px;
  line-height: 1.55;
}
.ai-msg-bubble pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}
.ai-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--haitang-text-muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ai-close:hover {
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 88%;
  animation: aiMsgIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg-bot { align-self: flex-start; }
.ai-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--haitang-bg);
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--haitang-border);
  color: var(--haitang-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  text-indent: -9999px;
  overflow: hidden;
  position: relative; /* 锁住 ::after 伪元素，避免撑满整个 AI 弹窗 */
}
.ai-msg-user .ai-msg-avatar {
  background-color: var(--haitang-accent-light);
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%94%A8%E6%88%B7%E5%A4%B4%E5%83%8F.jpg");
  border-color: var(--haitang-accent);
}
.ai-msg-bubble {
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--haitang-text);
  word-wrap: break-word;
  white-space: pre-wrap;
  border: 1px solid var(--haitang-border);
  background: var(--haitang-card);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  color: #fff;
  border-color: transparent;
}
.ai-msg-error .ai-msg-bubble {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.3);
  color: #C0392B;
}
.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 18px;
}
.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--haitang-text-muted);
  animation: aiTyping 1.2s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--haitang-border);
  background: var(--haitang-bg);
}
.ai-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--haitang-border);
  background: var(--haitang-card);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--haitang-text);
    line-height: 1.5;
    outline: none;
  min-height: 42px;
  max-height: 140px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-input:focus {
  border-color: var(--haitang-accent);
  box-shadow: 0 0 0 3px rgba(193, 138, 74, 0.12);
}
.ai-input::placeholder { color: var(--haitang-text-muted); }
.ai-send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.3);
}
.ai-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.45);
}
.ai-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ai-send svg { width: 18px; height: 18px; }
.ai-footer-tip {
  text-align: center;
  font-size: 11px;
  color: var(--haitang-text-muted);
  padding: 6px 0 8px;
  background: var(--haitang-bg);
}
/* 工具调用卡片（青简检索） */
.ai-msg-tool {
  align-self: flex-start;
  max-width: 360px;
}
.ai-msg-tool-card {
  background: var(--haitang-bg);
  border: 1px solid var(--haitang-border-strong);
  border-left: 3px solid var(--haitang-accent);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.tool-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--haitang-accent);
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.tool-icon {
  font-size: 14px;
  display: inline-block;
  animation: toolSpin 2.4s linear infinite;
}
.tool-header:not(:has(.searching)) ~ .tool-status .tool-icon,
.ai-msg-tool-card:not(:has(.searching)) .tool-icon { animation: none; }
@keyframes toolSpin {
  to { transform: rotate(360deg); }
}
.tool-query {
  color: var(--haitang-text);
  margin-bottom: 4px;
  word-break: break-all;
  font-size: 13px;
}
.tool-query span {
  font-weight: 600;
  color: var(--haitang-accent);
}
.tool-status {
  font-size: 11px;
  color: var(--haitang-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px dashed var(--haitang-border);
  margin-top: 4px;
}
.tool-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--haitang-text-muted);
  flex-shrink: 0;
}
.tool-status.searching {
  color: var(--haitang-accent);
}
.tool-status.searching::before {
  background: var(--haitang-accent);
  box-shadow: 0 0 0 0 rgba(193, 138, 74, 0.4);
  animation: toolPulse 1.2s ease-in-out infinite;
}
.tool-status.found::before { background: #5DD39E; }
.tool-status.empty::before { background: #E0A458; }
.tool-status.error::before { background: #FF6B6B; }
@keyframes toolPulse {
  0% { box-shadow: 0 0 0 0 rgba(193, 138, 74, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(193, 138, 74, 0); }
}
/* 派发卡片（路由分发 @agent） */
.dispatch-card {
  background: rgba(193, 138, 74, 0.04);
  border-left-color: var(--haitang-accent-deep);
}
.dispatch-card .tool-icon {
  animation: none; /* 派发状态不旋转 */
}
.dispatch-card .tool-status.searching {
  color: var(--haitang-accent-deep);
}
.dispatch-card .tool-status.searching::before {
  background: var(--haitang-accent-deep);
  box-shadow: 0 0 0 0 rgba(156, 106, 51, 0.4);
  animation: dispatchPulse 1.2s ease-in-out infinite;
}
@keyframes dispatchPulse {
  0% { box-shadow: 0 0 0 0 rgba(156, 106, 51, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(156, 106, 51, 0); }
}
/* 海棠派发话术 — 轻量过渡指示 */
.dispatch-text {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--haitang-text-muted);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}
.dispatch-text .dispatch-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.dispatch-text .dispatch-task {
  color: var(--haitang-accent);
  font-weight: 600;
}
/* 消息气泡中的链接 */
.ai-msg-bubble a.ai-link {
  color: var(--haitang-accent-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--haitang-accent-soft);
  word-break: break-all;
  transition: all 0.2s ease;
}
.ai-msg-bubble a.ai-link:hover {
  color: #fff;
  background: var(--haitang-accent);
  border-bottom-color: transparent;
  padding: 0 3px;
  border-radius: 3px;
}
/* 智能体对话气泡 */
.ai-msg-agent {
  align-self: flex-start;
  max-width: 85%;
}
.ai-msg-agent .agent-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--haitang-border);
  flex-shrink: 0;
  font-size: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-indent: -9999px;
  overflow: hidden;
}
.agent-haitang {
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
}
.agent-qingjian {
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E9%9D%92%E7%AE%80.jpg");
}
.agent-bubble {
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  background: var(--haitang-bg);
  border: 1px solid var(--haitang-border);
  color: var(--haitang-text);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.agent-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--haitang-accent-deep);
  opacity: 0.8;
}
.agent-text {
  color: var(--haitang-text-light);
}
.agent-done .agent-bubble {
  background: rgba(79, 159, 122, 0.06);
  border-color: rgba(79, 159, 122, 0.18);
}
/* 思考气泡 */
.ai-msg-thinking {
  align-self: flex-start;
  max-width: 80%;
}
.thinking-bubble {
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(193, 138, 74, 0.06);
  border: 1px solid var(--haitang-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--haitang-text-muted);
}
.thinking-header {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
}
/* thinking-header 为空时（statusHtml 为空字符串），不占空间 */
.thinking-header:empty {
  display: none;
}
.thinking-status {
  display: none;
}
.thinking-status-ok {
  display: none;
}
.thinking-dots {
  display: none;
}
.thinking-dots span {
  display: none;
}
.thinking-dots span:nth-child(2) { display: none; }
.thinking-dots span:nth-child(3) { display: none; }
@keyframes checkPop { /* 动画已禁用 */ }
@keyframes thinkDot { /* 动画已禁用 */ }
/* ===== 群聊式多角色对话（v3） ===== */
/* 海棠"主"气泡（精致卡片风，紧凑版） */
.ai-bubble-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 246, 235, 0.95) 100%);
  border: 1px solid rgba(193, 138, 74, 0.18);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  max-width: 100%;
}
.ai-bubble-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(90deg, rgba(193, 138, 74, 0.1) 0%, rgba(193, 138, 74, 0.03) 60%, transparent 100%);
  border-bottom: 1px solid rgba(193, 138, 74, 0.1);
}
.ai-bubble-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--haitang-accent-deep);
  letter-spacing: 0.02em;
  position: relative;
  padding-left: 10px;
}
.ai-bubble-name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #C18A4A 0%, #A67134 100%);
}
.ai-bubble-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--haitang-text-muted);
  background: rgba(193, 138, 74, 0.08);
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  margin-left: auto;
}
.ai-msg-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--haitang-accent-deep);
  opacity: 0.75;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.ai-msg-content {
  color: var(--haitang-text);
  font-size: 14px;
  line-height: 1.5;
  padding: 5px 14px;        /* 第一行距上边框 5px、最后一行距下边框 5px */
  word-wrap: break-word;
}
.ai-msg-content > *:first-child { margin-top: 0 !important; }
.ai-msg-content > *:last-child  { margin-bottom: 0 !important; }
.ai-msg-content strong {
  color: var(--haitang-accent-deep);
  font-weight: 700;
  background: linear-gradient(180deg, transparent 60%, rgba(193, 138, 74, 0.15) 60%);
  padding: 0 2px;
}
.ai-msg-content p { margin: 0 0 8px; }
.ai-msg-content p:last-child { margin-bottom: 0; }
.ai-msg-content .ai-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  background: rgba(193, 138, 74, 0.04);
  border-left: 3px solid var(--haitang-accent);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px 8px 16px;
}
.ai-msg-content .ai-list li {
  position: relative;
  padding: 3px 0 3px 18px;
  font-size: 13.5px;
  color: var(--haitang-text);
  line-height: 1.6;
}
.ai-msg-content .ai-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--haitang-accent);
  font-weight: 700;
}
.ai-msg-content code {
  background: rgba(193, 138, 74, 0.1);
  color: var(--haitang-accent-deep);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
}
.ai-msg-content .ai-code-block {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  overflow-x: auto;
  font-size: 12.5px;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  border: 1px solid rgba(193, 138, 74, 0.15);
}
.ai-msg-content .ai-link {
  color: var(--haitang-accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--haitang-accent);
  transition: all 0.2s ease;
}
.ai-msg-content .ai-link:hover {
  color: var(--haitang-accent-deep);
  border-bottom-style: solid;
  background: rgba(193, 138, 74, 0.08);
  padding: 0 2px;
  border-radius: 2px;
}

/* 海棠主气泡底部"快捷链接"按钮组 */
.ai-bubble-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
  margin-top: -2px;
}
.ai-bubble-link-btn {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--haitang-accent-deep);
  background: rgba(193, 138, 74, 0.08);
  border: 1px solid rgba(193, 138, 74, 0.22);
  border-radius: 8px;
  padding: 4px 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-bubble-link-btn:hover {
  background: linear-gradient(135deg, #C18A4A 0%, #A67134 100%);
  color: #fff;
  border-color: transparent;
  transform: translateX(0);
  box-shadow: 0 2px 6px rgba(193, 138, 74, 0.28);
}

/* ===== 海棠「文章卡片」列表（每篇一卡：标题 + 分类 + 日期 + 进入文章）===== */
.ai-article-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 14px 10px;
}
.ai-article-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 246, 235, 0.7) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(193, 138, 74, 0.16);
  text-decoration: none;
  color: var(--haitang-text);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.ai-article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--haitang-accent) 0%, rgba(193, 138, 74, 0.2) 100%);
  opacity: 0.6;
  transition: opacity 0.25s ease, width 0.25s ease;
}
.ai-article-card:hover {
  border-color: rgba(193, 138, 74, 0.42);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 246, 235, 0.92) 100%);
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.14), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ai-article-card:hover::before {
  opacity: 1;
  width: 4px;
}
.ai-article-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--haitang-text);
  line-height: 1.4;
}
.ai-article-card-icon {
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}
.ai-article-card-title {
  flex: 1;
  word-break: break-word;
  /* 限制两行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-article-card:hover .ai-article-card-title {
  color: var(--haitang-accent-deep);
}
.ai-article-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(80, 60, 40, 0.55);
  flex-wrap: wrap;
}
.ai-article-card-meta > * + *::before {
  content: '·';
  margin-right: 8px;
  color: rgba(80, 60, 40, 0.3);
}
.ai-article-cat {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(193, 138, 74, 0.12);
  color: var(--haitang-accent-deep);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.ai-article-date {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(80, 60, 40, 0.5);
}
.ai-article-card-cta {
  font-size: 12px;
  color: var(--haitang-accent);
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  align-self: flex-end;
  margin-top: -2px;
}
.ai-article-card:hover .ai-article-card-cta {
  opacity: 1;
  color: var(--haitang-accent-deep);
}

/* 海棠专属头像（使用真实头像，移除 ::after 避免撑满 modal） */
.ai-avatar-haitang {
  text-indent: -9999px;
  overflow: hidden;
  background-color: var(--haitang-accent);
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* 用户头像（保留原图） */
.ai-msg-user .ai-msg-avatar {
  text-indent: 0;
  font-size: 13px;
  color: #fff;
}
/* @提及 高亮 */
.ai-mention {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(193, 138, 74, 0.18), rgba(232, 184, 119, 0.22));
  color: var(--haitang-accent-deep);
  font-weight: 600;
  font-size: 12px;
  margin: 0 2px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(193, 138, 74, 0.3);
}
/* thinking 气泡文字 */
.thinking-text {
  color: var(--haitang-text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.thinking-bubble {
  flex-wrap: wrap;
}
/* 棣棠头像（绿色主题 + 真实头像） */
.ai-msg-avatar.agent-ditang {
  background-color: #7BB389;
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/image/2026/08/%E6%A3%A3%E6%A3%A0%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;          /* 隐藏文字，让头像图透出 */
  text-indent: -9999px;        /* 兜底：把 emoji 文字推到看不见 */
  border-color: rgba(123, 179, 137, 0.4);
  box-shadow: 0 1px 3px rgba(123, 179, 137, 0.18);
}
/* Agent 标签行 */
.agent-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.agent-label {
  font-size: 11px;
  font-weight: 700;
  color: #5E9C72;
  background: rgba(123, 179, 137, 0.12);
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}
.agent-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.agent-status-ok {
  background: rgba(93, 211, 158, 0.18);
  color: #3A9C70;
  border: 1px solid rgba(93, 211, 158, 0.3);
}
.agent-status-err {
  background: rgba(255, 107, 107, 0.12);
  color: #C0392B;
  border: 1px solid rgba(255, 107, 107, 0.3);
}
/* Agent 数据折叠详情 */
.agent-data-details {
  margin-top: 6px;
  font-size: 12px;
  border-top: 1px dashed var(--haitang-border);
  padding-top: 6px;
}
.agent-data-details summary {
  cursor: pointer;
  color: var(--haitang-accent);
  font-weight: 500;
  user-select: none;
  outline: none;
}
.agent-data-details summary:hover {
  color: var(--haitang-accent-deep);
}
.agent-data-details ul {
  margin: 6px 0 0 0;
  padding: 0 0 0 16px;
  list-style: disc;
  color: var(--haitang-text-light);
}
.agent-data-details li {
  margin: 2px 0;
  line-height: 1.5;
  word-break: break-all;
}
/* Agent 失败态 */
.agent-failed .agent-bubble,
.agent-failed.agent-bubble {
  background: rgba(255, 107, 107, 0.04);
  border-color: rgba(255, 107, 107, 0.2);
}
/* 群聊流式：thinking 状态旋转动效保留 */
.ai-msg-thinking .thinking-bubble {
  background: linear-gradient(135deg, rgba(193, 138, 74, 0.04), rgba(232, 184, 119, 0.08));
  border-color: rgba(193, 138, 74, 0.2);
}
/* 群聊 agent 气泡背景 */
.ai-msg-agent .agent-bubble {
  background: linear-gradient(135deg, rgba(123, 179, 137, 0.04), rgba(123, 179, 137, 0.08));
  border-color: rgba(123, 179, 137, 0.25);
}
.ai-msg-agent.agent-done .agent-bubble {
  background: linear-gradient(135deg, rgba(93, 211, 158, 0.06), rgba(123, 179, 137, 0.1));
  border-color: rgba(93, 211, 158, 0.25);
}
/* 搜索结果卡片 */
.ai-result-block {
  display: block;
  margin: 1px 0;
  padding: 7px 28px 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--haitang-border);
  border-left: 3px solid var(--haitang-accent-soft);
  background: var(--haitang-bg);
  text-decoration: none;
  color: var(--haitang-text);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ai-result-block::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--haitang-accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}
.ai-result-block:hover {
  border-color: var(--haitang-accent-soft);
  background: var(--haitang-card);
  box-shadow: 0 2px 12px rgba(74, 56, 32, 0.08);
  transform: translateX(3px);
}
.ai-result-block:hover::after {
  transform: scaleY(1);
}
.ai-result-block .result-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--haitang-accent-deep);
  margin-bottom: 3px;
  line-height: 1.25;
}
.ai-result-block .result-desc {
  display: block;
  font-size: 11px;
  color: var(--haitang-text-light);
  line-height: 1.35;
  margin-bottom: 2px;
}
.ai-result-block .result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ai-result-block .result-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  background: var(--haitang-tag-bg);
  color: var(--haitang-tag-text);
  line-height: 1.6;
}
.ai-result-block .result-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--haitang-accent);
  margin-right: 4px;
  padding-right: 6px;
  border-right: 1px solid var(--haitang-border);
}
.ai-result-block .result-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--haitang-accent);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.25s ease, right 0.25s ease;
}
.ai-result-block:hover .result-arrow {
  opacity: 1;
  right: 6px;
}
.ai-msg-user .ai-msg-bubble a.ai-link {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}
.ai-msg-user .ai-msg-bubble a.ai-link:hover {
  background: rgba(255, 255, 255, 0.18);
}
/* 语言切换 */
.lang-switcher {
  position: relative;
}
.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--haitang-border-strong);
  background: transparent;
  color: var(--haitang-text-light);
  font-family: var(--haitang-font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.lang-switcher-btn:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
}
.lang-switcher-btn .lang-current {
  font-weight: 600;
  letter-spacing: 0.5px;
}
.lang-switcher-btn .caret {
  font-size: 9px;
  opacity: 0.7;
}
.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--haitang-bg);
  border: 1px solid var(--haitang-border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.lang-switcher.open .lang-switcher-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--haitang-text);
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}
.lang-option:hover { background: var(--haitang-accent-light); }
.lang-option.active {
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
  font-weight: 600;
}
.lang-option .check {
  opacity: 0;
  font-size: 12px;
  color: var(--haitang-accent);
}
.lang-option.active .check { opacity: 1; }
.nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--haitang-border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
}
.nav-mobile-toggle span {
  height: 2px;
  background: var(--haitang-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ Hero ============ */
.hero-section {
  padding: 60px 50px 80px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  max-width: var(--haitang-container);
  margin: 0 auto;
  position: relative;
  min-height: calc(100vh - var(--haitang-nav-height));
  box-sizing: border-box;
}
.hero-left { min-width: 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: var(--haitang-accent);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 14px;
  background: var(--haitang-accent-light);
  border-radius: 999px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--haitang-accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hero-left h1 {
  font-family: var(--haitang-font-display);
  font-size: 72px;
  font-weight: 500;
  color: var(--haitang-text-muted);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: -8px;
}
.hero-left h2 {
  font-family: var(--haitang-font-display);
  font-size: 96px;
  font-weight: 900;
  color: var(--haitang-text);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--haitang-accent-deep) 0%, var(--haitang-accent) 40%, var(--haitang-accent-warm) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
  overflow: visible;
  white-space: nowrap;
}
.hero-left h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--haitang-accent);
  border-radius: 2px;
  margin-top: 24px;
}
.hero-tagline {
  font-size: 18px;
  color: var(--haitang-text-light);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
  font-weight: 400;
}
.hero-tagline strong {
  color: var(--haitang-text);
  font-weight: 600;
}
.hero-tagline em {
  font-family: var(--haitang-font-display);
  color: var(--haitang-accent);
  font-style: italic;
  font-weight: 600;
}
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-meta-value {
  font-family: var(--haitang-font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1;
}
.hero-meta-label {
  font-size: 12px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-right {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 540px;
  max-width: 45vw;
  z-index: 1;
}
.terminal-window {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(74, 56, 32, 0.18), 0 2px 8px rgba(74, 56, 32, 0.1);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.terminal-window:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 20px 60px rgba(74, 56, 32, 0.25), 0 4px 12px rgba(74, 56, 32, 0.12);
}
.terminal-titlebar {
  height: 36px;
  background: linear-gradient(180deg, #3A3328, #2A241C);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  border-radius: 14px 14px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.terminal-dot.red { background: #FF5F57; }
.terminal-dot.yellow { background: #FFBD2E; }
.terminal-dot.green { background: #28C840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
}
.terminal-body {
  background: linear-gradient(180deg, #1F1B16, #18140F);
  padding: 18px 20px;
  font-family: var(--haitang-font-mono);
  font-size: 13px;
  color: #E0D5C0;
  min-height: 100px;
  line-height: 1.8;
}
.terminal-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
}
.terminal-line + .terminal-line { margin-top: 4px; }
.tw-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--haitang-accent-soft);
  margin-left: 2px;
  animation: tw-blink 0.8s step-end infinite;
  vertical-align: -2px;
}
@keyframes tw-blink { 50% { opacity: 0; } }
.hw-wrap {
  font-family: var(--haitang-font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #FFFFFF;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 200px;
  display: block;
}
.hw-wrap code {
  font-family: inherit;
  color: inherit;
  font-size: inherit;
  background: transparent;
  padding: 0;
  white-space: pre;
}
/* 三行结构：注释 / 代码 / 输出或错误 */
.hw-line { display: block; }
.hw-line.hw-comment { color: rgba(255, 255, 255, 0.42); font-style: italic; }
.hw-line.hw-code    { color: #C8BFA8; }            /* 写代码中：暖米色（参考图片） */
.hw-line.hw-out     { color: rgba(255, 255, 255, 0.85); }
.hw-line.hw-out.hw-ok  { color: #98C379; font-weight: 600; }  /* 成功输出：柔和绿 */
.hw-line.hw-out.hw-err { color: #FF6B6B; font-weight: 600; }  /* 错误：亮红 */
/* 简易语法高亮（深色背景） */
.hw-wrap .kw { color: #E5BC8C; font-weight: 600; }
.hw-wrap .str { color: #9CC5D4; }
.hw-wrap .com { color: rgba(255, 255, 255, 0.45); font-style: italic; }
.hw-wrap .num { color: #F0CFA8; }
.hw-wrap .fn { color: #D9A368; }
.hw-wrap .pre { color: #B07F4E; }
.hw-wrap .pun { color: rgba(255, 255, 255, 0.7); }
.terminal-body .prompt {
  color: var(--haitang-accent-warm);
  font-weight: 700;
}
.terminal-body .output {
  color: #8FB47A;
}
.terminal-body .comment {
  color: #6B6256;
}
.terminal-actions {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.terminal-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.terminal-action:hover {
  background: var(--haitang-accent);
  color: #fff;
  border-color: var(--haitang-accent);
}

.hero-floating {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.hero-floating-1 {
  top: -40px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--haitang-accent-warm), transparent 70%);
  opacity: 0.2;
  filter: blur(20px);
}
.hero-floating-2 {
  bottom: -30px;
  left: 20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--haitang-accent-soft), transparent 70%);
  opacity: 0.15;
  filter: blur(30px);
}
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--haitang-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bounce 2.2s infinite;
  cursor: pointer;
  z-index: 5;
}
.scroll-hint-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, transparent, var(--haitang-text-muted));
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============ 区块标题 ============ */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 20px;
}
.section-header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.section-tag {
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: var(--haitang-accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-tag::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--haitang-accent);
}
.section-title {
  font-family: var(--haitang-font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 15px;
  color: var(--haitang-text-muted);
  margin-top: 8px;
  max-width: 580px;
}
.view-all {
  font-size: 14px;
  color: var(--haitang-text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--haitang-border-strong);
  transition: all 0.3s ease;
  background: var(--haitang-card);
}
.view-all:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
  transform: translateX(4px);
}

/* ============ 博客卡片 ============ */
.blog-section {
  padding: 100px 50px;
  max-width: var(--haitang-container);
  margin: 0 auto;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.blog-card {
  background: var(--haitang-card);
  border-radius: var(--haitang-radius-lg);
  overflow: hidden;
  box-shadow: var(--haitang-card-shadow);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--haitang-border);
  position: relative;
}
.blog-card.card-leaving {
  opacity: 0 !important;
  transform: translateY(20px) scale(0.95) !important;
  pointer-events: none;
}
.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--haitang-radius-lg);
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  filter: blur(20px);
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--haitang-card-shadow-hover);
  border-color: var(--haitang-accent-soft);
}
.blog-card-img {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.blog-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.18));
}
.blog-card-img.gradient-1 { background: linear-gradient(135deg, #F6C77A, #C18A4A); }
.blog-card-img.gradient-2 { background: linear-gradient(135deg, #8DCBE6, #4A90A4); }
.blog-card-img.gradient-3 { background: linear-gradient(135deg, #7FB7E0, #5B7FA8); }
.blog-card-img.gradient-4 { background: linear-gradient(135deg, #E6B980, #B07F4E); }
.blog-card-img.gradient-5 { background: linear-gradient(135deg, #F2A65A, #CC6B3E); }
.blog-card-img.gradient-6 { background: linear-gradient(135deg, #A8C9D8, #6B8FA8); }
.blog-card-img.gradient-7 { background: linear-gradient(135deg, #D89A6E, #8B5A3E); }
.blog-card-img.gradient-8 { background: linear-gradient(135deg, #B5A77A, #6B5F3E); }
.blog-card-tags {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.blog-card-tag {
  background: rgba(255, 255, 255, 0.92);
  color: var(--haitang-accent-deep);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  line-height: 1;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}
.blog-card-body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-card-title {
  font-family: var(--haitang-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.blog-card:hover .blog-card-title { color: var(--haitang-accent); }
.blog-card-desc {
  font-size: 14px;
  color: var(--haitang-text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 13px;
  color: var(--haitang-text-muted);
  border-top: 1px solid var(--haitang-border);
  margin-top: auto;
}
.blog-card-date {
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.blog-card-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  font-weight: 500;
}
.blog-card-likes:hover,
.blog-card-likes.liked {
  color: var(--haitang-danger);
}
.blog-card-likes.liked svg { animation: heart-pop 0.4s ease; }
@keyframes heart-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ============ 分页 ============ */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}
.gallery-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--haitang-border-strong);
  background: var(--haitang-card);
  color: var(--haitang-text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-family: var(--haitang-font-mono);
}
.page-btn:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
}
.page-btn.active {
  background: var(--haitang-accent);
  color: #fff;
  border-color: var(--haitang-accent);
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.3);
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-arrow {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--haitang-border-strong);
  background: var(--haitang-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--haitang-text-light);
}
.page-arrow:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
}
.page-arrow:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 画廊 ============ */
.gallery-section {
  background: var(--haitang-gallery-bg);
  padding: 100px 50px;
  transition: background-color 0.3s ease;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gallery-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--haitang-border-strong), transparent);
}
.gallery-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--haitang-border-strong), transparent);
}
.gallery-inner {
  max-width: var(--haitang-container);
  margin: 0 auto;
  width: 100%;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gallery-card {
  position: relative;
  border-radius: var(--haitang-radius-lg);
  overflow: hidden;
  min-height: 240px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--haitang-border);
  box-shadow: var(--haitang-card-shadow);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.gallery-card.large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 420px;
  align-items: flex-end;       /* 内容靠下排，方便文字贴左下角 */
  justify-content: flex-start;
  padding: 0;
}
.gallery-card.small {
  min-height: 200px;
  border-radius: var(--haitang-radius-md);
}
.gallery-card.small .gallery-overlay {
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6) 100%);
  transition: background 0.35s ease;
}
.gallery-card.small:hover .gallery-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.7) 100%);
}
.gallery-card-info {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  text-align: left;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.gallery-card.small:hover .gallery-card-info { opacity: 1; transform: translateY(0); }
.gallery-info-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin-bottom: 3px;
  font-family: var(--haitang-font-display);
}
.gallery-info-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.gallery-card-date {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--haitang-font-mono);
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  letter-spacing: 0.05em;
  pointer-events: none;
}
.gallery-bg-1 { background: url('https://blogcloudystem.cn-sy1.rains3.com/%E7%9B%B8%E5%86%8C/%E7%94%9F%E6%88%90%E5%A5%BD%E7%9C%8B%E9%A3%8E%E6%99%AF%E7%85%A7.png') center/cover no-repeat; }
.gallery-bg-2 { background: linear-gradient(135deg, #6B4F2E, #C18A4A); }
.gallery-bg-music { background: url('https://blogcloudystem.cn-sy1.rains3.com/%E7%9B%B8%E5%86%8C/%E9%9F%B3%E4%B9%90.png') center/cover no-repeat; }
.gallery-bg-music .gallery-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%); }
.gallery-card:hover .gallery-bg-music .gallery-overlay,
.gallery-card.large:hover .gallery-bg-music .gallery-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%); }
.gallery-bg-3 { background: linear-gradient(135deg, #8FA6B8, #5B7FA8); }
.gallery-bg-4 { background: linear-gradient(135deg, #E6B980, #B07F4E); }
.gallery-bg-5 { background: linear-gradient(135deg, #7BA7B8, #A8C9D8); }
.gallery-bg-6 { background: linear-gradient(135deg, #D89A6E, #B05A3E); }
.gallery-bg-7 { background: linear-gradient(135deg, #5B5B5B, #8A8A8A); }
.gallery-bg-8 { background: linear-gradient(135deg, #B07F4E, #6B4F2E); }
.gallery-bg-9 { background: linear-gradient(135deg, #4A90A4, #2C5F70); }
.gallery-bg-10 { background: linear-gradient(135deg, #C18A4A, #8B5A2E); }

/* 音乐封面渐变别名（与 gallery-bg-N 同色，兼容历史 bg_class 数据） */
.music-bg-1  { background: linear-gradient(135deg, #6B4F2E, #C18A4A); }
.music-bg-2  { background: linear-gradient(135deg, #E6B980, #B07F4E); }
.music-bg-3  { background: linear-gradient(135deg, #8FA6B8, #5B7FA8); }
.music-bg-4  { background: linear-gradient(135deg, #7BA7B8, #A8C9D8); }
.music-bg-5  { background: linear-gradient(135deg, #D89A6E, #B05A3E); }
.music-bg-6  { background: linear-gradient(135deg, #5B5B5B, #8A8A8A); }
.music-bg-7  { background: linear-gradient(135deg, #B07F4E, #6B4F2E); }
.music-bg-8  { background: linear-gradient(135deg, #4A90A4, #2C5F70); }
.music-bg-9  { background: linear-gradient(135deg, #C18A4A, #8B5A2E); }
.music-bg-10 { background: linear-gradient(135deg, #6B4F2E, #8B5A2E); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
  transition: background 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.gallery-card:hover .gallery-overlay { background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%); }
.gallery-card:hover .gallery-inner-content { transform: translateY(-4px); }
/* 小卡片默认隐藏文字，hover 显示 */
.gallery-card:not(.large) .gallery-inner-content { opacity: 0; transition: opacity 0.35s ease, transform 0.4s ease; }
.gallery-card:not(.large):hover .gallery-inner-content { opacity: 1; }
.gallery-card.large:hover .gallery-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.15) 20%, rgba(0,0,0,0.7) 100%); }
.gallery-card.large .gallery-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.6) 100%);
}
.gallery-card-brand {
  position: absolute;
  left: 24px;
  bottom: 64px;
  text-align: left;
  color: #fff;
  z-index: 2;
  max-width: 70%;
}
.gallery-card-brand .gallery-label-main {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 6px;
}
.gallery-card-brand .gallery-label-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.gallery-card-brand .gallery-label-en {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  font-family: var(--haitang-font-mono);
}
.gallery-card-btn {
  position: absolute;
  left: 24px;
  bottom: 24px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  z-index: 2;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-block;
}
.gallery-card-btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-1px);
}
.gallery-card-corner {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.88);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.gallery-card-corner::after { content: "→"; margin-left: 2px; transition: transform 0.25s ease; }
.gallery-card:hover .gallery-card-corner::after { transform: translateX(3px); }
.gallery-inner-content {
  transition: transform 0.4s ease;
  text-align: center;
  color: #fff;
  z-index: 2;
  position: relative;
}
.gallery-label-main {
  font-family: var(--haitang-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.gallery-card.large .gallery-label-main { font-size: 32px; }
.gallery-label-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
}

/* ============ 关于我 ============ */
.about-section {
  background: var(--haitang-about-bg);
  padding: 100px 50px;
  transition: background-color 0.3s ease;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-inner {
  max-width: var(--haitang-container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.about-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

.about-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: sticky;
  top: 100px;
}
.about-avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid var(--haitang-bg);
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  font-family: var(--haitang-font-display);
  box-shadow: 0 0 0 1px var(--haitang-accent-soft), 0 12px 30px rgba(193, 138, 74, 0.25);
  position: relative;
  text-indent: -9999px;
  overflow: hidden;
}
.about-avatar-img::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed var(--haitang-accent-soft);
  opacity: 0.4;
  animation: rotate 30s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.about-name {
  font-family: var(--haitang-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--haitang-text);
  letter-spacing: 0.02em;
}
.about-subtitle {
  font-size: 13px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.05em;
}
.about-desc-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-desc-wrap p {
  font-size: 16px;
  color: var(--haitang-text-light);
  line-height: 1.85;
  font-family: var(--haitang-font-display);
  font-weight: 400;
}
.highlight {
  color: var(--haitang-accent);
  font-weight: 600;
  background: linear-gradient(180deg, transparent 60%, var(--haitang-accent-light) 60%);
  padding: 0 2px;
}
.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.skill-tag {
  padding: 7px 16px;
  background: var(--haitang-card);
  color: var(--haitang-text);
  border: 1px solid var(--haitang-border-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}
.skill-tag:hover {
  background: var(--haitang-accent);
  color: #fff;
  border-color: var(--haitang-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.3);
}
.contact-btn {
  align-self: flex-start;
  background: var(--haitang-accent);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(193, 138, 74, 0.3);
}
.contact-btn:hover {
  background: var(--haitang-accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(193, 138, 74, 0.4);
}
.contact-btn svg { transition: transform 0.3s ease; }
.contact-btn:hover svg { transform: translateX(3px); }

/* ============ Footer ============ */
.footer-section {
  background: var(--haitang-footer-bg);
  color: var(--haitang-footer-text);
  padding: 80px 50px 40px;
  position: relative;
  overflow: hidden;
}
.footer-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--haitang-accent-warm), transparent);
}
.footer-content {
  max-width: var(--haitang-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-left-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  background-image: url("https://blogcloudystem.cn-sy1.rains3.com/%E5%8D%9A%E5%AE%A2%E5%90%8E%E5%8F%B0/%E7%AE%A1%E7%90%86%E5%91%98%E5%A4%B4%E5%83%8F.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--haitang-font-display);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 16px rgba(193, 138, 74, 0.3);
  text-indent: -9999px;
  overflow: hidden;
}
.footer-site-name {
  font-family: var(--haitang-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.footer-desc {
  font-size: 14px;
  color: var(--haitang-footer-muted);
  line-height: 1.8;
  max-width: 320px;
}
.footer-copy-sm {
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: var(--haitang-footer-muted);
  letter-spacing: 0.05em;
}
.footer-middle h4,
.footer-right h4 {
  font-family: var(--haitang-font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--haitang-accent-soft);
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav-list a {
  font-size: 14px;
  color: var(--haitang-footer-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}
.footer-nav-list a:hover {
  color: var(--haitang-accent-warm);
  transform: translateX(4px);
}
.footer-social-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--haitang-footer-text);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--haitang-font-mono);
}
.social-icon:hover {
  background: var(--haitang-accent);
  transform: translateY(-3px);
  border-color: var(--haitang-accent);
  box-shadow: 0 8px 20px rgba(193, 138, 74, 0.4);
}
.subscribe-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.subscribe-desc {
  font-size: 12px;
  color: var(--haitang-footer-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.subscribe-form { display: flex; gap: 0; }
.subscribe-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 13px;
  border-radius: 10px 0 0 10px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
}
.subscribe-input:focus { border-color: var(--haitang-accent); }
.subscribe-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.subscribe-btn {
  padding: 12px 22px;
  background: var(--haitang-accent);
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: inherit;
}
.subscribe-btn:hover { background: var(--haitang-accent-deep); }
.footer-copyright-lg {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--haitang-font-mono);
  font-size: 12px;
  color: var(--haitang-footer-muted);
  letter-spacing: 0.05em;
}

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--haitang-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.25);
}
.btn-primary:hover {
  background: var(--haitang-accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(193, 138, 74, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--haitang-text);
  border: 1px solid var(--haitang-border-strong);
}
.btn-ghost:hover {
  border-color: var(--haitang-accent);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
}
.btn-block { width: 100%; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--haitang-text);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 18px;
  border: 1px solid var(--haitang-border-strong);
  border-radius: 12px;
  background: var(--haitang-card);
  color: var(--haitang-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--haitang-accent);
  box-shadow: 0 0 0 3px var(--haitang-accent-light);
  background: var(--haitang-bg);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--haitang-text-muted); }
.form-hint {
  font-size: 12px;
  color: var(--haitang-text-muted);
  margin-top: 6px;
}
.form-error {
  font-size: 12px;
  color: var(--haitang-danger);
  margin-top: 6px;
  display: none;
}
.form-error.show { display: block; }
.form-input.invalid,
.form-textarea.invalid { border-color: var(--haitang-danger); }

/* ============ 卡片容器 ============ */
.card {
  background: var(--haitang-card);
  border-radius: var(--haitang-radius-lg);
  box-shadow: var(--haitang-card-shadow);
  padding: 28px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid var(--haitang-border);
}
.card:hover { box-shadow: var(--haitang-card-shadow-hover); }

/* ============ 标签 / 徽章 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--haitang-tag-bg);
  color: var(--haitang-tag-text);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge-accent {
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
}

/* ============ 搜索框 ============ */
.blog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--haitang-border);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
.search-box { position: relative; display: flex; align-items: center; flex: 1; }
.search-input {
  width: 100%;
  padding: 10px 18px 10px 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--haitang-bg);
  color: var(--haitang-text);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}
.search-input::placeholder { color: var(--haitang-text-muted); }
.search-input:hover { background: rgba(193, 138, 74, 0.04); }
.search-input:focus {
  background: #fff;
  border-color: var(--haitang-accent-soft);
  box-shadow: 0 0 0 3px var(--haitang-accent-light);
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--haitang-text-muted);
  pointer-events: none;
  z-index: 1;
}
.sort-select {
  flex-shrink: 0;
  width: auto;
  min-width: 140px;
  padding: 9px 36px 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--haitang-bg);
  color: var(--haitang-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23806b4d' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  transition: all 0.25s ease;
}
.sort-select:hover {
  background-color: rgba(193, 138, 74, 0.05);
  border-color: var(--haitang-border);
}
.sort-select:focus {
  background-color: #fff;
  border-color: var(--haitang-accent-soft);
  box-shadow: 0 0 0 3px var(--haitang-accent-light);
}

/* ============ Tab 切换 ============ */
.tab-bar {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 32px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--haitang-card-shadow);
  overflow-x: auto;
  overflow-y: hidden;          /* 避免 indicator 溢出 */
  scrollbar-width: none;
  max-width: 100%;
  position: relative;          /* indicator 定位基准 */
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-indicator {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  min-width: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--haitang-accent) 0%, var(--haitang-accent-deep) 100%);
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.4, 1), width 0.45s cubic-bezier(0.34, 1.4, 0.4, 1), opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
.tab-indicator.show { opacity: 1; }
.tab-item {
  padding: 8px 18px;
  font-size: 13px;
  color: var(--haitang-text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 999px;
  position: relative;
  z-index: 1;                  /* 文字在 indicator 之上 */
  transition: color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-item:hover { color: var(--haitang-text); }
.tab-item.active {
  color: #fff;
  font-weight: 600;
  transform: translateY(-1px);
}
.tab-item.active::after { display: none; }
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  color: var(--haitang-accent);
  transition: color 0.25s ease, transform 0.25s ease;
}
.tab-item:hover .tab-icon { transform: rotate(-8deg) scale(1.1); }
.tab-item.active .tab-icon {
  color: #fff;
  transform: scale(1.05);
}

/* Tab 切换时网格淡入淡出 */
.gallery-grid {
  transition: opacity 0.25s ease, transform 0.35s ease;
}
.gallery-grid.tab-fading-out {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.gallery-grid.tab-fading-in {
  opacity: 0;
  transform: translateY(8px);
  animation: gridFadeIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes gridFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 卡片 stagger reveal */
.gallery-card.small {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gallery-card.small.staggered {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 模态框 / 灯箱 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--haitang-card);
  border-radius: var(--haitang-radius-xl);
  padding: 36px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}
.modal-overlay.open .modal-box { transform: scale(1); }

/* === AI 访问白名单弹窗：非 admin 账号看到的"AI 优化中"提示 === */
/* 独立定位：基于视口（vw/vh）100% 覆盖 + 弹窗本体 translate(-50%,-50%) 居中
   不复用 .modal-overlay 的 flex 居中，避免 body 偏移 / 父容器高度影响 */
.ai-lock-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  inset: auto !important;
  z-index: 9999 !important;
  background: rgba(15, 12, 8, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ai-lock-modal.open { opacity: 1; visibility: visible; }
.ai-lock-modal .ai-lock-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  max-width: 420px;
  width: calc(100% - 48px);
  background: var(--haitang-card);
  border-radius: var(--haitang-radius-xl);
  padding: 38px 32px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}
.ai-lock-modal.open .ai-lock-box { transform: translate(-50%, -50%) scale(1); }
.ai-lock-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 6px rgba(193, 138, 74, 0.25));
}
.ai-lock-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--haitang-text);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.ai-lock-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--haitang-text-muted, #8a6a4a);
  margin: 0 0 22px;
}
.ai-lock-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 9px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #c18a4a 0%, #d9a368 100%);
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  letter-spacing: 0.05em;
}
.ai-lock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(193, 138, 74, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.04);
}
.ai-lock-btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--haitang-text-muted);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.modal-close:hover {
  background: var(--haitang-bg);
  color: var(--haitang-text);
}
.modal-title {
  font-family: var(--haitang-font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--haitang-text);
  letter-spacing: -0.01em;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-content {
  width: 80%;
  height: 80%;
  border-radius: var(--haitang-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-caption {
  margin-top: 20px;
  font-family: var(--haitang-font-display);
  font-size: 20px;
  font-weight: 700;
}
.lightbox-sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

/* ============ Toast 提示 ============ */
.toast-container {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--haitang-card);
  border-left: 3px solid var(--haitang-accent);
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(74, 56, 32, 0.15);
  font-size: 14px;
  color: var(--haitang-text);
  min-width: 260px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  pointer-events: auto;
  border: 1px solid var(--haitang-border);
}
.toast.success { border-left-color: var(--haitang-success); }
.toast.error { border-left-color: var(--haitang-danger); }
.toast.fade-out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(40px); }
}

/* ============ 滚动揭示动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ============ 页面切换动画 ============ */
.page-fade-in {
  animation: pageFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.page-fade-out {
  animation: pageFadeOut 0.35s cubic-bezier(0.4, 0, 0.6, 1) both;
}
@keyframes pageFadeOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-8px); }
}
/* 顶部进度条（页面切换用） */
.page-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--haitang-accent), var(--haitang-accent-warm));
  z-index: 9999;
  width: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 0 8px var(--haitang-accent-soft);
  opacity: 1;
}
.page-progress.done {
  width: 100%;
  opacity: 0;
}

/* ============ 骨架屏 ============ */
.skeleton {
  background: linear-gradient(90deg, var(--haitang-border) 25%, rgba(193, 138, 74, 0.08) 50%, var(--haitang-border) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--haitang-radius-md);
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ 页面通用容器 ============ */
.page-main {
  min-height: calc(100vh - var(--haitang-nav-height) - 300px);
  padding: 50px 50px;
  max-width: var(--haitang-container);
  margin: 0 auto;
}
.page-title {
  font-family: var(--haitang-font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--haitang-text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.page-subtitle {
  font-size: 15px;
  color: var(--haitang-text-muted);
  margin-bottom: 28px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--haitang-text-muted);
  margin-bottom: 16px;
  font-family: var(--haitang-font-mono);
  letter-spacing: 0.03em;
}
.breadcrumb a:hover { color: var(--haitang-accent); }
.breadcrumb-sep { color: var(--haitang-text-muted); opacity: 0.5; }

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 70px 20px 60px;
  color: var(--haitang-text-muted);
  position: relative;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 22px;
  box-shadow: var(--haitang-card-shadow);
  overflow: hidden;
}
.empty-state-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.empty-state-bubble {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-light), transparent);
  opacity: 0.55;
  filter: blur(0.5px);
  animation: bubbleFloat 6s ease-in-out infinite;
}
.empty-state-bubble-1 {
  width: 140px; height: 140px;
  top: -40px; right: -30px;
  animation-delay: 0s;
}
.empty-state-bubble-2 {
  width: 90px; height: 90px;
  bottom: -20px; left: 10%;
  animation-delay: 1.6s;
  opacity: 0.4;
}
.empty-state-bubble-3 {
  width: 60px; height: 60px;
  top: 30%; right: 18%;
  animation-delay: 3.2s;
  opacity: 0.35;
}
@keyframes bubbleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(8px, -10px) scale(1.05); }
}
.empty-state-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--haitang-accent);
  background: linear-gradient(135deg, var(--haitang-accent-light), transparent);
  border-radius: 22px;
  border: 1px solid var(--haitang-accent-soft);
  position: relative;
  z-index: 1;
  animation: emptyIconBreathe 3.2s ease-in-out infinite;
}
.empty-state-icon svg { width: 36px; height: 36px; }
@keyframes emptyIconBreathe {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 6px 18px rgba(193, 138, 74, 0.12); }
  50%      { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 24px rgba(193, 138, 74, 0.22); }
}
.empty-state-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--haitang-text);
  font-family: var(--haitang-font-display);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}
.empty-state-tip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}

/* ============ 加载动画 ============ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--haitang-border);
  border-top-color: var(--haitang-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 文章正文 ============ */
.article-content {
  font-size: 16px;
  line-height: 1.95;
  color: var(--haitang-text-light);
  font-family: var(--haitang-font-display);
}
.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--haitang-text);
  margin: 40px 0 20px;
  letter-spacing: -0.01em;
}
.article-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--haitang-text);
  margin: 28px 0 14px;
}
.article-content p { margin-bottom: 18px; }
.article-content ul,
.article-content ol { margin: 14px 0 18px 20px; }
.article-content ul li { list-style: disc; margin-bottom: 8px; }
.article-content ol li { list-style: decimal; margin-bottom: 8px; }
.article-content code {
  font-family: var(--haitang-font-mono);
  background: var(--haitang-accent-light);
  color: var(--haitang-accent-deep);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}
.article-content pre {
  background: #1F1B16;
  color: #E0D5C0;
  padding: 20px 24px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--haitang-font-mono);
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.article-content blockquote {
  border-left: 4px solid var(--haitang-accent);
  padding: 14px 22px;
  background: var(--haitang-accent-light);
  color: var(--haitang-text);
  margin: 20px 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
}
/* 客户端盒子组件：与编辑器内 .ht-box 视觉一致 */
.article-content .ht-box {
  display: block;
  margin: 20px 0;
  padding: 18px 22px 22px;
  background: var(--haitang-accent-light);
  border: 1.5px solid var(--haitang-accent-soft);
  border-radius: 10px;
  color: var(--haitang-text);
  line-height: 1.85;
}
.article-content .ht-box > p { margin-bottom: 8px; }
.article-content .ht-box > p:last-child { margin-bottom: 0; }
.article-content .ht-box > p:first-child { margin-top: 0; }

/* ============ 评论 ============ */
.comment-loading,
.comment-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--haitang-text-muted);
  font-size: 13px;
  border-radius: 10px;
  background: var(--haitang-card);
  border: 1px dashed var(--haitang-border);
}
.comment-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--haitang-border);
}
.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--haitang-font-display);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.2);
}
.comment-body { flex: 1; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--haitang-text);
}
.comment-time {
  font-size: 12px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
}
.comment-text {
  font-size: 14px;
  color: var(--haitang-text-light);
  line-height: 1.7;
}

/* 评论嵌套回复区 */
.comment-replies {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--haitang-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment-reply {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 10px;
  transition: all 0.3s ease;
}
.comment-reply:hover {
  border-color: var(--haitang-accent);
  box-shadow: 0 2px 10px rgba(193, 138, 74, 0.10);
}
.comment-reply.is-admin {
  background: linear-gradient(135deg, rgba(193, 138, 74, 0.10), rgba(230, 185, 128, 0.06));
  border-color: rgba(193, 138, 74, 0.35);
  border-left: 3px solid var(--haitang-accent);
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.08);
}
.comment-reply.is-admin::before {
  content: '';
  position: absolute;
}
.comment-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-text-muted), var(--haitang-text-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--haitang-font-display);
  flex-shrink: 0;
}
.comment-reply.is-admin .comment-reply-avatar {
  background: linear-gradient(135deg, var(--haitang-accent), #D4A56A);
  box-shadow: 0 2px 6px rgba(193, 138, 74, 0.30);
}
.comment-reply-body {
  flex: 1;
  min-width: 0;
}
.comment-reply-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.comment-reply-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--haitang-text);
}
.comment-reply-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--haitang-accent), #D4A56A);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.comment-reply-time {
  font-size: 11.5px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
}
.comment-reply-text {
  font-size: 13px;
  color: var(--haitang-text-light);
  line-height: 1.65;
  word-break: break-word;
}

/* ============ 文件列表（云盘） ============ */
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--haitang-card);
  border-radius: 14px;
  border: 1px solid var(--haitang-border);
  transition: all 0.3s ease;
  cursor: pointer;
}
.file-item:hover {
  border-color: var(--haitang-accent);
  transform: translateX(4px);
  box-shadow: var(--haitang-card-shadow);
}

/* 文件列表 stagger 动画 */
@keyframes fileItemIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.file-item.reveal,
.file-grid-item.reveal {
  animation: fileItemIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes fileItemOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
.file-item.out,
.file-grid-item.out {
  animation: fileItemOut 0.32s ease both;
  pointer-events: none;
}
.file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.file-icon.folder { background: var(--haitang-accent-light); color: var(--haitang-accent); }
.file-icon.img { background: rgba(74, 144, 164, 0.15); color: #4A90A4; }
.file-icon.doc { background: rgba(74, 156, 122, 0.15); color: #4A9C7A; }
.file-icon.video { background: rgba(204, 107, 62, 0.15); color: #CC6B3E; }
.file-icon.audio { background: rgba(143, 111, 62, 0.15); color: #8B6F3E; }
.file-icon.other { background: var(--haitang-border); color: var(--haitang-text-muted); }

.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--haitang-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta {
  font-size: 12px;
  color: var(--haitang-text-muted);
  margin-top: 3px;
  font-family: var(--haitang-font-mono);
}
.file-actions { display: flex; gap: 4px; }
.file-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--haitang-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.file-action-btn:hover {
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
}

.upload-zone {
  border: 2px dashed var(--haitang-border-strong);
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--haitang-card);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--haitang-accent);
  background: var(--haitang-accent-light);
}
.upload-icon {
  font-size: 40px;
  color: var(--haitang-accent);
  margin-bottom: 12px;
}
.upload-text {
  font-size: 15px;
  color: var(--haitang-text);
  font-weight: 600;
}
.upload-hint {
  font-size: 13px;
  color: var(--haitang-text-muted);
  margin-top: 6px;
}

/* ============ 留言板 ============ */

/* 顶部统计 banner */
.message-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 28px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--haitang-card) 0%, var(--haitang-accent-light) 200%);
  border: 1px solid var(--haitang-border);
  border-radius: 22px;
  box-shadow: var(--haitang-card-shadow);
  position: relative;
  overflow: hidden;
}
.message-stats::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(193, 138, 74, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.message-stats::after {
  content: "";
  position: absolute;
  left: -20px; bottom: -50px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(193, 138, 74, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.message-stats-left { position: relative; z-index: 1; }
.message-stats-eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--haitang-accent);
  font-weight: 600;
  margin-bottom: 6px;
  padding: 2px 10px;
  background: var(--haitang-accent-light);
  border-radius: 999px;
  border: 1px solid var(--haitang-accent-soft);
}
.message-stats-title {
  font-family: var(--haitang-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--haitang-text);
  margin: 4px 0 2px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.message-stats-title .ms-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--haitang-accent-warm), var(--haitang-accent));
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(193,138,74,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.message-stats-title .ms-icon svg { width: 18px; height: 18px; }
.message-stats-sub {
  font-size: 13px;
  color: var(--haitang-text-muted);
  margin: 0;
  letter-spacing: 0.05em;
}
.message-stats-right {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.stat-block { text-align: right; }
.stat-num {
  font-family: var(--haitang-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--haitang-accent);
  line-height: 1.2;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}
.stat-block:hover .stat-num {
  transform: scale(1.12);
  color: var(--haitang-accent-deep);
}
.stat-label {
  font-size: 11px;
  color: var(--haitang-text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--haitang-border);
}

/* 双栏布局 */
.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.message-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 留言卡片（整体重做） */
.message-item {
  display: flex;
  gap: 18px;
  padding: 24px 26px;
  background: linear-gradient(135deg, var(--haitang-card) 0%, var(--haitang-accent-light) 250%);
  border-radius: 22px;
  border: 1px solid var(--haitang-border);
  box-shadow: var(--haitang-card-shadow);
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.4s ease;
  animation: messageItemIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
}
@keyframes messageItemIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.message-item::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--haitang-accent-warm), var(--haitang-accent), var(--haitang-accent-deep));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.message-item:hover {
  box-shadow: var(--haitang-card-shadow-hover);
  border-color: var(--haitang-accent-soft);
  background: linear-gradient(135deg, var(--haitang-card) 0%, var(--haitang-accent-light) 160%);
}
.message-item:hover::before { opacity: 1; }
.message-item.new-flash {
  animation: msgFlash 1.8s ease-out, messageItemIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.message-item.new-flash::before { opacity: 1; }
@keyframes msgFlash {
  0%   { box-shadow: 0 0 0 0 rgba(193,138,74,0.55), var(--haitang-card-shadow); border-color: var(--haitang-accent); }
  60%  { box-shadow: 0 0 0 10px rgba(193,138,74,0), var(--haitang-card-shadow); border-color: var(--haitang-accent-soft); }
  100% { box-shadow: 0 0 0 0 rgba(193,138,74,0), var(--haitang-card-shadow); border-color: var(--haitang-border); }
}

/* 头像：双层渐变环 */
.message-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}
.message-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ring, var(--haitang-accent)), var(--haitang-accent-warm), var(--haitang-accent-deep), var(--ring, var(--haitang-accent)));
  z-index: 0;
  opacity: 0.9;
  transition: transform 0.6s ease;
}
.message-item:hover .message-avatar-wrap::before {
  transform: rotate(120deg);
}
.message-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ring, var(--haitang-accent-warm)) 0%, var(--haitang-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  font-family: var(--haitang-font-display);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(193, 138, 74, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.4s ease;
}
.message-item:hover .message-avatar {
  transform: scale(1.06);
}

.message-body { flex: 1; min-width: 0; }

/* 头部：作者名 + 楼层 */
.message-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.message-author {
  font-size: 16px;
  font-weight: 700;
  color: var(--haitang-text);
  font-family: var(--haitang-font-display);
  letter-spacing: 0.01em;
}
.message-floor {
  font-size: 10px;
  font-family: var(--haitang-font-mono);
  color: var(--haitang-accent);
  background: var(--haitang-accent-light);
  border: 1px solid var(--haitang-accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: all 0.25s ease;
}
.message-item:hover .message-floor {
  background: linear-gradient(135deg, var(--haitang-accent), var(--haitang-accent-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(193,138,74,0.3);
}
/* 沙发专属样式 */
.message-floor.sofa {
  background: linear-gradient(135deg, var(--haitang-accent), var(--haitang-accent-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 3px 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: relative;
}
.message-floor.sofa::before {
  content: "🛋";
  margin-right: 3px;
  font-size: 10px;
  filter: grayscale(0.1);
}
.message-sofa-tag {
  font-size: 9px;
  font-family: var(--haitang-font-mono);
  color: #fff;
  background: linear-gradient(135deg, #C18A4A, #D9A368);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(193, 138, 74, 0.3);
  position: relative;
  animation: sofaTagPulse 2.4s ease-in-out infinite;
}
@keyframes sofaTagPulse {
  0%, 100% { box-shadow: 0 2px 4px rgba(193, 138, 74, 0.3); }
  50%      { box-shadow: 0 2px 8px rgba(193, 138, 74, 0.55); }
}

/* meta 行：时间 + IP */
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.message-meta-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.message-meta-icon svg {
  width: 11px; height: 11px;
  opacity: 0.7;
}
.message-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--haitang-text-muted);
  opacity: 0.4;
}
.message-meta-ip { opacity: 0.85; }

/* 文本：左侧引文竖线 + 头尾引号 */
.message-text {
  font-size: 14px;
  color: var(--haitang-text);
  line-height: 1.78;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--haitang-accent-soft);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.message-text::before {
  content: "\201C";
  display: inline;
  font-family: var(--haitang-font-display);
  font-size: 18px;
  color: var(--haitang-accent);
  font-weight: 600;
  margin-right: 2px;
  vertical-align: -2px;
}
.message-text::after {
  content: "\201D";
  display: inline;
  font-family: var(--haitang-font-display);
  font-size: 18px;
  color: var(--haitang-accent);
  font-weight: 600;
  margin-left: 2px;
  vertical-align: -2px;
}

/* 管理员回复嵌套区 */
.message-replies {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.message-reply {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--haitang-bg-soft, rgba(193, 138, 74, 0.04));
  border: 1px solid var(--haitang-border-soft, rgba(193, 138, 74, 0.15));
  border-radius: 12px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.message-reply:hover {
  border-color: var(--haitang-accent-soft);
}
.message-reply.is-admin {
  background: linear-gradient(135deg, rgba(193, 138, 74, 0.10), rgba(230, 185, 128, 0.06));
  border-color: rgba(193, 138, 74, 0.35);
  border-left: 3px solid var(--haitang-accent);
  box-shadow: 0 2px 8px rgba(193, 138, 74, 0.08);
}
.message-reply.is-admin::before {
  content: "↪";
  position: absolute;
  top: -10px;
  left: 14px;
  width: 20px;
  height: 20px;
  background: var(--haitang-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(193, 138, 74, 0.4);
}
.message-reply-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--haitang-accent), #E6B980);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--haitang-font-display);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.message-reply.is-admin .message-reply-avatar {
  background: linear-gradient(135deg, var(--haitang-accent), #D4A56A);
  box-shadow: 0 2px 6px rgba(193, 138, 74, 0.3);
}
.message-reply-body {
  flex: 1;
  min-width: 0;
}
.message-reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.message-reply-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--haitang-text);
}
.message-reply-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--haitang-accent), #D4A56A);
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(193, 138, 74, 0.25);
}
.message-reply-time {
  font-size: 11.5px;
  color: var(--haitang-text-soft, #8B7E6E);
  margin-left: auto;
}
.message-reply-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--haitang-text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 留言表单卡片 */
.message-form-card {
  position: sticky;
  top: 100px;
  padding: 22px 22px 20px;
  background: var(--haitang-card);
  border: 1px solid var(--haitang-border);
  border-radius: 20px;
  box-shadow: var(--haitang-card-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--haitang-accent-soft) transparent;
}
.message-form-card::-webkit-scrollbar { width: 4px; }
.message-form-card::-webkit-scrollbar-thumb { background: var(--haitang-accent-soft); border-radius: 2px; }
.message-form-card::-webkit-scrollbar-track { background: transparent; }
.message-form-card:hover {
  box-shadow: var(--haitang-card-shadow-hover);
  border-color: var(--haitang-accent-soft);
}
.message-form-card::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(193,138,74,0.16) 0%, transparent 70%);
  pointer-events: none;
  transition: transform 0.6s ease;
  z-index: 0;
}
.message-form-card > * { position: relative; z-index: 1; }
.message-form-card:hover::before {
  transform: scale(1.2);
}
.message-form-title {
  font-family: var(--haitang-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--haitang-text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.message-form-title::before {
  content: "";
  display: inline-block;
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--haitang-accent), var(--haitang-accent-deep));
  border-radius: 2px;
}
.message-form-subtitle {
  font-size: 12px;
  color: var(--haitang-text-muted);
  margin: 0 0 16px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

/* 字段前缀图标 */
.form-group { margin-bottom: 12px; }
.form-group:last-child { margin-bottom: 0; }
.form-group-icon { position: relative; }
.form-group-icon .form-input,
.form-group-icon .form-textarea {
  padding-left: 42px;
}
.form-group-icon .form-icon {
  position: absolute;
  left: 14px;
  top: 12px;
  width: 15px; height: 15px;
  color: var(--haitang-text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 1;
}
.form-group-textarea .form-icon { top: 13px; }
.form-group-icon .form-input:focus ~ .form-icon,
.form-group-textarea .form-textarea:focus ~ .form-icon {
  color: var(--haitang-accent);
}
.message-form-card .form-input,
.message-form-card .form-textarea,
.message-form-card .form-select {
  padding: 11px 16px;
  font-size: 13.5px;
  border-radius: 11px;
}
.message-form-card .form-input { padding-left: 40px; }
.message-form-card .form-textarea {
  min-height: 88px;
  padding-top: 11px;
  padding-bottom: 11px;
  line-height: 1.55;
}

/* 表单底部：字符计数 + 提交按钮同行 */
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}
.form-foot .form-hint {
  font-size: 12px;
  color: var(--haitang-text-muted);
  font-family: var(--haitang-font-mono);
  letter-spacing: 0.05em;
}

/* 提交按钮（紧凑版） */
.message-submit {
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--haitang-accent) 0%, var(--haitang-accent-deep) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(193, 138, 74, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: box-shadow 0.3s ease, filter 0.25s ease;
  font-family: inherit;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.message-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.message-submit:hover {
  box-shadow: 0 6px 20px rgba(193, 138, 74, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  filter: brightness(1.05);
}
.message-submit:hover::after { transform: translateX(100%); }
.message-submit:active { filter: brightness(0.95); }
.message-submit[disabled] { opacity: 0.85; cursor: wait; }
.message-submit svg { width: 14px; height: 14px; transition: transform 0.4s ease; }
.message-submit .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.message-submit.is-loading svg { animation: submitIconSpin 0.9s linear infinite; }
@keyframes submitIconSpin { to { transform: rotate(360deg); } }
.message-submit.is-success {
  background: linear-gradient(135deg, #4F9F7A 0%, #3D8262 100%);
  box-shadow: 0 4px 14px rgba(79, 159, 122, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.message-submit.is-success::after { transform: translateX(100%); }
.message-submit.is-success svg { transform: scale(1.15); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .message-layout { grid-template-columns: 1fr; }
  .message-form-card { position: static; }
  .message-stats { flex-direction: column; align-items: flex-start; padding: 22px 24px; }
  .message-stats-right { width: 100%; justify-content: flex-start; }
  .message-stats-title { font-size: 22px; }
}

/* ============ 认证页面 ============ */
.auth-wrap {
  min-height: calc(100vh - var(--haitang-nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--haitang-bg) 0%, var(--haitang-gallery-bg) 100%);
  position: relative;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(at 30% 20%, rgba(217, 163, 104, 0.12) 0px, transparent 50%),
    radial-gradient(at 70% 80%, rgba(193, 138, 74, 0.08) 0px, transparent 50%);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--haitang-card);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(74, 56, 32, 0.12), 0 0 0 1px var(--haitang-border);
  position: relative;
  z-index: 1;
}
.auth-title {
  font-family: var(--haitang-font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--haitang-text);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--haitang-text-muted);
  margin-bottom: 32px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--haitang-text-muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--haitang-border-strong);
}
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--haitang-text-light);
  margin-top: 24px;
}
.auth-footer a {
  color: var(--haitang-accent);
  font-weight: 600;
}
.auth-footer a:hover { color: var(--haitang-accent-deep); }

/* ============ 移动端导航抽屉 ============ */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--haitang-nav-height);
  right: 0;
  bottom: 0;
  width: 300px;
  background: var(--haitang-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
  padding: 20px;
  overflow-y: auto;
  border-left: 1px solid var(--haitang-border);
}
@media (max-width: 768px) {
  .mobile-drawer { display: block; }
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .nav-link {
  display: block;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.mobile-drawer .nav-link.active {
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
}
.mobile-drawer .nav-link.active::after { display: none; }
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.4);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
@media (max-width: 768px) {
  .drawer-overlay { display: block; }
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

/* ============ 统计卡片 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--haitang-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--haitang-card-shadow);
  border: 1px solid var(--haitang-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--haitang-card-shadow-hover); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--haitang-accent-light);
  color: var(--haitang-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-value {
  font-family: var(--haitang-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--haitang-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 13px;
  color: var(--haitang-text-muted);
  margin-top: 2px;
}

/* ============ 工具类 ============ */
.text-accent { color: var(--haitang-accent); }
.text-muted { color: var(--haitang-text-muted); }
.text-light { color: var(--haitang-text-light); }
.bg-accent { background: var(--haitang-accent); }
.hidden { display: none !important; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .blog-card-list { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-card.large { grid-column: span 2; }
  .hero-section { gap: 40px; padding: 40px 40px 60px; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-right { grid-column: span 2; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content { grid-template-columns: 220px 1fr; gap: 40px; }
  .section-title { font-size: 34px; }
  .hero-left h1 { font-size: 56px; }
  .hero-left h2 { font-size: 72px; }
}

@media (max-width: 768px) {
  .main-navigation-bar { padding: 0 20px; }
  .nav-center { display: none; }
  .nav-right .nav-clock { display: none; }
  .nav-mobile-toggle { display: flex; }
  .hero-section { padding: 30px 20px 60px; gap: 30px; }
  .hero-left h1 { font-size: 40px; }
  .hero-left h2 { font-size: 52px; }
  .hero-tagline { font-size: 16px; }
  .hero-meta { gap: 20px; }
  .hero-meta-value { font-size: 22px; }
  .blog-section { padding: 60px 20px; }
  .blog-card-list { grid-template-columns: 1fr; gap: 20px; }
  .gallery-section { padding: 60px 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card.large { grid-column: span 1; min-height: 240px; }
  .about-section { padding: 60px 20px; }
  .about-content { grid-template-columns: 1fr; gap: 30px; }
  .about-avatar { position: static; }
  .footer-section { padding: 50px 20px 30px; }
  .footer-content { grid-template-columns: 1fr; gap: 36px; }
  .footer-right { grid-column: span 1; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
  .section-title { font-size: 28px; }
  .page-main { padding: 30px 20px; }
  .page-title { font-size: 30px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .toast-container { right: 12px; left: 12px; }
  .toast { min-width: 0; max-width: 100%; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .modal-box { padding: 28px 22px; }
  .blog-section, .gallery-section, .about-section {
    min-height: 0;
    padding: 50px 20px;
    justify-content: flex-start;
  }
  .hero-section { min-height: 0; }
  .terminal-window { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-left h1 { font-size: 32px; }
  .hero-left h2 { font-size: 40px; }
  .section-title { font-size: 24px; }
  .page-title { font-size: 24px; }
  .blog-card-title { font-size: 18px; }
  .stat-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .hero-meta { gap: 16px; }
}
