/* EZ搜索 ezsousuo.com - 聚合搜索（无标题居中版） */
:root {
  --primary: #2b6cf5;
  --primary-dark: #1e56d6;
  --accent: #7b3ff2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2430;
  --text-2: #6b7280;
  --border: #e5e9f2;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(43, 108, 245, .10);
  --shadow-hover: 0 8px 24px rgba(43, 108, 245, .16);
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header（窄条） ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header-nav { display: flex; align-items: center; gap: 4px; }

/* 导航项做成胶囊：默认淡底，hover 上浮变蓝，当前项实心蓝 */
.header-nav a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 15px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}
.header-nav a:hover { color: var(--primary); background: rgba(43, 108, 245, .09); }
.header-nav .nav-home,
.header-nav .nav-about { font-weight: 600; color: var(--text); }
.header-nav .nav-home:hover,
.header-nav .nav-about:hover { background: rgba(43, 108, 245, .12); }

.header-nav .nav-g.is-on,
.header-nav .nav-home.is-on,
.header-nav .nav-about.is-on {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 2px 8px rgba(43, 108, 245, .28);
}
.header-nav .nav-g.is-on:hover,
.header-nav .nav-home.is-on:hover,
.header-nav .nav-about.is-on:hover { color: #fff; background: linear-gradient(120deg, var(--primary), var(--accent)); }

.header-nav .nav-div {
  width: 1px;
  height: 14px;
  margin: 0 5px;
  background: var(--border);
  flex: 0 0 auto;
}

/* 导航项较多，窄屏时整条横向滚动，不换行、不挤压品牌区。
   注意：这里用 margin-left:auto 而不是 justify-content:flex-end——
   滚动容器里用 flex-end 会让溢出的内容往左侧跑，scrollLeft 永远为 0、左半段够不着 */
@media (max-width: 980px) {
  .header-inner { gap: 10px; }
  .header-nav {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .header-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .header-nav { gap: 2px; }
  .header-nav a { height: 27px; padding: 0 9px; font-size: 12.5px; border-radius: 14px; }
  .header-nav .nav-div { margin: 0 3px; height: 12px; }
}

/* ---------- hero ---------- */
/* 桌面端：不再用几何居中，改为「距顶固定偏移 + 剩余空间全部留在下方」，
   内容块落在视口偏上位置，视觉重心更稳，不会因窗口高度变化而上下漂移 */
.hero {
  text-align: center;
  padding: clamp(30px, 16vh, 160px) 20px 12px;
  margin-top: 0;
}
.slogan {
  font-size: 27px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 2px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.slogan::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 8px auto 0;
}

.search-panel {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(43, 108, 245, .13);
  padding: 6px;
  border: 1px solid var(--border);
}

/* 搜索框：聚焦变蓝 + 图标同步高亮，回车即搜（默认百度） */
.search-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 2px solid var(--border);
  border-radius: 11px;
  background: #f2f5fb;
  padding: 0 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-bar:focus-within {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(43, 108, 245, .12);
}
.search-icon {
  color: #9aa3b2;
  flex-shrink: 0;
  transition: color .18s;
}
.search-bar:focus-within .search-icon { color: var(--primary); }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  padding: 13px 0;
  color: var(--text);
  background: transparent;
}
.search-input::placeholder { color: #b0b8c6; }


/* ---------- 引擎大全（无分组标题，卡片行居中） ---------- */
/* margin 不再用 auto：剩余空间留在下方，由 footer 的 margin-top:auto 顶到页面底部 */
.engine-grid-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 20px;
  width: 100%;
}
/* 一个分组可能含多排 .engine-grid，用 column gap 控制排间距 */
.engine-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.engine-section:last-child { margin-bottom: 0; }
.engine-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 卡片整体居中 */
  gap: 8px;
}
.engine-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 14px 6px 8px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.engine-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.engine-card:active { transform: scale(.97); }
.engine-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.engine-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 统一缩放规则，所有图标视觉大小一致 */
}
.engine-name { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ---------- 常用搜索词（搜索框下方，点击填入） ---------- */
.fav-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-width: 720px;
  margin: 10px auto 0;
}
.fav-chip {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .15s;
}
.fav-chip:hover { border-color: var(--primary); }
.fav-word {
  border: none;
  background: transparent;
  padding: 4px 4px 4px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.fav-word:hover { color: var(--primary); }
.fav-del {
  border: none;
  background: transparent;
  color: #b0b8c6;
  font-size: 14px;
  padding: 4px 10px 4px 2px;
  cursor: pointer;
  line-height: 1;
}
.fav-del:hover { color: #e1251b; }
.fav-add {
  border: 1px dashed #b9c4d6;
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.fav-add:hover { color: var(--primary); border-color: var(--primary); }
.fav-input {
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  outline: none;
  width: 180px;
  color: var(--text);
  background: var(--card);
}

/* ---------- 分类选项卡（参考简单搜样式：高亮 + 底部小圆点） ---------- */
.group-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  max-width: 980px;
  margin: 14px auto 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
}
.group-tab {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-2);
  padding: 8px 2px 14px;
  transition: color .15s;
}
.group-tab:hover { color: var(--primary); }
.group-tab.active { color: var(--primary); font-weight: 600; }
.group-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.engine-section[hidden] { display: none; }

/* ---------- 分组独立页（news.html 等）：比其他页少一档距顶，避免显得太空 ---------- */
.hero-sub { padding: clamp(24px, 10vh, 96px) 20px 12px; }

/* ---------- 关于页分组卡片变链接（可点击到分组独立页） ---------- */
.grp-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.grp-card-link:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(43, 108, 245, .10);
}
.grp-more { font-size: 12px; color: #b0b8c6; margin-top: 6px; display: block; }
.grp-card-link:hover .grp-more { color: var(--primary); }

/* ---------- noscript 静态清单（禁用 JS / 不执行 JS 的爬虫可见） ---------- */
.ns-list { max-width: 860px; margin: 0 auto; padding: 30px 20px 40px; color: var(--text-2); font-size: 14px; line-height: 2; }
.ns-list h2 { font-size: 15px; font-weight: 600; color: var(--text); margin: 14px 0 4px; }
.ns-list p { margin: 0; }
.ns-list a { color: var(--primary); text-decoration: none; margin: 0 2px; }
.ns-list a:hover { text-decoration: underline; }

/* ---------- 关于页 ---------- */
.about-wrap { max-width: 860px; margin: 0 auto; padding: 34px 20px 40px; }
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 26px rgba(43, 108, 245, .08);
  padding: 34px 38px 30px;
}
.about-lead { font-size: 15px; color: var(--text-2); line-height: 1.9; }
.about-h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--primary), var(--accent)) 1;
}
.about-h2:first-of-type { margin-top: 0; }
.about-p { font-size: 14.5px; line-height: 2; color: var(--text); margin-bottom: 10px; }
.about-p strong { color: var(--primary); }

/* 三步用法 */
.steps { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.step {
  flex: 1 1 210px;
  background: #f4f7fd;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 16px 18px;
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.step-t { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.step-d { font-size: 13px; color: var(--text-2); line-height: 1.85; }

/* 分组引擎清单 */
.grp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grp-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.grp-title { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.grp-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.grp-list { font-size: 13px; color: var(--text-2); line-height: 1.95; word-break: break-all; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 9px; overflow: hidden; background: var(--bg); }
.faq-item summary {
  cursor: pointer; padding: 12px 16px; font-size: 14.5px; font-weight: 600;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 18px; font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 16px 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.95; }

/* 联系站长 */
.contact-box {
  margin-top: 6px; padding: 20px 22px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(43,108,245,.07), rgba(123,63,242,.07));
  border: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
}
.mail-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 9px 20px; border-radius: 9px; transition: opacity .15s, transform .15s;
}
.mail-link:hover { opacity: .92; transform: translateY(-1px); }
.contact-tip { font-size: 13px; color: var(--text-2); line-height: 1.8; }

@media (max-width: 760px) {
  .about-wrap { padding: 22px 14px 30px; }
  .about-card { padding: 22px 18px 20px; border-radius: 13px; }
  .grp-grid { grid-template-columns: 1fr; }
}

/* ---------- footer（窄条） ---------- */
.site-footer {
  text-align: center;
  margin-top: auto; /* 内容偏上后，把页脚推到页面底部 */
  padding: 8px 20px 10px;
  color: #9aa3b2;
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.site-footer p { line-height: 1.7; }

/* ---------- toast（页内提示，无弹窗） ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(31, 36, 48, .92);
  color: #fff;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 99;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
  /* 移动端内容偏高，关闭垂直居中，避免 flex 负空间导致顶部被裁 */
  .hero { padding: 18px 14px 10px; margin-top: 0; }
  .engine-grid-wrap { margin-bottom: 0; }
  .slogan { font-size: 19px; margin-bottom: 14px; }
  .engine-grid-wrap { padding: 8px 14px 10px; }
  .engine-section { margin-bottom: 14px; }
  .engine-card { padding: 6px 12px 6px 8px; gap: 6px; }
  .group-tabs {
    gap: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .group-tabs::-webkit-scrollbar { display: none; }
  .group-tab { font-size: 13px; padding: 8px 2px 12px; white-space: nowrap; }
  .engine-logo { width: 21px; height: 21px; }
  .engine-name { font-size: 13px; }
  .fav-input { width: 150px; }
}

/* ---------- 深色模式（跟随系统） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121722;
    --card: #1a2130;
    --text: #e8ecf4;
    --text-2: #9aa6b8;
    --border: #2a3346;
    --shadow: 0 4px 18px rgba(0, 0, 0, .40);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .55);
  }
  .site-header, .site-footer { background: #161c2a; }
  .search-bar { background: #141a26; border-color: var(--border); }
  .search-bar:focus-within { background: #111722; }
  .search-input { background: transparent; color: var(--text); }
  .search-input::placeholder { color: #55617a; }
  .engine-logo img { border-radius: 3px; } /* 深色下白色图标底更柔和 */
  .step, .faq-item { background: #1a2130; }
  .about-card { box-shadow: none; }
  .contact-box { background: linear-gradient(135deg, rgba(43,108,245,.14), rgba(123,63,242,.14)); }
}
