/* ============================================================
   AI智达 - 全局样式  |  支持深/浅色主题
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 暗色主题（默认） ────────────────────────────────────── */
:root {
  --sidebar-w: 200px;
  --topbar-h: 52px;
  --bg:        #1a1b26;
  --bg2:       #20212e;
  --bg3:       #252636;
  --card-bg:   #252636;
  --card-hover:#2e3048;
  --accent:    #7c6ff7;
  --text:      #e2e4f0;
  --text-muted:#8b8fa8;
  --text-dim:  #5a5c70;
  --border:    rgba(255,255,255,0.07);
  --shadow:    rgba(0,0,0,0.3);
  --radius:    10px;
  --radius-lg: 16px;
  --transition: 0.22s ease;
  --topbar-bg:  #20212e;
  --topbar-border: rgba(255,255,255,0.07);
  --sidebar-bg: #20212e;
  --sidebar-border: rgba(255,255,255,0.07);
  --tool-card-bg:    #252636;
  --tool-card-hover: #2a2c3e;
  --tool-card-border: rgba(255,255,255,0.07);
  --search-bg: rgba(255,255,255,0.06);
  --search-border: rgba(255,255,255,0.1);
  --search-focus-border: #7c6ff7;
  --tag-hot-bg:   rgba(239,68,68,0.15);
  --tag-hot-text: #f87171;
  --tag-new-bg:   rgba(74,222,128,0.12);
  --tag-new-text: #4ade80;
  --tag-cat-bg:   rgba(124,111,247,0.12);
  --tag-cat-text: #a89fff;
  --footer-bg: #16171f;
  --footer-border: rgba(255,255,255,0.06);
  --divider: rgba(255,255,255,0.06);
  --scrollbar-thumb: rgba(255,255,255,0.12);
  --banner-bg1: #1e2030;
  --banner-bg2: #1a1f2e;
}

/* ── 浅色主题 ────────────────────────────────────────────── */
body.light-mode {
  --bg:        #f4f5f8;
  --bg2:       #ffffff;
  --bg3:       #ebedf2;
  --card-bg:   #ffffff;
  --card-hover:#f7f7fc;
  --text:      #1a1b26;
  --text-muted:#6b6d80;
  --text-dim:  #9b9daf;
  --border:    rgba(0,0,0,0.08);
  --shadow:    rgba(0,0,0,0.1);
  --accent:    #6c5ce7;
  --topbar-bg:  #ffffff;
  --topbar-border: rgba(0,0,0,0.08);
  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(0,0,0,0.08);
  --tool-card-bg:    #ffffff;
  --tool-card-hover: #f7f7fc;
  --tool-card-border: rgba(0,0,0,0.08);
  --search-bg: rgba(0,0,0,0.04);
  --search-border: rgba(0,0,0,0.1);
  --search-focus-border: #6c5ce7;
  --tag-hot-bg:   rgba(239,68,68,0.1);
  --tag-hot-text: #dc2626;
  --tag-new-bg:   rgba(16,185,129,0.1);
  --tag-new-text: #059669;
  --tag-cat-bg:   rgba(108,92,231,0.1);
  --tag-cat-text: #6c5ce7;
  --footer-bg: #e8e9f0;
  --footer-border: rgba(0,0,0,0.06);
  --divider: rgba(0,0,0,0.06);
  --scrollbar-thumb: rgba(0,0,0,0.15);
  --banner-bg1: #e8e9f0;
  --banner-bg2: #eaeaf0;
}

/* ── HTML & Body ─────────────────────────────────────────── */
html { font-size: 14px; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  height: 100%;
  overflow: hidden;
  display: flex;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
ul { list-style: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition), background var(--transition), border-color var(--transition);
  overflow: hidden;
}

/* 折叠状态 */
.sidebar.collapsed { width: 54px; }
.sidebar.collapsed .sidebar-nav { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 0; height: var(--topbar-h); }

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 14px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  transition: padding var(--transition), justify-content var(--transition);
  flex-shrink: 0;
}
/* 展开时：logo-full 可见，logo-collapsed 隐藏 */
.logo-full {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-collapsed { display: none; }
/* 折叠时：logo-full 隐藏，logo-collapsed 可见 */
.sidebar.collapsed .logo-full { display: none; }
.sidebar.collapsed .logo-collapsed { display: flex; align-items: center; justify-content: center; }

.logo-icon-wrap {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.logo-icon-svg {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 8px;
}
.sidebar.collapsed .logo-icon-svg {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.logo-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.logo-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #a89cf7 0%, #6aaaf7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 400;
}
.logo-img { height: 40px; width: auto; object-fit: contain; }
.sidebar.collapsed .logo-img { height: 32px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 8px;
  margin: 1px 6px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  font-size: 13px;
}
.nav-item:hover { background: var(--bg3); }
.nav-item.active { background: rgba(124,111,247,0.15); color: var(--accent); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { font-size: 15px; flex-shrink: 0; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* 多级菜单样式 */
.nav-item-parent {
  position: relative;
}
.nav-item-parent::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent var(--text-muted);
  transition: transform 0.25s ease;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-item-parent.expanded::after {
  transform: rotate(90deg);
}
.nav-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 12px;
  border-left: 1px solid var(--border);
}
.nav-children.expanded {
  max-height: 500px;
}
.nav-child-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 16px;
  cursor: pointer;
  border-radius: 6px;
  margin: 1px 4px 1px 8px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-muted);
}
.nav-child-item:hover { background: var(--bg3); color: var(--text); }
.nav-child-item.active { background: rgba(124,111,247,0.12); color: var(--accent); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  background: rgba(124,111,247,0.18);
  color: var(--accent);
  border-radius: 8px;
  font-size: 10px;
  flex-shrink: 0;
}

/* 折叠后的图标条 */
.sidebar-icons {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  overflow-x: visible;          /* 允许tooltip溢出 */
  z-index: 200;
}
.sidebar.collapsed .sidebar-icons { display: flex; }

/* 侧边栏折叠时允许图标tooltip溢出 */
.sidebar.collapsed { overflow: visible; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
  user-select: none;
  z-index: 201;                 /* 高于sidebar */
}
.icon-btn:hover { background: var(--bg3); }
.icon-btn.active { background: rgba(124,111,247,0.15); }

/* tooltip 浮窗 — 折叠时从右侧弹出 */
.icon-btn::after {
  content: attr(data-label);
  position: fixed;              /* 用fixed定位，不受父级overflow影响 */
  left: 62px;                  /* 54px侧边栏 + 8px间距 */
  top: var(--tooltip-top, 50%);
  transform: translateY(-50%) translateX(-6px);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 300;
  box-shadow: 0 6px 20px var(--shadow);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
/* 有子菜单的按钮：用JS浮窗代替tooltip，隐藏CSS tooltip */
.icon-btn[data-has-submenu]:hover::after {
  display: none;
}

/* 折叠菜单子菜单样式 */
.icon-submenu {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 150px;
  box-shadow: 0 4px 20px var(--shadow);
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.icon-submenu-header {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition);
}
.icon-submenu-header:hover {
  background: var(--bg2);
}
.icon-submenu-item {
  padding: 7px 16px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-submenu-item:hover {
  background: var(--bg2);
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   主内容区
   ============================================================ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: margin-left var(--transition);
}
.main-wrapper.expanded { margin-left: 54px; }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}

.menu-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--bg3); color: var(--text); }
.menu-icon { transition: transform 0.25s ease; display: inline-block; }
.menu-btn.collapsed .menu-icon { transform: rotate(180deg); }

.top-nav { display: flex; gap: 2px; flex: 1; }
.top-nav-item {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.top-nav-item:hover { background: var(--bg3); color: var(--text); }
.top-nav-item.active { color: var(--text); }

.topbar-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.theme-toggle {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  transition: background var(--transition);
  font-size: 17px;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg3); }

.btn-submit {
  padding: 5px 14px;
  background: rgba(124,111,247,0.15);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12.5px;
  border: 1px solid rgba(124,111,247,0.3);
  transition: background var(--transition);
}
.btn-submit:hover { background: rgba(124,111,247,0.28); }
.btn-login {
  padding: 5px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 12.5px;
  transition: opacity var(--transition);
}
.btn-login:hover { opacity: 0.85; }

/* ============================================================
   内容区
   ============================================================ */
.content { flex: 1; overflow-y: auto; }

/* ============================================================
   Hero —— 全新两栏设计
   ============================================================ */
.hero {
  padding: 20px 24px 16px;
  background: var(--bg2);
  position: relative;
  overflow: visible;
  border-bottom: 1px solid var(--divider);
  transition: background var(--transition);
  flex-shrink: 0;
  /* 确保搜索下拉框可以超出 hero 区域向下展示 */
  z-index: 10;
}
/* 背景光晕装饰 */
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  /* 防止光晕溢出 hero 区域 */
  overflow: hidden;
}
.hero-orb-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(124,111,247,0.18) 0%, transparent 70%);
  top: -120px; left: -80px;
}
.hero-orb-2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(79,172,254,0.12) 0%, transparent 70%);
  top: 20px; right: 10%;
}
.hero-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(252,182,122,0.08) 0%, transparent 70%);
  bottom: -60px; left: 35%;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 100;
  max-width: 1150px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 标题区域 ───────────────────── */
.hero-header { margin-bottom: 14px; }

.hero-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(124,111,247,0.12);
  border: 1px solid rgba(124,111,247,0.3);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background var(--transition);
}
.hero-badge-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.hero-badge-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
}
.hero-badge-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 6px;
}
.hero-title-em {
  font-style: normal;
  background: linear-gradient(135deg, #7c6ff7 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}


/* ── Hero两栏布局（左侧搜索 + 右侧资讯）───────────────── */
/* 右侧资讯已隐藏，布局改为单列居中 */
.hero-layout {
  display: flex;
  justify-content: center;
  align-items: start;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}

/* 主内容区 */
.hero-search-panel {
  width: 100%;
}


/* 搜索核心区域 */
.search-core-area {
  width: 100%;
  position: relative;
  z-index: 200;
}

/* 搜索分类 Tabs */
.search-category-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.sc-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.sc-tab:hover { color: var(--text); background: var(--bg2); }
.sc-tab.active {
  color: var(--accent);
  background: rgba(124,111,247,0.12);
  border-color: rgba(124,111,247,0.25);
  font-weight: 600;
}
.sc-icon { font-size: 13px; }

/* 搜索引擎/平台 Tabs */
.search-engine-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.se-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.se-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.se-tab:hover { color: var(--text); background: var(--bg2); }
.se-tab.active {
  color: var(--accent);
  background: rgba(124,111,247,0.12);
  border-color: rgba(124,111,247,0.25);
  font-weight: 600;
}
.se-icon { font-size: 13px; }

/* 主搜索框 */
.hero-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--search-bg);
  border: 1.5px solid var(--search-border);
  border-radius: 10px;
  margin-bottom: 0;
  transition: border-color var(--transition), background var(--transition);
}
.hero-search-box:focus-within {
  border-color: var(--search-focus-border);
}
.hero-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
}
.hero-search-input::placeholder { color: var(--text-muted); }
.hero-search-clear {
  padding: 0 10px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color var(--transition);
  display: none;
}
.hero-search-clear:hover { color: var(--text); }
.hero-search-clear.show { display: block; }
.hero-search-btn {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
  flex-shrink: 0;
  font-size: 15px;
}
.hero-search-btn:hover { opacity: 0.85; }

/* 热搜标签区 */
.hero-search-hots {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 12px;
  width: 100%;
  flex-wrap: wrap;
}
.hots-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.hots-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hot-tag {
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.hot-tag:hover {
  color: var(--accent);
  border-color: rgba(124,111,247,0.4);
  background: rgba(124,111,247,0.08);
  transform: translateY(-1px);
}

/* 搜索历史区 */
.hero-search-history {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.history-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.history-tag {
  padding: 5px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.history-tag:hover {
  color: var(--accent);
  border-color: rgba(124,111,247,0.3);
  background: rgba(124,111,247,0.06);
}
.clear-history {
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  padding: 4px 10px;
  margin-top: 4px;
}
.clear-history:hover {
  color: var(--accent);
  background: rgba(124,111,247,0.06);
  border-radius: 6px;
}

/* 搜索下方热门板块区域 */
.hero-hot-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

/* Hero 搜索实时建议 */
.hero-search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1.5px solid var(--search-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px var(--shadow);
  margin-top: 0;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  animation: fadeInUp 0.15s ease;
}
.hero-search-suggestions::-webkit-scrollbar { width: 4px; }
.hero-search-suggestions::-webkit-scrollbar-track { background: transparent; }
.hero-search-suggestions::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg3); }
.suggestion-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.suggestion-icon .tool-icon-img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.suggestion-info { 
  flex: 1; 
  min-width: 0; 
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.suggestion-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left;
  width: 100%;
}
.suggestion-desc {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
  text-align: left;
  width: 100%;
}
.suggestion-cat {
  font-size: 10px; color: var(--text-dim);
  background: var(--bg3); padding: 2px 6px; border-radius: 4px;
  margin-top: 3px; display: inline-block;
}
.suggestion-empty {
  text-align: center; padding: 24px; color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   回到顶部按钮
   ============================================================ */
.scroll-to-top {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(124,111,247,0.45);
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.85);
  pointer-events: none;
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.scroll-to-top:hover {
  background: var(--accent);
  filter: brightness(1.15);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(124,111,247,0.55);
}
.scroll-to-top:active {
  transform: translateY(0) scale(0.96);
}
.scroll-to-top svg {
  transition: transform 0.25s ease;
}
.scroll-to-top:hover svg {
  transform: translateY(-2px);
}



.hero-hot-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}
.hot-section-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: all var(--transition);
}
.hot-section-card:hover {
  border-color: rgba(124,111,247,0.3);
  background: var(--bg3);
  transform: translateY(-2px);
}
.hot-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hot-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hot-section-more {
  font-size: 12px;
  color: var(--accent);
  transition: opacity var(--transition);
}
.hot-section-more:hover { opacity: 0.7; }

/* 热门工具网格 */
.hot-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.hot-tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition);
}
.hot-tool-item:hover {
  border-color: rgba(124,111,247,0.3);
  background: var(--bg2);
}
.hot-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: linear-gradient(135deg, #7c6ff7 0%, #4facfe 100%);
}
.hot-tool-info {
  flex: 1;
  min-width: 0;
}
.hot-tool-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-tool-desc {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 导航栏收藏角标 ─────────────── */
.nav-badge {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 6px;
  margin-left: 3px;
  vertical-align: 2px;
  line-height: 1.3;
  animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.fav-count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: 2px;
  line-height: 1.4;
}

/* ============================================================
   广告推广区
   ============================================================ */
.promo-section {
  padding: 16px 24px 24px;
  flex-shrink: 0;
}
.promo-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.promo-banner {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.promo-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--shadow);
}
.promo-primary {
  background: linear-gradient(135deg, rgba(124,111,247,0.18) 0%, rgba(79,172,254,0.12) 100%);
  border-color: rgba(124,111,247,0.3);
}
.promo-secondary {
  background: var(--bg2);
  border-style: dashed;
  border-color: var(--text-dim);
}
.promo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 90% 50%, rgba(124,111,247,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.promo-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.promo-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.promo-logo-icon { font-size: 28px; }
.promo-logo-name { font-size: 14px; font-weight: 700; color: var(--text); }
.promo-logo-sub { font-size: 11px; color: var(--text-muted); }
.promo-slogan {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.promo-slogan strong { font-size: 14px; color: var(--text); font-weight: 700; }
.promo-slogan span { font-size: 11.5px; color: var(--text-muted); }
.promo-cta {
  flex-shrink: 0;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}
.promo-cta:hover { opacity: 0.85; transform: scale(1.03); }
.promo-cta-ghost {
  background: transparent;
  border: 1.5px solid var(--text-dim);
  color: var(--text-muted);
}
.promo-cta-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}
.promo-badge {
  position: absolute;
  top: 8px; right: 10px;
  font-size: 10px;
  color: var(--accent);
  background: rgba(124,111,247,0.12);
  border: 1px solid rgba(124,111,247,0.25);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
}
.promo-badge-ghost {
  color: var(--text-dim);
  background: transparent;
  border-color: var(--border);
}



/* ============================================================
   AI 资讯板块
   ============================================================ */
.news-section {
  padding: 12px 24px;
}
.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.news-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.news-more {
  font-size: 12px;
  color: var(--accent);
  transition: opacity var(--transition);
}
.news-more:hover { opacity: 0.7; }

.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all var(--transition);
}
.news-item:hover {
  border-color: rgba(124,111,247,0.4);
  background: var(--bg3);
}
.news-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  background: rgba(124,111,247,0.12);
  color: var(--accent);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}
.news-tag.hot { background: rgba(239,68,68,0.12); color: #f87171; }
.news-tag.new { background: rgba(74,222,128,0.12); color: #4ade80; }
.news-tag.app { background: rgba(251,191,36,0.12); color: #fbbf24; }

.news-content {
  flex: 1;
  min-width: 0;
}
.news-headline {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   工具区域
   ============================================================ */
.tools-section { padding: 0 24px 8px; flex-shrink: 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.section-tag.hot { background: var(--tag-hot-bg); color: var(--tag-hot-text); }
.section-tag.new { background: var(--tag-new-bg); color: var(--tag-new-text); }
.section-tag.cat { background: var(--tag-cat-bg); color: var(--tag-cat-text); }
.section-tag.fav { background: rgba(255,215,0,0.15); color: #f5a623; }
.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}
.section-clear-btn {
  padding: 4px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: all var(--transition);
}
.section-clear-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg1);
}
.view-more { font-size: 12.5px; color: var(--text-muted); cursor: pointer; transition: color var(--transition); }
.view-more:hover { color: var(--accent); }
.tools-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.tool-card {
  background: var(--tool-card-bg);
  border: 1px solid var(--tool-card-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  background: var(--tool-card-hover);
  transform: translateY(-2px);
  border-color: rgba(124,111,247,0.35);
}
.tool-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover::after { opacity: 1; }
.tool-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
/* 图片图标样式 */
.tool-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.tool-info { flex: 1; min-width: 0; }
.tool-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 工具卡片布局更新（支持收藏按钮） ──────────────── */
.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
/* 收藏按钮 */
.fav-btn {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: #ef4444;
  background: transparent;
  border: none;
  flex-shrink: 0;
  opacity: 0;
  transition: all var(--transition);
  cursor: pointer;
  padding: 0;
}
.tool-card:hover .fav-btn { opacity: 1; }
.fav-btn:hover { color: #dc2626; background: rgba(220,38,38,0.1); }
.fav-btn.favorited { color: #dc2626; opacity: 1; }
.fav-btn.favorited svg { fill: currentColor; }


/* 面板高亮动画 */
.favorites-section-highlight {
  animation: section-flash 1.2s ease;
}
@keyframes section-flash {
  0% { background: var(--section-bg); }
  30% { background: rgba(124,111,247,0.08); }
  100% { background: var(--section-bg); }
}

/* ── 工具卡片悬停浮窗 ───────────────────────────────── */

.tool-card {
  position: relative;
}

.tool-card .tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  width: 300px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
  text-align: left;
}

/* 浮窗头部：图标 + 工具名称 */
.tool-card .tooltip .tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.tool-card .tooltip .tooltip-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.tool-card .tooltip .tooltip-icon .tool-icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.tool-card .tooltip .tooltip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.tool-card .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--bg2);
  filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.1));
}

.tool-card .tooltip::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 1px;
  background: var(--border);
}

.tool-card .tooltip .tooltip-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  word-wrap: break-word;
  max-height: 120px;
  overflow-y: auto;
}

.tool-card .tooltip .tooltip-content::-webkit-scrollbar {
  width: 4px;
}
.tool-card .tooltip .tooltip-content::-webkit-scrollbar-track {
  background: transparent;
}
.tool-card .tooltip .tooltip-content::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

.tool-card:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

body.light-mode .tool-card .tooltip {
  background: var(--bg2);
  border-color: var(--border);
}

body.light-mode .tool-card .tooltip::after {
  border-top-color: var(--bg2);
}

body.light-mode .tool-card .tooltip::before {
  background: var(--border);
}

/* 小屏幕不显示浮窗，直接显示在卡片中 */
@media (max-width: 768px) {
  .tool-card .tooltip {
    display: none;
  }
}

/* ============================================================
   分类区块
   ============================================================ */
.category-section { padding: 0 24px 24px; }
.category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* ── 二级分类标签导航 ───────────────────────────────────── */
.subcategory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.subcat-tab {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.subcat-tab:hover {
  color: var(--text);
  background: var(--card-hover);
  border-color: var(--accent);
}

.subcat-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

body.light-mode .subcat-tab {
  background: var(--bg3);
  border-color: var(--border);
}

body.light-mode .subcat-tab:hover {
  background: var(--card-hover);
}

body.light-mode .subcat-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   搜索蒙层
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}
.search-result-box {
  width: 680px;
  max-height: 70vh;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  transition: background var(--transition), border-color var(--transition);
}
.search-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}
.close-search {
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition);
}
.close-search:hover { background: var(--bg3); color: var(--text); }
.search-result-list { overflow-y: auto; padding: 10px; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg3); }
.search-result-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  overflow: hidden;
}
.search-result-icon .tool-icon-img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 9px;
}
.search-result-info { flex: 1; }
.search-result-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.search-result-desc { font-size: 12px; color: var(--text-muted); }
.search-no-result {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  margin-top: auto;
  transition: background var(--transition), border-color var(--transition);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}
.footer-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.footer-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.footer-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.footer-slogan { font-size: 12px; color: var(--accent); font-weight: 500; }
.footer-social { display: flex; gap: 8px; }
.social-link {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.social-link:hover { background: var(--accent); color: #fff; }
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.footer-bottom p { font-size: 12px; color: var(--text-dim); line-height: 1; }
.footer-bottom p + p { margin-top: 4px; }
.footer-bottom a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--accent); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1400px) {
  .tools-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1200px) {
  .hero-title { font-size: 30px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 150px; }
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
  .top-nav-item { padding: 6px 8px; font-size: 12px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); width: 200px; }
  .main-wrapper { margin-left: 0 !important; }
  .main-wrapper.expanded { margin-left: 0 !important; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-banner-row { grid-template-columns: 1fr; }
  .top-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-title { font-size: 28px; }
  .search-category-tabs { flex-wrap: wrap; }
  .search-engine-tabs { justify-content: center; }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 24px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .hero-badge-row { flex-direction: column; gap: 4px; }
}


/* ============================================================
   弹窗样式
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 24px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--bg3); color: var(--text); }
.modal-body {
  padding: 24px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
}
.modal-body p { margin-bottom: 16px; color: var(--text); }
.modal-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 12px;
}
.modal-body ul { margin-bottom: 16px; padding-left: 20px; }
.modal-body li { list-style: disc; margin-bottom: 6px; }
.modal-body strong { color: var(--accent); }

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tool-card, .quick-card, .banner-item, .footer-col {
  animation: fadeInUp 0.35s ease both;
}

/* ============================================================
   顶部搜索框
   ============================================================ */
.topbar-search-wrap {
  position: relative;
  width: 200px;
  transition: width var(--transition);
  flex-shrink: 0;
}
.topbar-search-wrap:focus-within {
  width: 280px;
}
.topbar-search-box {
  display: flex;
  align-items: center;
  background: var(--search-bg);
  border: 1.5px solid var(--search-border);
  border-radius: 20px;
  padding: 0 12px;
  gap: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
  height: 34px;
}
.topbar-search-box:focus-within {
  border-color: var(--search-focus-border);
  box-shadow: 0 0 0 3px rgba(124,111,247,0.15);
}
.topbar-search-icon {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.topbar-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}
.topbar-search-input::placeholder { color: var(--text-muted); }
.topbar-search-clear {
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.topbar-search-clear:hover { color: var(--text); background: var(--bg3); }

/* 自动完成下拉 */
.topbar-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 200;
  display: none;
  animation: fadeInUp 0.15s ease;
  max-height: 360px;
  overflow-y: auto;
}
.topbar-autocomplete.show { display: block; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}
.ac-item:hover, .ac-item.highlighted {
  background: var(--bg3);
}
.ac-item-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.ac-item-name { font-weight: 600; color: var(--text); }
.ac-item-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  background: var(--bg3);
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}
.ac-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
mark.ac-highlight {
  background: rgba(124,111,247,0.35);
  color: #fff;
  border-radius: 2px;
  padding: 0 1px;
}

/* ============================================================
   登录弹窗
   ============================================================ */
.modal-login {
  max-width: 400px !important;
  border-radius: 20px !important;
  padding-bottom: 8px;
}
.login-logo {
  text-align: center;
  padding: 32px 24px 16px;
}
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.login-tabs {
  display: flex;
  margin: 0 24px 20px;
  border-bottom: 1px solid var(--border);
}
.login-tab {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}
.login-tab.active { color: var(--accent); }
.login-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.login-panel { padding: 0 24px 20px; }

/* 微信二维码 */
.wechat-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.wechat-qr-placeholder {
  position: relative;
  width: 160px; height: 160px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--text-muted);
}
.qr-mock {
  opacity: 0.5;
}
.qr-wx-icon {
  position: absolute;
  bottom: 12px; right: 12px;
  background: var(--bg2);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.qr-tip {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.qr-tip-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* 手机登录 */
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-field { position: relative; }
.login-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { color: var(--text-muted); }
.login-code-row { display: flex; gap: 8px; }
.login-code-row .login-input { flex: 1; }
.btn-send-code {
  padding: 0 14px;
  background: rgba(124,111,247,0.15);
  color: var(--accent);
  border: 1px solid rgba(124,111,247,0.3);
  border-radius: 10px;
  font-size: 12.5px;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.btn-send-code:hover { background: rgba(124,111,247,0.28); }
.btn-send-code:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-login-submit {
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity var(--transition);
}
.btn-login-submit:hover { opacity: 0.88; }
.login-agree {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 24px 20px;
}
.login-agree a { color: var(--accent); }

/* 用户头像 */
.user-avatar-wrap {
  position: relative;
  cursor: pointer;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  border: 2px solid rgba(124,111,247,0.4);
  transition: border-color var(--transition);
}
.user-avatar:hover { border-color: var(--accent); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;
  animation: fadeInUp 0.15s ease;
  z-index: 300;
}
.user-avatar-wrap:hover .user-dropdown,
.user-avatar-wrap.open .user-dropdown { display: block; }
.user-dropdown-info {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.user-dd-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.user-dd-email {
  font-size: 12px;
  color: var(--text-muted);
}
.user-dropdown-divider { height: 1px; background: var(--border); }
.user-dd-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.user-dd-item:hover { background: var(--bg3); color: var(--text); }

/* ============================================================
   Footer 增强
   ============================================================ */
.footer-stats {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}
.footer-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.footer-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.footer-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}
.footer-bottom-left { display: flex; flex-direction: column; gap: 4px; }
.footer-bottom-left a { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* ============================================================
   关于我们弹窗
   ============================================================ */
.modal-about { max-width: 640px !important; }
.modal-wide { max-width: 640px !important; }
.about-hero {
  text-align: center;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.about-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.about-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.about-logo-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}
.about-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 6px;
}
.about-tagline {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
}
.about-stats {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.about-stat {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  border-right: 1px solid var(--border);
  transition: background var(--transition);
}
.about-stat:last-child { border-right: none; }
.about-stat:hover { background: var(--bg3); }
.about-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.about-stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
}
.about-section {
  margin-bottom: 20px;
}
.about-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.about-section p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 8px;
}
.about-section p strong { color: var(--accent); }
.about-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-feature-icon { font-size: 20px; flex-shrink: 0; }
.about-feature strong { font-size: 13.5px; color: var(--text); display: block; margin-bottom: 2px; }
.about-feature p { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.about-contacts { display: flex; flex-direction: column; gap: 12px; }
.about-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-contact-icon { font-size: 20px; flex-shrink: 0; }
.about-contact-item strong { font-size: 13.5px; color: var(--text); display: block; margin-bottom: 2px; }
.about-contact-item p { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.about-contact-item a { color: var(--accent); }
.about-contact-item code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--accent);
}

/* ============================================================
   提交工具弹窗
   ============================================================ */
.modal-submit { max-width: 600px !important; }
.submit-intro {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}
.submit-intro strong { color: var(--accent); }
.submit-form { display: flex; flex-direction: column; gap: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.form-label .req { color: #f87171; }
.form-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b8fa8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.form-textarea { resize: vertical; min-height: 72px; }
.submit-criteria-tip {
  padding: 12px 14px;
  background: rgba(124,111,247,0.08);
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
.link-inline { color: var(--accent); font-size: 12px; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.btn-cancel {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-cancel:hover { color: var(--text); }
.btn-submit-form {
  padding: 9px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: opacity var(--transition);
}
.btn-submit-form:hover { opacity: 0.88; }

/* ============================================================
   联系方式弹窗
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.contact-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.contact-card-icon { font-size: 28px; margin-bottom: 8px; }
.contact-card h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.contact-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.contact-qr-placeholder {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  height: 80px;
  display: flex; align-items: center; justify-content: center;
}
.contact-qr-mock { font-size: 12px; color: var(--text-dim); }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.contact-list-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.contact-list-item strong { font-size: 13.5px; color: var(--text); display: block; margin-bottom: 2px; }
.contact-list-item p { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.contact-list-item a { color: var(--accent); }

/* ============================================================
   隐私政策弹窗
   ============================================================ */
.privacy-update {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  margin-top: -4px;
}

/* ============================================================
   合作咨询弹窗
   ============================================================ */
.cooperate-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.cooperate-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cooperate-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.cooperate-item strong { font-size: 13.5px; color: var(--text); display: block; margin-bottom: 3px; }
.cooperate-item p { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.cooperate-contact {
  padding: 14px 16px;
  background: rgba(124,111,247,0.07);
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: var(--radius);
  margin-top: 4px;
}
.cooperate-contact p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.8; }
.link-accent { color: var(--accent); font-weight: 500; }

/* ============================================================
   收录要求弹窗
   ============================================================ */
.criteria-section { margin-bottom: 16px; }
.criteria-section h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.criteria-section ul { padding-left: 20px; }
.criteria-section li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.9;
  list-style: disc;
}
.criteria-note {
  padding: 12px 16px;
  background: rgba(124,111,247,0.07);
  border: 1px solid rgba(124,111,247,0.2);
  border-radius: var(--radius);
  margin-top: 16px;
}
.criteria-note p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ============================================================
   实用导航弹窗
   ============================================================ */
.useful-nav-intro {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.useful-nav-section {
  margin-bottom: 24px;
}

.useful-nav-section:last-child {
  margin-bottom: 0;
}

.useful-nav-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.useful-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 560px) {
  .useful-nav-grid {
    grid-template-columns: 1fr;
  }
}

.useful-nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.useful-nav-card:hover {
  background: var(--bg2);
  border-color: rgba(124,111,247,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.nav-card-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,111,247,0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.nav-card-info {
  flex: 1;
  min-width: 0;
}

.nav-card-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.nav-card-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Toast 通知
   ============================================================ */
.toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  font-size: 13.5px;
  color: var(--text);
  min-width: 220px;
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast.toast-success { border-color: rgba(74,222,128,0.4); }
.toast.toast-error { border-color: rgba(248,113,113,0.4); }
.toast.toast-info { border-color: rgba(124,111,247,0.4); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close {
  font-size: 14px;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: background var(--transition);
  flex-shrink: 0;
  pointer-events: auto;
}
.toast-close:hover { background: var(--bg3); }
.toast.leaving { animation: toastOut 0.25s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ============================================================
   模态框关闭按钮统一（无标题的弹窗用绝对定位）
   ============================================================ */
.modal-login > .modal-close,
.modal-login .modal-close:not([data-modal]) {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  color: var(--text-muted);
  transition: background var(--transition);
}
.modal-login { position: relative; overflow: visible; }

/* ============================================================
   Hero 右侧 AI 资讯常驻面板
   ============================================================ */
.hero-news-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow);
  max-height: 420px;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.hero-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(168,85,247,0.05) 100%);
  flex-shrink: 0;
}

.hero-news-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.hero-news-icon { font-size: 16px; }

.hero-news-live {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  padding: 1px 7px;
  border-radius: 10px;
  animation: pulse-badge 2s ease-in-out infinite;
}

.hero-news-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}
.hero-news-more:hover { opacity: 0.75; }

.hero-news-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.hero-news-list::-webkit-scrollbar { width: 3px; }
.hero-news-list::-webkit-scrollbar-track { background: transparent; }
.hero-news-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

.hero-news-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  animation: news-item-in 0.4s ease both;
}
.hero-news-item:last-child { border-bottom: none; }
.hero-news-item:hover { background: var(--bg3); }

@keyframes news-item-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-news-item-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  padding-top: 2px;
}

.hero-news-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.hero-news-hot { font-size: 11px; text-align: center; }

.hero-news-item-body {
  flex: 1;
  min-width: 0;
}

.hero-news-item-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  transition: color var(--transition);
}
.hero-news-item:hover .hero-news-item-title { color: var(--accent); }

.hero-news-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-news-item-source { font-size: 10.5px; color: var(--text-muted); font-weight: 500; }
.hero-news-item-time   { font-size: 10px; color: var(--text-dim); }
.hero-news-item-reads  { font-size: 10px; color: var(--text-dim); }

.hero-news-item-arrow {
  font-size: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-top: 2px;
  transition: color var(--transition), transform var(--transition);
}
.hero-news-item:hover .hero-news-item-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ============================================================
   AI 资讯全屏面板（主题变量版）
   ============================================================ */
.news-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 0;
}
.news-panel-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.news-panel {
  background: var(--bg2);
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transform: translateY(-30px);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), background var(--transition);
  box-shadow: 0 0 60px var(--shadow);
}
.news-panel-overlay.open .news-panel { transform: translateY(0); }
.news-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(168,85,247,0.06) 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.news-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.news-panel-icon { font-size: 24px; }
.news-panel-badge {
  font-size: 11px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,100% { opacity:1; }
  50% { opacity:0.6; }
}
.news-panel-close {
  background: var(--bg3);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.news-panel-close:hover {
  background: var(--border);
  color: var(--text);
  transform: rotate(90deg);
}
.news-panel-cats {
  display: flex;
  gap: 8px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg2);
  position: sticky;
  top: 65px;
  z-index: 9;
  transition: background var(--transition);
}
.news-panel-cats::-webkit-scrollbar { display: none; }
.news-cat-btn {
  white-space: nowrap;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.news-cat-btn:hover {
  background: rgba(99,102,241,0.1);
  color: var(--accent);
  border-color: var(--accent);
}
.news-cat-btn.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.news-panel-body {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 16px;
  padding: 24px 28px;
  align-content: start;
}
.news-card { animation: news-card-in 0.4s ease forwards; opacity: 0; }
@keyframes news-card-in {
  from { opacity:0; transform:translateY(15px); }
  to { opacity:1; transform:translateY(0); }
}
.news-card-inner {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-card-inner:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.15);
}
.news-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.news-hot-badge { font-size: 11px; color: #fb923c; background: rgba(251,146,60,0.12); padding: 2px 7px; border-radius: 4px; }
.news-source { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.news-time { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.news-card-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5; margin: 0; }
.news-card-summary {
  font-size: 13px; color: var(--text-muted); line-height: 1.65; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border);
}
.news-reads { font-size: 12px; color: var(--text-dim); }
.news-read-more { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; transition: opacity 0.2s; }
.news-read-more:hover { opacity: 0.75; }
.news-panel-footer { padding: 16px 28px 24px; text-align: center; border-top: 1px solid var(--border); }
.news-load-more {
  background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; border: none;
  padding: 10px 32px; border-radius: 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.news-load-more:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.35); }
.news-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.news-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ============================================================
   侧边抽屉通用（热门榜 + 收藏夹）— 主题变量版
   ============================================================ */
.side-drawer {
  position: fixed;
  top: var(--topbar-h); right: 0;
  height: calc(100vh - var(--topbar-h));
  width: 380px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 1900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), background var(--transition), border-color var(--transition);
  box-shadow: -8px 0 32px var(--shadow);
}
.side-drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(168,85,247,0.06) 100%);
  flex-shrink: 0;
}
.drawer-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--text); }
.drawer-close {
  background: var(--bg3); border: none; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.drawer-close:hover { background: var(--border); color: var(--text); transform: rotate(90deg); }
.drawer-footer { padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* ── 热门榜 ── */
.rank-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.rank-tab-btn {
  flex: 1; background: none; border: none; color: var(--text-muted);
  padding: 12px 0; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.rank-tab-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, #6366f1, #a855f7);
  transform: scaleX(0); transition: transform 0.2s;
}
.rank-tab-btn.active { color: var(--text); font-weight: 700; }
.rank-tab-btn.active::after { transform: scaleX(1); }
.rank-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.rank-list::-webkit-scrollbar { width: 4px; }
.rank-list::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer; transition: background 0.18s; }
.rank-item:hover { background: var(--bg3); }
.rank-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg3);
  color: var(--text-muted); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rank-num.top3 { background: transparent; font-size: 20px; }
.rank-icon {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(99,102,241,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; overflow: hidden;
}
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.rank-bar-wrap { height: 3px; background: var(--border); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.rank-bar { height: 100%; border-radius: 2px; transition: width 0.6s cubic-bezier(.4,0,.2,1); }
.rank-meta { text-align: right; flex-shrink: 0; }
.rank-clicks { font-size: 13px; font-weight: 700; color: var(--text); }
.rank-cat-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-top: 3px; font-weight: 500; }
.rank-update-hint { font-size: 12px; color: var(--text-dim); text-align: center; margin: 0; }

/* ── 收藏夹抽屉 ── */
.fav-drawer-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
}
.fav-drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.fav-drawer-body::-webkit-scrollbar { width: 4px; }
.fav-drawer-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }
.fav-empty { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.fav-empty-icon { font-size: 48px; margin-bottom: 12px; filter: grayscale(0.3); }
.fav-empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.fav-empty-hint { font-size: 13px; line-height: 1.6; }
.fav-drawer-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; transition: background 0.18s; }
.fav-drawer-item:hover { background: var(--bg3); }
.fav-tool-icon {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(99,102,241,0.08);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.fav-tool-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.fav-tool-emoji { font-size: 22px; }
.fav-tool-info { flex: 1; min-width: 0; }
.fav-tool-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-tool-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.fav-tool-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fav-open-btn {
  width: 30px; height: 30px; background: rgba(99,102,241,0.1); color: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 14px; font-weight: 700; transition: all 0.2s;
}
.fav-open-btn:hover { background: rgba(99,102,241,0.22); transform: translateY(-1px); }
.fav-remove-btn {
  width: 30px; height: 30px; background: rgba(239,68,68,0.08); color: var(--tag-hot-text);
  border: none; border-radius: 8px; cursor: pointer; font-size: 12px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.fav-remove-btn:hover { background: rgba(239,68,68,0.18); transform: translateY(-1px); }
.fav-clear-btn {
  width: 100%; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15);
  color: var(--tag-hot-text); padding: 9px 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.fav-clear-btn:hover { background: rgba(239,68,68,0.18); transform: translateY(-1px); }

/* ============================================================
   响应式补充
   ============================================================ */
@media (max-width: 860px) {
  .topbar-search-wrap { width: 160px; }
  .topbar-search-wrap:focus-within { width: 200px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-news-panel { max-height: 300px; }
}
@media (max-width: 768px) {
  .news-panel-body { grid-template-columns: 1fr; padding: 16px; }
  .news-panel-header, .news-panel-cats { padding-left: 16px; padding-right: 16px; }
  .side-drawer { width: 100vw; }
}
@media (max-width: 560px) {
  .topbar-search-wrap { display: none; }
  .footer-stats { gap: 12px; }
  .about-stats { flex-wrap: wrap; }
  .about-stat { flex: calc(50% - 1px); }
}
