/* ============================================================
   AI 头绪导航 · 浅色清新科技主题
   主色：青碧 + 晴蓝，白底通透，柔和光晕
   ============================================================ */
:root {
  --bg: #f4f8fb;
  --bg-soft: #eef4f9;
  --panel: rgba(255, 255, 255, 0.85);
  --panel-solid: #ffffff;
  --border: rgba(23, 78, 122, 0.10);
  --border-strong: rgba(20, 160, 155, 0.45);
  --text: #1d2b3a;
  --muted: #6b7f96;
  --accent: #0fb5a6;
  --accent-2: #3d8bfd;
  --accent-soft: rgba(15, 181, 166, 0.10);
  --warn: #e8871e;
  --danger: #e5484d;
  --radius: 14px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
::selection { background: rgba(15, 181, 166, 0.22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #c9d8e4; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9bfd2; }

/* ---------- 背景氛围（浅色柔光） ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 34% at 10% -4%, rgba(15, 181, 166, 0.14), transparent 62%),
    radial-gradient(44% 38% at 90% 2%, rgba(61, 139, 253, 0.13), transparent 62%),
    radial-gradient(50% 42% at 50% 106%, rgba(120, 160, 255, 0.10), transparent 60%);
  animation: auroraDrift 22s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.06); }
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 139, 253, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 139, 253, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}

/* ---------- 公告栏 ---------- */
.announce-bar {
  display: flex; align-items: center; gap: 10px;
  max-width: 1080px; margin: 22px auto 26px; padding: 9px 16px;
  background: linear-gradient(90deg, rgba(15, 181, 166, 0.09), rgba(61, 139, 253, 0.09));
  border: 1px solid rgba(15, 181, 166, 0.25); border-radius: 10px;
  font-size: 13px; color: var(--muted);
  animation: fadeDown 0.5s ease both;
}
.announce-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(15, 181, 166, 0.7);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.announce-close {
  margin-left: auto; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px;
}
.announce-close:hover { color: var(--text); background: rgba(23, 78, 122, 0.08); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 16px 20px 12px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  flex: none;
}
.brand-mark { width: 34px; height: 34px; color: var(--accent); filter: drop-shadow(0 0 8px rgba(15,181,166,0.45)); }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 1px; }
.brand-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  color: var(--accent); border: 1px solid rgba(15, 181, 166, 0.4);
  padding: 2px 7px; border-radius: 5px; background: var(--accent-soft);
}

.search-wrap { position: relative; flex: 1 1 300px; min-width: 240px; }
.search-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.stab {
  font-size: 12px; color: var(--muted); cursor: pointer; user-select: none;
  padding: 2px 12px; border-radius: 14px; border: 1px solid transparent; transition: all 0.15s;
}
.stab:hover { color: var(--text); border-color: var(--border); }
.stab.active {
  color: #ffffff; font-weight: 600; background: linear-gradient(135deg, var(--accent), #35c9ff);
  border-color: transparent; box-shadow: 0 2px 8px rgba(15,181,166,0.3);
}
.search-bar { position: relative; }
.search-bar .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}
.search-bar #searchInput {
  width: 100%; padding: 11px 76px 11px 40px;
  background: var(--panel-solid); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font); outline: none;
  box-shadow: 0 2px 8px rgba(23, 78, 122, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar #searchInput::placeholder { color: #9db0c4; }
.search-bar #searchInput:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(15, 181, 166, 0.12), 0 4px 14px rgba(15, 181, 166, 0.12);
}
.search-bar .search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(23, 78, 122, 0.08); color: var(--muted); font-size: 11px;
}
.search-clear:hover { background: rgba(23, 78, 122, 0.16); color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.bookmark-link {
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
  text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 4px 10px; border: 1px dashed rgba(23, 78, 122, 0.25); border-radius: 8px;
  cursor: grab; transition: all 0.2s;
}
.bookmark-link:hover { color: var(--accent); border-color: rgba(15, 181, 166, 0.5); background: var(--accent-soft); }
.bk-hint { font-size: 10px; font-weight: 400; color: #9db0c4; }
.header-feedback-btn {
  flex: none; font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 8px 15px; border-radius: 9px; cursor: pointer;
  background: var(--panel-solid); color: var(--accent);
  border: 1px solid rgba(15, 181, 166, 0.45); transition: all 0.2s;
}
.header-feedback-btn:hover { background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(15,181,166,0.15); }
.admin-link {
  text-decoration: none; color: var(--muted); font-size: 17px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid transparent; transition: all 0.2s;
}
.admin-link:hover { color: var(--accent); border-color: var(--border); background: var(--panel-solid); }
.submit-btn {
  flex: none; font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 8px 15px; border-radius: 9px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #35c9ff); color: #ffffff;
  box-shadow: 0 3px 12px rgba(15, 181, 166, 0.35); transition: all 0.2s;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(15, 181, 166, 0.5); }

/* 热门搜索 + 境外过滤 */
.hot-wrap {
  max-width: 1080px; margin: 0 auto; padding: 0 20px 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hot-label {
  font-size: 12px; color: var(--warn); font-weight: 600; letter-spacing: 1px;
  border: 1px solid rgba(232, 135, 30, 0.35); padding: 1px 8px; border-radius: 5px;
  background: rgba(232, 135, 30, 0.07);
}
.hot-list { display: flex; gap: 8px; flex-wrap: wrap; }
.hot-tag {
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  padding: 2px 10px; border-radius: 20px; border: 1px solid transparent;
  transition: all 0.18s; cursor: pointer;
}
.hot-tag:hover { color: var(--accent); border-color: rgba(15, 181, 166, 0.4); background: var(--accent-soft); }
.filter-toggle {
  margin-left: auto; font-size: 12.5px; color: var(--muted); cursor: pointer;
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--panel-solid); user-select: none; transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.filter-toggle.on { color: var(--accent); border-color: rgba(15,181,166,0.5); background: var(--accent-soft); }

/* ---------- 分类导航 ---------- */
.cat-nav {
  position: sticky; top: 72px; z-index: 40;
  background: rgba(244, 248, 251, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.cat-nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-pill.pinned {
  color: #04120f; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #35c9ff);
  box-shadow: 0 3px 12px rgba(15, 181, 166, 0.32);
  border-color: transparent;
  cursor: default;
}
.cat-pill.dragging { opacity: 0.5; }
.cat-pill.drop-here { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(15,181,166,0.25); }
.cat-pill {
  flex: none; font-size: 13.5px; color: var(--muted);
  padding: 6px 14px; border-radius: 20px; cursor: pointer; user-select: none;
  border: 1px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.cat-pill:hover { color: var(--text); border-color: var(--border); background: var(--panel-solid); }
.cat-pill.active {
  color: #ffffff; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #35c9ff);
  box-shadow: 0 4px 14px rgba(15, 181, 166, 0.35);
}

/* ---------- 内容 ---------- */
.content { max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; }
.section { margin-bottom: 44px; scroll-margin-top: 150px; }
.section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.section-icon { font-size: 22px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.section-title::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 8px;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
  box-shadow: 0 0 8px rgba(15, 181, 166, 0.6);
}
.section-count {
  margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); padding: 2px 9px; border-radius: 20px;
  background: var(--panel-solid);
}

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 14px; text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
  box-shadow: 0 2px 10px rgba(23, 78, 122, 0.05);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  animation: cardIn 0.5s ease both;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 0% 0%, rgba(15, 181, 166, 0.07), transparent 55%);
  transition: opacity 0.25s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 26px rgba(23, 78, 122, 0.12), 0 0 0 1px rgba(15, 181, 166, 0.10);
}
.card:hover::before { opacity: 1; }
.card.hide { display: none; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-fav {
  width: 48px; height: 48px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(23, 78, 122, 0.05);
  border: 1px solid var(--border);
  font-size: 22px; font-weight: 700; overflow: hidden;
}
.card-fav img { width: 30px; height: 30px; object-fit: contain; }
.card-fav.letter { color: var(--accent); font-family: var(--mono); }

.card-body { min-width: 0; flex: 1; }
.card-name {
  font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.fav-remove {
  background: rgba(23, 78, 122, 0.08); border: none; color: var(--muted);
  width: 18px; height: 18px; border-radius: 50%; font-size: 12px; line-height: 1;
  cursor: pointer; flex: none; transition: all 0.15s;
}
.fav-remove:hover { background: var(--danger); color: #fff; }
.drop-hint { font-size: 11px; color: var(--accent); font-family: var(--mono); }
.fav-drop { transition: background 0.2s, border-color 0.2s; }
.fav-drop.drop-active {
  outline: 2px dashed var(--accent); outline-offset: 4px;
  background: var(--accent-soft); border-radius: var(--radius);
}
.fav-empty { padding: 26px 0; }
.overseas-tag {
  flex: none; font-size: 10px; font-weight: 600; color: #b45309;
  background: #fef3c7; border: 1px solid #fcd34d;
  padding: 0 5px; border-radius: 5px; line-height: 1.5;
  white-space: nowrap;
}
.card-arrow {
  margin-left: auto; color: var(--accent); opacity: 0; transform: translate(-4px, 4px);
  transition: all 0.2s; font-size: 13px; flex: none;
}
.card:hover .card-arrow { opacity: 1; transform: translate(0, 0); }
.card-desc {
  font-size: 12px; color: var(--muted); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 19px;
}
.card-url {
  font-family: var(--mono); font-size: 10.5px; color: #9db0c4; margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}

.empty-tip {
  text-align: center; padding: 60px 0; color: var(--muted); font-size: 14px;
}
.empty-tip b { color: var(--text); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 20px;
  background: var(--bg-soft);
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.footer-icp a { color: var(--muted); text-decoration: none; }
.footer-icp a:hover { color: var(--accent); }
.footer-extra { font-family: var(--mono); font-size: 11.5px; }
.footer-extra a { color: var(--muted); text-decoration: none; }
.footer-extra a:hover { color: var(--accent); }
.feedback-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-family: var(--font); text-decoration: underline; padding: 0;
}
.feedback-btn:hover { color: var(--accent); }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 60;
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel-solid); color: var(--accent); font-size: 18px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(23, 78, 122, 0.15);
  transition: all 0.2s;
}
.back-top:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(15, 181, 166, 0.25); }

.noscript { text-align: center; padding: 40px; color: var(--warn); }

/* ---------- 通栏广告 ---------- */
.ad-banner {
  display: block; position: relative; overflow: hidden;
  margin: 18px auto 4px; max-width: 1080px; border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(100deg, #0a1f3a 0%, #0e2f4a 48%, #0b4a55 100%);
  border: 1px solid rgba(120, 200, 255, 0.18);
  box-shadow: 0 4px 18px rgba(23, 78, 122, 0.10);
}
.ad-glow {
  position: absolute; inset: -30%; pointer-events: none;
  background: radial-gradient(34% 55% at 18% 30%, rgba(15, 181, 166, 0.35), transparent 60%),
              radial-gradient(30% 50% at 82% 65%, rgba(61, 139, 253, 0.30), transparent 60%);
  animation: auroraDrift 14s ease-in-out infinite alternate;
}
.ad-inner {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; color: #fff; flex-wrap: wrap;
}
.ad-tag {
  flex: none; font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.35); padding: 2px 9px; border-radius: 4px;
}
.ad-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.ad-title em { color: var(--accent); font-style: normal; }
.ad-cta {
  margin-left: auto; flex: none; font-size: 13.5px; font-weight: 700;
  color: #04120f; background: linear-gradient(135deg, var(--accent), #35c9ff);
  padding: 7px 18px; border-radius: 30px; box-shadow: 0 4px 14px rgba(15,181,166,0.35);
}
.ad-banner:hover { border-color: rgba(15, 181, 166, 0.5); }
.ad-banner:hover .ad-cta { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,181,166,0.5); }
.ad-banner:hover .ad-title em { text-decoration: underline; }
@media (max-width: 720px) { .ad-title { font-size: 14px; } .ad-cta { margin-left: 0; } }

/* ---------- 弹窗（前台提交/反馈复用） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(29, 43, 58, 0.35); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 440px; max-height: 86vh; overflow-y: auto;
  background: #ffffff; border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 22px; box-shadow: 0 24px 70px rgba(23, 78, 122, 0.18);
  animation: cardIn 0.25s ease both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-size: 16px; letter-spacing: 1px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: rgba(23, 78, 122, 0.08); }
.modal label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.modal input, .modal textarea, .modal select {
  width: 100%; padding: 9px 12px; margin-top: 5px; background: #f4f8fb; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: var(--font); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal input:focus, .modal textarea:focus, .modal select:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(15, 181, 166, 0.10); }
.modal label.check-line { display: flex; align-items: center; gap: 8px; color: var(--text); }
.modal label.check-line input { accent-color: var(--accent); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ---------- 动效 ---------- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .header-inner { gap: 14px; }
  .brand-name { font-size: 18px; }
  .bookmark-link { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .cat-nav { top: 108px; }
  .section { scroll-margin-top: 170px; }
}
