/* ============================================
   首页覆盖样式 v4 — 修复浅色模式
   参考 Agent Hub 设计系统
   ============================================ */

/* ── Agent Hub 设计变量覆盖 (仅深色模式) ── */
body.dark {
  /* 覆盖原始CSS变量为深色模式 */
  --ui-bg: #0a0d14;
  --ui-bg-2: #111720;
  --ui-panel: rgba(22, 23, 28, 0.95);
  --ui-panel-solid: #191d24;
  --ui-text: #f3f4f6;
  --ui-muted: #94a3b8;
  --ui-border: hsla(220, 15%, 30%, 0.3);
  --ui-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --ui-shadow-soft: 0 2px 12px hsla(230, 25%, 5%, 0.3);
  --ui-accent: #a78bfa;
  --ui-accent-2: #8B5CF6;
  --ui-accent-soft: rgba(139, 92, 246, 0.15);
  --ui-success: #16a34a;
  --ui-warning: #d97706;
  --ui-error: #dc2626;
}

/* 浅色模式 - 保留原始CSS变量，不覆盖 */
body:not(.dark) {
  /* 只覆盖accent相关变量 */
  --ui-accent: #8B5CF6;
  --ui-accent-2: #7C3AED;
  --ui-accent-soft: rgba(139, 92, 246, 0.10);
  --ui-success: #16a34a;
  --ui-warning: #d97706;
  --ui-error: #dc2626;
}

/* Agent Hub 风格变量 */
:root {
  --hue-primary: 250; --hue-success: 155; --hue-warning: 45; --hue-info: 200;
  --accent-primary: #8B5CF6;
  --accent-primary-dim: rgba(139, 92, 246, 0.15);
  --accent-primary-glow: rgba(139, 92, 246, 0.4);
  --accent-success: #16a34a;
  --accent-success-dim: hsla(155, 75%, 55%, 0.15);
  --accent-warning: #d97706;
  --accent-warning-dim: hsla(45, 90%, 55%, 0.15);
  --accent-info: #3B82F6;
  --accent-info-dim: hsla(200, 80%, 60%, 0.15);
  --border-subtle: hsla(220, 15%, 30%, 0.3);
  --border-default: hsla(220, 15%, 35%, 0.5);
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --radius-sm: 12px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 999px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --space-xs: 4px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px;
}

/* 浅色模式覆盖border变量 */
body:not(.dark) {
  --border-subtle: hsla(220, 15%, 70%, 0.3);
  --border-default: hsla(220, 15%, 65%, 0.5);
}

/* ── Keyframes ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px var(--accent-primary-glow); } 50% { box-shadow: 0 0 40px var(--accent-primary-glow), 0 0 60px var(--accent-primary-dim); } }
@keyframes sectionIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ── 首页Body ── */
body.home-page {
  font-family: var(--font-body) !important;
}

/* ── Header (Glassmorphism) ── */
body.home-page .header {
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  animation: fadeInDown 0.5s ease-out;
}
body.dark.home-page .header {
  background: rgba(17, 18, 24, 0.95) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
body:not(.dark).home-page .header {
  background: rgba(240, 243, 248, 0.85) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

body.home-page .brand {
  font-family: var(--font-display) !important;
  transition: opacity var(--transition-fast);
}
body.home-page .brand:hover { opacity: 0.85; }
body.home-page .brand-logo {
  transition: transform var(--transition-bounce) !important;
}
body.home-page .brand:hover .brand-logo {
  transform: scale(1.08) rotate(-2deg) !important;
}

/* ── Search ── */
body.home-page .search-field {
  border-radius: var(--radius-full) !important;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), width var(--transition-base) !important;
}
body.dark.home-page .search-field {
  background: rgba(17, 18, 24, 0.95) !important;
  border: 1px solid var(--border-subtle) !important;
}
body:not(.dark).home-page .search-field {
  background: rgba(240, 243, 248, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
}
body.home-page .search-field:focus-within {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px var(--accent-primary-dim), 0 0 20px var(--accent-primary-glow) !important;
}
body.home-page .search-input {
  font-family: var(--font-body) !important;
}
body.home-page .search-submit {
  transition: color var(--transition-fast), transform var(--transition-fast) !important;
}
body.home-page .search-submit:hover {
  color: var(--accent-primary) !important;
  transform: translateY(-50%) scale(1.15) !important;
}

/* ── Theme Toggle ── */
body.home-page .theme-toggle {
  font-family: var(--font-body) !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition-fast) !important;
  position: relative !important;
  left: auto !important;
}
body.dark.home-page .theme-toggle {
  background: var(--ui-panel-solid) !important;
  border: 1px solid var(--border-default) !important;
}
body:not(.dark).home-page .theme-toggle {
  background: var(--ui-panel-solid, #fff) !important;
  border: 1px solid var(--border-default) !important;
}
body.home-page .theme-toggle:hover {
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
  background: var(--accent-primary-dim) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 20px var(--accent-primary-glow) !important;
}
body.home-page .theme-toggle:active {
  transform: scale(0.97) !important;
}

/* ── Section Card ── */
body.home-page .section-card {
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-radius: var(--radius-xl) !important;
  animation: sectionIn 0.4s ease-out both;
  position: relative !important;
  overflow: hidden !important;
}
body.dark.home-page .section-card {
  background: rgba(26, 27, 32, 0.95) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}
body:not(.dark).home-page .section-card {
  background: rgba(240, 243, 248, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 4px 24px hsla(220, 15%, 50%, 0.15) !important;
}



/* ── Section Head ── */
body.home-page .section-head {
  padding-bottom: var(--space-md) !important;
  margin-bottom: var(--space-lg) !important;
}
body.dark.home-page .section-head {
  border-bottom: 1px solid var(--border-subtle) !important;
}
body:not(.dark).home-page .section-head {
  border-bottom: 1px solid var(--border-subtle) !important;
}
body.home-page .section-head h2 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* ── Article Cards ── */
body.home-page .content-list-item {
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-radius: var(--radius-lg) !important;
  transition: all var(--transition-base) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: scaleIn 0.4s ease-out backwards;
}
body.dark.home-page .content-list-item {
  background: rgba(26, 27, 32, 0.95) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}
body:not(.dark).home-page .content-list-item {
  background: rgba(240, 243, 248, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 4px 24px hsla(220, 15%, 50%, 0.15) !important;
}

/* 不同accent颜色 */
body.home-page .content-list-item:nth-child(4n+1) { --card-accent: var(--accent-primary); }
body.home-page .content-list-item:nth-child(4n+2) { --card-accent: var(--accent-success); }
body.home-page .content-list-item:nth-child(4n+3) { --card-accent: var(--accent-warning); }
body.home-page .content-list-item:nth-child(4n+4) { --card-accent: var(--accent-info); }

body.home-page .content-list-item:nth-child(1) { animation-delay: 0.05s; }
body.home-page .content-list-item:nth-child(2) { animation-delay: 0.1s; }
body.home-page .content-list-item:nth-child(3) { animation-delay: 0.15s; }
body.home-page .content-list-item:nth-child(4) { animation-delay: 0.2s; }
body.home-page .content-list-item:nth-child(5) { animation-delay: 0.25s; }
body.home-page .content-list-item:nth-child(6) { animation-delay: 0.3s; }


/* Hover效果 */
body.home-page .content-list-item:hover {
  transform: translateY(-4px) !important;
  border-color: var(--card-accent, var(--border-default)) !important;
}
body.dark.home-page .content-list-item:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
}
body:not(.dark).home-page .content-list-item:hover {
  box-shadow: 0 12px 40px hsla(220, 15%, 50%, 0.2) !important;
}
body.home-page .content-list-item:hover::before {
  opacity: 1 !important;
}
body.home-page .content-list-item:active {
  transform: translateY(-2px) scale(0.98) !important;
}

/* 图片hover缩放 */
body.home-page .content-list-item img,
body.home-page .theme-aware-svg {
  transition: transform var(--transition-base) !important;
}
body.home-page .content-list-item:hover img {
  transform: scale(1.04) !important;
}

/* 标题hover变色 */
body.home-page .content-list-copy strong {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  transition: color var(--transition-fast) !important;
}
body.home-page .content-list-item:hover .content-list-copy strong {
  color: var(--card-accent, var(--accent-primary)) !important;
}

/* ── Sidebar ── */
body.home-page .sidebar-section,
body.home-page .sidebar-item {
  border-radius: var(--radius-lg) !important;
  padding: var(--space-md) !important;
  transition: all var(--transition-base) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: fadeInUp 0.5s ease-out backwards;
}
body.dark.home-page .sidebar-section,
body.dark.home-page .sidebar-item {
  background: rgba(26, 27, 32, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body:not(.dark).home-page .sidebar-section,
body:not(.dark).home-page .sidebar-item {
  background: rgba(245, 247, 250, 0.92) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.home-page .sidebar-section:nth-child(1) { animation-delay: 0.1s; }
body.home-page .sidebar-section:nth-child(2) { animation-delay: 0.2s; }

/* 侧栏hover */
body.home-page .sidebar-section:hover,
body.home-page .sidebar-item:hover {
  transform: translateY(-4px) !important;
  border-color: var(--border-default) !important;
}
body.dark.home-page .sidebar-section:hover,
body.dark.home-page .sidebar-item:hover {
  box-shadow: none !important;
}
body:not(.dark).home-page .sidebar-section:hover,
body:not(.dark).home-page .sidebar-item:hover {
  box-shadow: none !important;
}

body.home-page .sidebar-section h3,
body.home-page .sidebar-item h3 {
  font-family: var(--font-display) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  padding-bottom: var(--space-sm) !important;
  margin-bottom: var(--space-md) !important;
}
body.dark.home-page .sidebar-section h3,
body.dark.home-page .sidebar-item h3 {
  color: var(--ui-muted) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}
body:not(.dark).home-page .sidebar-section h3,
body:not(.dark).home-page .sidebar-item h3 {
  color: var(--ui-muted, #64748b) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

/* ── Tags ── */
body.home-page .tag {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: var(--radius-full) !important;
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: all var(--transition-fast) !important;
}
body.dark.home-page .tag {
  background: rgba(17, 18, 24, 0.95) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--ui-muted) !important;
}
body:not(.dark).home-page .tag {
  background: rgba(240, 243, 248, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--ui-muted, #64748b) !important;
}
body.home-page .tag:hover {
  background: var(--accent-primary-dim) !important;
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 20px var(--accent-primary-glow) !important;
}

/* ── Pagination ── */
body.home-page .pagination-button {
  font-family: var(--font-body) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: var(--radius-md) !important;
  transition: all var(--transition-fast) !important;
}
body.dark.home-page .pagination-button {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
}
body:not(.dark).home-page .pagination-button {
  background: transparent !important;
  border: 1px solid rgba(100,116,139,0.15) !important;
}
body.home-page .pagination-button:hover {
  background: var(--accent-primary-dim) !important;
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
}
body.home-page .pagination-button.is-active {
  background: linear-gradient(135deg, var(--accent-primary), #8B5CF6) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 16px var(--accent-primary-glow) !important;
}

/* ── Footer ── */
body.home-page .beian-link {
  transition: all var(--transition-fast) !important;
}
body.home-page .beian-link:hover {
  color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  background: var(--accent-primary-dim) !important;
}

/* ── Back to Top ── */
body.home-page .back-to-top {
  background: linear-gradient(135deg, var(--accent-primary), #8B5CF6) !important;
  box-shadow: 0 4px 16px var(--accent-primary-glow) !important;
  transition: all var(--transition-bounce) !important;
}
body.home-page .back-to-top.is-visible {
  opacity: 1 !important; pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}
body.home-page .back-to-top:hover {
  transform: translateY(-4px) scale(1.1) !important;
  box-shadow: 0 6px 24px var(--accent-primary-glow), 0 0 40px var(--accent-primary-glow) !important;
  animation: glow 2s infinite !important;
}
body.home-page .back-to-top:active {
  transform: translateY(-2px) scale(0.95) !important;
}

/* ── Search Feedback ── */
body.home-page .search-summary,
body.home-page .search-empty {
  backdrop-filter: blur(12px) !important;
  border-radius: var(--radius-full) !important;
}
body.dark.home-page .search-summary,
body.dark.home-page .search-empty {
  background: transparent !important;
  border: none !important;
}
body:not(.dark).home-page .search-summary,
body:not(.dark).home-page .search-empty {
  background: transparent !important;
  border: none !important;
}

/* ── Skip Link ── */
body.home-page .skip-link {
  background: var(--accent-primary) !important;
  transition: top var(--transition-fast) !important;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  body.home-page .brand-text { display: none !important; }
  body.home-page .search-field { width: 180px !important; }
  body.home-page .search-field:focus-within { width: 220px !important; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  body.home-page *,
  body.home-page *::before,
  body.home-page *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}





/* 强制去掉sidebar的shadow和backdrop（所有模式） */
body.home-page .sidebar-section,
body:not(.dark).home-page .sidebar-section,
body.dark.home-page .sidebar-section {
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}



/* 卡片顶部颜色线条 - 与agent-hub完全一致 */
body.home-page .section-card,
body.home-page .content-list-item,
body.home-page .sidebar-section,
body.home-page .sidebar-item {
  position: relative !important;
  overflow: hidden !important;
}
body.home-page .section-card::before,
body.home-page .content-list-item::before,
body.home-page .sidebar-section::before,
body.home-page .sidebar-item::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: var(--card-accent, #8B5CF6) !important;
  opacity: 0.6 !important;
  transition: opacity 150ms !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
body.home-page .section-card:hover::before,
body.home-page .content-list-item:hover::before,
body.home-page .sidebar-section:hover::before,
body.home-page .sidebar-item:hover::before {
  opacity: 1 !important;
}


.home-page #library:hover::before {
  opacity: 1 !important;
}

/* 全面覆盖原始CSS中所有隐藏::before/::after的规则 */
.home-page #library::before,
.home-page #library::after,
.home-page .section-card::before,
.home-page .content-list-item::before,
.home-page .sidebar-section::before,
.home-page .sidebar-item::before {
  display: block !important;
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: var(--card-accent, #8B5CF6) !important;
  opacity: 0.6 !important;
  transition: opacity 150ms !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
.home-page #library:hover::before,
.home-page .section-card:hover::before,
.home-page .content-list-item:hover::before,
.home-page .sidebar-section:hover::before,
.home-page .sidebar-item:hover::before {
  opacity: 1 !important;
}
body.dark.home-page #library::before,
body.dark.home-page .section-card::before,
body.dark.home-page .content-list-item::before,
body.dark.home-page .sidebar-section::before {
  display: block !important;
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: var(--card-accent, #8B5CF6) !important;
  opacity: 0.6 !important;
  z-index: 1 !important;
}
html.theme-preload-dark body.home-page #library::before,
html.theme-preload-dark body.home-page .section-card::before,
html.theme-preload-dark body.home-page .content-list-item::before,
html.theme-preload-dark body.home-page .sidebar-section::before {
  display: block !important;
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: var(--card-accent, #8B5CF6) !important;
  opacity: 0.6 !important;
  z-index: 1 !important;
}

/* 三个版块整体下移2px */
body.home-page .section-card,
body.home-page .sidebar-section {
  margin-top: 4px !important;
}

/* 阅读方向下移4px */
body.home-page .sidebar-section:nth-child(2) {
  margin-top: 4px !important;
}

/* 阅读方向下移 - 用id选择器确保优先级 */
body.home-page aside.sidebar .sidebar-section:last-child {
  margin-top: 12px !important;
}

/* 主题切换按钮图标 */
.theme-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.theme-icon.moon {
  display: none;
}





/* 主题切换按钮图标 - 使用span代替::before */
body.home-page .theme-toggle::before,
body.home-page #themeToggle::before {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  mask-image: none !important;
  background: none !important;
}
.ti-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-right: 4px;
}

/* 主题切换按钮固定大小 */
body.home-page .theme-toggle {
  min-width: 112px !important;
  justify-content: center !important;
}

/* 主题切换按钮 - 固定大小 */
body.home-page .theme-toggle,
body.home-page #themeToggle {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
}

/* 右侧栏整体右移2px */


/* 右侧栏右移4px - fixed定位用right */
@media (min-width: 901px) and (max-width: 1439px) {
  body.home-page .sidebar.sidebar-sticky {
    right: calc((100vw - 1220px) / 2 - 12px) !important;
  }
}
@media (min-width: 1440px) {
  body.home-page .sidebar.sidebar-sticky {
    right: calc((100vw - 1196px) / 2 - 12px) !important;
  }
}

/* 全部文章右移4px */
body.home-page .section-card {
  transform: translateX(4px) !important;
}

/* 浅色模式返回顶部按钮透明 */
body:not(.dark).home-page .back-to-top {
  background: transparent !important;
  color: var(--ui-text, #162133) !important;
  border: 1px solid var(--ui-border, rgba(100, 116, 139, 0.22)) !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.1) !important;
}

/* 响应式修复 - 清理冲突规则 */
@media (max-width: 900px) {
  body.home-page .home-page-main {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 12px !important;
  }
  body.home-page .sidebar {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
  }
  body.home-page .sidebar-sticky {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
  }
  body.home-page .section-card {
    transform: none !important;
    margin-left: 0 !important;
  }
  body.home-page .content-list {
    grid-template-columns: 1fr !important;
  }
}

/* 中等宽度下侧栏也缩放 */
@media (min-width: 901px) and (max-width: 1100px) {
  body.home-page .sidebar,
  body.home-page .sidebar-sticky {
    width: 240px !important;
  }
  body.home-page .home-page-main {
    grid-template-columns: minmax(0, 1fr) 240px !important;
    gap: 16px !important;
  }
}
@media (min-width: 1101px) and (max-width: 1280px) {
  body.home-page .sidebar,
  body.home-page .sidebar-sticky {
    width: 270px !important;
  }
  body.home-page .home-page-main {
    grid-template-columns: minmax(0, 1fr) 270px !important;
  }
}

/* HEADER NO BOX V147: 顶栏透明无边框 */
body.dark.home-page .header {
  background: rgba(17, 18, 24, 0.75) !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
body:not(.dark).home-page .header {
  background: rgba(240, 243, 248, 0.65) !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* SEARCH FIELD NO BOX V148: 搜索框透明无边框 */
body.dark.home-page .search-field {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body:not(.dark).home-page .search-field {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.home-page .search-field:focus-within {
  border: none !important;
  box-shadow: none !important;
}

/* ===== GLASSMORPHISM FIX - 2026-06-07 ===== */
/* Problem: background alpha too high (0.92-0.95), backdrop-filter invisible */
/* Solution: lower alpha, restore backdrop-filter on sidebar */

/* Header: keep clear glass */
body.dark.home-page .header {
  background: rgba(17, 18, 24, 0.72) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
}
body:not(.dark).home-page .header {
  background: rgba(240, 243, 248, 0.6) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
}

/* Section cards: lower alpha for visible blur */
body.dark.home-page .section-card {
  background: rgba(26, 27, 32, 0.7) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
  backdrop-filter: blur(16px) saturate(150%) !important;
}
body:not(.dark).home-page .section-card {
  background: rgba(240, 243, 248, 0.6) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%) !important;
  backdrop-filter: blur(16px) saturate(150%) !important;
}

/* Sidebar: restore glass effect */
body.dark.home-page .sidebar-section,
body.dark.home-page .sidebar-item {
  background: rgba(26, 27, 32, 0.65) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
}
body:not(.dark).home-page .sidebar-section,
body:not(.dark).home-page .sidebar-item {
  background: rgba(245, 247, 250, 0.55) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
}

/* Content list items glass */
body.dark.home-page .content-list-item {
  background: rgba(26, 27, 32, 0.7) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
}
body:not(.dark).home-page .content-list-item {
  background: rgba(245, 247, 250, 0.6) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
}
/* ===== END GLASSMORPHISM FIX ===== */

/* ===== HEADER NO-BOX V150 FINAL: higher-specificity override to beat site-ui.css cascade ===== */
html body.dark.home-page .header,
html.theme-preload-dark body.home-page .header {
  background: rgba(17, 18, 24, 0.45) !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  backdrop-filter: blur(20px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
}
html body:not(.dark).home-page .header {
  background: rgba(240, 243, 248, 0.35) !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  backdrop-filter: blur(20px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
}
html body.dark.home-page .header-inner,
html.theme-preload-dark body.home-page .header-inner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html body:not(.dark).home-page .header-inner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
/* ===== END HEADER NO-BOX V150 ===== */

/* Fix: beian link — no border/background box */
body.home-page .beian-link {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.home-page .beian-link:hover {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-primary) !important;
}

/* ===== GLASSMORPHISM V153: Match Agent Hub exactly ===== */
/* Agent Hub uses:
   .glass: hsla(230,20%,12%,0.45) + blur(20px)
   .glass-strong: hsla(230,20%,15%,0.65) + blur(30px)
   Cards: hsla(230,20%,10%,0.7) + blur(16px)
   No saturate() on glass elements
   Border: hsla(220,15%,40%,0.2)
*/

/* Header: glass-strong (matches Agent Hub modals/panels) */
html body.dark.home-page .header,
html.theme-preload-dark body.home-page .header {
  background: rgba(38, 40, 48, 0.65) !important;
  border: 1px solid rgba(87, 93, 102, 0.2) !important;
  border-bottom: 1px solid rgba(87, 93, 102, 0.2) !important;
  box-shadow: none !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
}
html body:not(.dark).home-page .header {
  background: rgba(232, 234, 237, 0.65) !important;
  border: 1px solid rgba(163, 168, 179, 0.2) !important;
  border-bottom: 1px solid rgba(163, 168, 179, 0.2) !important;
  box-shadow: none !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
}

/* Section cards: bg-card level */
html body.dark.home-page .section-card {
  background: rgba(26, 27, 32, 0.7) !important;
  border: 1px solid rgba(87, 93, 102, 0.2) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .section-card {
  background: rgba(245, 246, 249, 0.85) !important;
  border: 1px solid rgba(163, 168, 179, 0.2) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Sidebar: standard glass */
html body.dark.home-page .sidebar-section,
html body.dark.home-page .sidebar-item {
  background: rgba(31, 32, 38, 0.45) !important;
  border: 1px solid rgba(87, 93, 102, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}
html body:not(.dark).home-page .sidebar-section,
html body:not(.dark).home-page .sidebar-item {
  background: rgba(245, 246, 249, 0.65) !important;
  border: 1px solid rgba(163, 168, 179, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Content list items: bg-card level */
html body.dark.home-page .content-list-item {
  background: rgba(26, 27, 32, 0.7) !important;
  border: 1px solid rgba(87, 93, 102, 0.2) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .content-list-item {
  background: rgba(245, 246, 249, 0.85) !important;
  border: 1px solid rgba(163, 168, 179, 0.2) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
/* ===== END GLASSMORPHISM V153 ===== */

/* ===== GLASSMORPHISM V154: Exact Agent Hub match ===== */
/* Agent Hub actual values:
   Header: rgba(15,23,42,0.9) + blur(16px) + border-bottom rgba(51,65,85,0.8)
   Cards:  linear-gradient(180deg, rgba(30,41,59,0.98), rgba(15,23,42,0.96)) + border #334155
   Tabs:   rgba(15,23,42,0.72) + border #1e293b
   Login:  rgba(17,26,43,0.88) + blur(20px) + border rgba(147,163,184,0.16)
*/

/* Header — Agent Hub global-nav style */
html body.dark.home-page .header,
html.theme-preload-dark body.home-page .header {
  background: rgba(15, 23, 42, 0.9) !important;
  border: none !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .header {
  background: rgba(241, 245, 249, 0.9) !important;
  border: none !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.8) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Section cards — Agent Hub stat-card/page-header style */
html body.dark.home-page .section-card,
html.theme-preload-dark body.home-page .section-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96)) !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .section-card {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.96)) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.15) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Sidebar — Agent Hub section-tabs style */
html body.dark.home-page .sidebar-section,
html body.dark.home-page .sidebar-item,
html.theme-preload-dark body.home-page .sidebar-section,
html.theme-preload-dark body.home-page .sidebar-item {
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid #1e293b !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .sidebar-section,
html body:not(.dark).home-page .sidebar-item {
  background: rgba(241, 245, 249, 0.72) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Content list items — Agent Hub stat-card style */
html body.dark.home-page .content-list-item,
html.theme-preload-dark body.home-page .content-list-item {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96)) !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html body:not(.dark).home-page .content-list-item {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.96)) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Search input — Agent Hub tab-btn style */
html body.dark.home-page .search-input,
html body.dark.home-page input.search-input[type=search],
html.theme-preload-dark body.home-page .search-input,
html.theme-preload-dark body.home-page input.search-input[type=search] {
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid #1e293b !important;
  box-shadow: none !important;
  color: #e2e8f0 !important;
}
html body.dark.home-page .search-submit,
html.theme-preload-dark body.home-page .search-submit {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
}

/* Sidebar pinned items */
html body.dark.home-page .sidebar-pinned-item,
html.theme-preload-dark body.home-page .sidebar-pinned-item {
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid #1e293b !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Footer — transparent, no box */
html body.dark.home-page .site-footer,
html.theme-preload-dark body.home-page .site-footer {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html body.dark.home-page .beian-link,
html body.dark.home-page .beian-link:hover,
html.theme-preload-dark body.home-page .beian-link,
html.theme-preload-dark body.home-page .beian-link:hover {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* ===== END GLASSMORPHISM V154 ===== */

/* ===== COLOR SYNC V155: Agent Hub palette for homepage ===== */
html body.dark.home-page,
html.theme-preload-dark body.home-page {
  --ui-bg: #0f172a !important;
  --ui-bg-2: #1e293b !important;
  --ui-panel: rgba(30, 41, 59, 0.92) !important;
  --ui-panel-solid: #1e293b !important;
  --ui-text: #e2e8f0 !important;
  --ui-muted: #94a3b8 !important;
  --ui-border: rgba(51, 65, 85, 0.8) !important;
  --ui-accent: #818cf8 !important;
  --ui-accent-2: #6366f1 !important;
  --ui-accent-soft: rgba(129, 140, 248, 0.15) !important;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
}
html body:not(.dark).home-page {
  --ui-bg: #f1f5f9 !important;
  --ui-bg-2: #e2e8f0 !important;
  --ui-panel: rgba(241, 245, 249, 0.92) !important;
  --ui-panel-solid: #f1f5f9 !important;
  --ui-text: #1e293b !important;
  --ui-muted: #64748b !important;
  --ui-border: rgba(203, 213, 225, 0.8) !important;
  --ui-accent: #6366f1 !important;
  --ui-accent-2: #4f46e5 !important;
  --ui-accent-soft: rgba(99, 102, 241, 0.12) !important;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

/* Nav links — Agent Hub global-nav-a style */
html body.dark.home-page .nav a,
html.theme-preload-dark body.home-page .nav a {
  color: #e2e8f0 !important;
  border-radius: 8px !important;
}
html body.dark.home-page .nav a:hover,
html.theme-preload-dark body.home-page .nav a:hover {
  background: #818cf8 !important;
  color: #fff !important;
  border-color: transparent !important;
}
html body.dark.home-page .nav a[aria-current=page],
html.theme-preload-dark body.home-page .nav a[aria-current=page] {
  background: rgba(129, 140, 248, 0.18) !important;
  color: #818cf8 !important;
  border-color: transparent !important;
}

/* Theme toggle — Agent Hub button style */
html body.dark.home-page .theme-toggle,
html.theme-preload-dark body.home-page .theme-toggle {
  border: 1px solid #334155 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  color: #cbd5e1 !important;
}
html body.dark.home-page .theme-toggle:hover,
html.theme-preload-dark body.home-page .theme-toggle:hover {
  color: #fff !important;
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.18) !important;
}
/* ===== END COLOR SYNC V155 ===== */

/* V158 MINIMAL FIX: 只修3个框框，不改颜色不改布局 */
/* 顶栏：透明毛玻璃 */
html body.dark.home-page .header,
html.theme-preload-dark body.home-page .header {
  background: rgba(15, 23, 42, 0.75) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
/* 备案：透明无边框 */
html body.dark.home-page .site-footer,
html.theme-preload-dark body.home-page .site-footer {
  background: transparent !important;
  border-top: none !important;
  box-shadow: none !important;
}
html body.dark.home-page .beian-link,
html body.dark.home-page .beian-link:hover,
html.theme-preload-dark body.home-page .beian-link,
html.theme-preload-dark body.home-page .beian-link:hover {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
