/* ===========================================================
   次元导航 · 样式表
   =========================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #f6f7fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6e9f0;
  --border-strong: #d6dbe6;
  --text: #1a2235;
  --text-2: #4a5568;
  --muted: #8a94a6;
  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --primary-soft: #eef2ff;
  --accent: #ec4899;
  --accent-soft: #fdf2f8;
  --success: #10b981;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .06);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --maxw: 1240px;
}

[data-theme="dark"] {
  --bg: #0d1119;
  --bg-soft: #141b26;
  --surface: #171e2a;
  --surface-2: #1e2735;
  --border: #273143;
  --border-strong: #354154;
  --text: #e8edf5;
  --text-2: #b6c0d0;
  --muted: #7d8a9e;
  --primary: #818cf8;
  --primary-2: #a78bfa;
  --primary-soft: #232a44;
  --accent: #f472b6;
  --accent-soft: #33213a;
  --success: #34d399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 2px 8px rgba(0, 0, 0, .16);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .28), 0 12px 28px rgba(0, 0, 0, .22);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
img { display: block; max-width: 100%; }

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--accent));
  color: #fff;
  font-size: 19px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
}

.logo-text span {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sister-link {
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0; padding: 7px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.sister-link:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 16%, transparent);
}
.sister-link span { font-size: 12.5px; }

.header-search {
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}

.header-search input::placeholder { color: var(--muted); }

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--surface);
  pointer-events: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 42px;
  background:
    radial-gradient(900px 340px at 12% -20%, rgba(99, 102, 241, .16), transparent 70%),
    radial-gradient(760px 320px at 90% 0%, rgba(236, 72, 153, .13), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-strong) .8px, transparent .8px);
  background-size: 22px 22px;
  opacity: .4;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.hero-badge b { color: var(--primary); }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.18;
  letter-spacing: -1.6px;
  font-weight: 850;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary), var(--primary-2) 45%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 auto 28px;
  max-width: 620px;
  color: var(--text-2);
  font-size: 15px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.stat span { font-size: 12px; color: var(--muted); }

.hero-search {
  margin: 30px auto 0;
  max-width: 600px;
  position: relative;
}

.hero-search input {
  width: 100%;
  height: 54px;
  padding: 0 20px 0 50px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.hero-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-md);
}

.hero-search input::placeholder { color: var(--muted); }

.hero-search .search-icon { left: 18px; }

/* ---------- 推广位 ---------- */
.sponsor-section { padding: 8px 0 30px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-head h2 .head-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  font-size: 15px;
}

.section-head .head-desc {
  color: var(--muted);
  font-size: 13px;
}

.section-head .more {
  margin-left: auto;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.section-head .more:hover { text-decoration: underline; }

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sponsor-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.sponsor-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c, var(--primary));
}

.sponsor-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: var(--c, var(--primary));
}

.sponsor-body { min-width: 0; }

.sponsor-body h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sponsor-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--c, var(--primary));
  background: color-mix(in srgb, var(--c, var(--primary)) 12%, transparent);
}

.sponsor-body p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 分类标签 ---------- */
.category-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.category-scroll {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  flex: none;
  height: 34px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
  white-space: nowrap;
}

.cat-pill:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .28);
}

.cat-pill .num {
  font-size: 11px;
  opacity: .65;
  font-weight: 600;
}

/* ---------- 内容区 ---------- */
main { padding: 30px 0 60px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.result-info {
  font-size: 13px;
  color: var(--muted);
}

.result-info b { color: var(--text); }

.sort-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sort-btn {
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}

.sort-btn:hover { color: var(--text); }

.sort-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* 站点卡片网格 */
.site-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.site-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 17px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
  animation: fadeUp .35s ease both;
}

.site-card::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--card-color, var(--primary));
  opacity: .055;
  transition: transform .35s;
}

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--card-color, var(--primary)) 45%, var(--border));
}

.site-card:hover::after { transform: scale(1.5); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}

.favicon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--card-color, var(--primary));
  overflow: hidden;
}

.favicon img { width: 100%; height: 100%; object-fit: contain; }

.card-title {
  min-width: 0;
  flex: 1;
}

.card-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-url {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge {
  flex: none;
  font-size: 10px;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
}

.card-desc {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.card-hot {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  transition: opacity .2s;
}

.site-card:hover .card-hot { opacity: 0; }

.card-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
}

.site-card:hover .card-actions { opacity: 1; transform: translateY(0); }

.visit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--card-color, var(--primary));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--card-color, var(--primary)) 30%, transparent);
  transition: transform .18s, filter .18s;
}

.visit-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}

.empty .emoji { font-size: 48px; margin-bottom: 12px; }

/* ---------- 广告位 ---------- */
.ad-slot {
  margin: 30px 0;
  border-radius: var(--radius);
  min-height: 100px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, color-mix(in srgb, var(--bg-soft) 70%, transparent) 10px, color-mix(in srgb, var(--bg-soft) 70%, transparent) 20px);
}

.ad-slot .ad-label {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  pointer-events: none;
}

/* ---------- 最近更新 ---------- */
.recent-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s;
}

.recent-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.recent-item .favicon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }

.recent-body { min-width: 0; flex: 1; }
.recent-body h4 { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-body p { margin: 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.new-badge {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
}

/* ---------- 资讯列表 ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 17px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s;
}

.news-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }

.news-emoji {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.news-body { min-width: 0; }
.news-body h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; line-height: 1.45; }
.news-body .meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

.news-body .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ---------- 页面分区 ---------- */
.page-section { margin-top: 42px; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all .25s;
  z-index: 95;
}

.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer .logo { font-size: 16px; }
.footer .logo-mark { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
.footer p { margin: 0; font-size: 12.5px; color: var(--muted); }
.footer-links { margin-left: auto; display: flex; gap: 18px; font-size: 12.5px; color: var(--text-2); }
.footer-links a:hover { color: var(--primary); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 200;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .sponsor-grid { grid-template-columns: repeat(2, 1fr); }
  .site-grid { grid-template-columns: repeat(3, 1fr); }
  .recent-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .header-search { display: none; }
  .logo-text { font-size: 17px; }
  .hero { padding: 44px 0 32px; }
  .hero-stats { gap: 24px; }
  .stat b { font-size: 20px; }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .footer-links { margin-left: 0; width: 100%; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 28px); }
  .sponsor-grid { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  .recent-list { grid-template-columns: 1fr; }
  .card-actions { opacity: 1; transform: none; position: static; margin-top: 10px; }
  .card-hot { display: none; }
  .hero h1 { letter-spacing: -1px; }
  .section-head .head-desc { display: none; }
}

/* ---------- 减少动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===========================================================
   美化增强 v2 · 视觉细节升级
   =========================================================== */

/* Hero 流动光斑 */
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 640px;
  height: 640px;
  left: -140px;
  top: -320px;
  background: radial-gradient(circle at center, rgba(139, 92, 246, .22), rgba(99, 102, 241, .08) 45%, transparent 70%);
  border-radius: 50%;
  filter: blur(14px);
  animation: orbDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle at center, rgba(129, 140, 248, .2), rgba(167, 139, 250, .07) 45%, transparent 70%);
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(140px, 70px) scale(1.18); }
}

/* 渐变文字流动 */
.hero h1 .grad,
.logo-text span {
  background-size: 200% auto;
  animation: gradFlow 7s ease-in-out infinite alternate;
}

@keyframes gradFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Hero 内容依次渐入 */
.hero-badge  { animation: heroIn .6s ease both; }
.hero h1     { animation: heroIn .6s .08s ease both; }
.hero p      { animation: heroIn .6s .16s ease both; }
.hero-stats  { animation: heroIn .6s .24s ease both; }
.hero-search { animation: heroIn .6s .32s ease both; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 统计数字彩色化 + 轻微悬浮 */
.hero-stats .stat { padding: 0 6px; transition: transform .2s; }
.hero-stats .stat:hover { transform: translateY(-2px); }
.hero-stats .stat:nth-child(1) b { color: var(--primary); }
.hero-stats .stat:nth-child(2) b { color: var(--accent); }
.hero-stats .stat:nth-child(3) b { color: #0ea5e9; }
.hero-stats .stat:nth-child(4) b { color: var(--success); }

/* Logo 光晕呼吸 */
.logo-mark { animation: logoGlow 4s ease-in-out infinite alternate; }

@keyframes logoGlow {
  from { box-shadow: 0 4px 14px rgba(99, 102, 241, .35); }
  to   { box-shadow: 0 6px 22px rgba(236, 72, 153, .5); }
}

/* 分区标题图标渐变底 */
.section-head .head-icon {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  color: var(--primary);
}

/* 分类标签：激活态光泽扫过 + 悬浮微缩放 */
.cat-pill.active { position: relative; overflow: hidden; }
.cat-pill.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
  animation: pillShine 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pillShine {
  0%, 55% { left: -100%; }
  100%    { left: 170%; }
}

.cat-pill:not(.active):hover { transform: translateY(-1px); }

/* 站点卡片：顶部彩条 */
.site-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--card-color, var(--primary)), transparent);
  opacity: .5;
  transition: opacity .25s, height .25s;
}

.site-card:hover::before { opacity: 1; height: 4px; }

/* 卡片图标顶部高光 */
.favicon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, .28), transparent 60%);
  pointer-events: none;
}

/* 热度标签精致化 */
.card-hot {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* 标签 hover 微交互 */
.tag { transition: color .18s, border-color .18s, background .18s; }
.site-card:hover .tag { color: var(--primary); border-color: color-mix(in srgb, var(--card-color, var(--primary)) 30%, var(--border)); }

/* 最近更新 / 资讯：左侧彩条点缀 */
.recent-item, .news-item { position: relative; overflow: hidden; }
.recent-item::before, .news-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .22s;
}
.recent-item:hover::before, .news-item:hover::before { opacity: 1; }

/* 返回顶部悬浮旋转 */
.back-top:hover svg { transform: translateY(-2px); }
.back-top svg { transition: transform .2s; }

/* ---------- 加载更多 ---------- */
.load-more-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 30px 0 8px;
}

.load-more-wrap.has-more { display: flex; }

.load-more-info {
  font-size: 12.5px;
  color: var(--muted);
}

.load-more-info b { color: var(--text); font-weight: 700; }

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 26px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all .22s;
}

.load-more-btn svg { color: var(--primary); transition: transform .22s; }

.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.load-more-btn:hover svg { transform: translateY(3px); }

.load-more-btn:active { transform: translateY(0); }

/* ---------- 顶部 AI 导航入口 ---------- */
.ai-nav-link {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: all .2s;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.ai-nav-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.2); border-color: var(--primary); }
.ai-nav-sparkle { font-size: 14px; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 720px) {
  .ai-nav-link { padding: 6px 9px; font-size: 11.5px; }
  .ai-nav-sparkle { display: none; }
}

/* ---------- 三页统一导航栏 ---------- */
.top-nav {
  display: flex; align-items: center; gap: 3px; flex: none;
  padding: 3px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2, var(--bg)) 70%, transparent);
  border: 1px solid var(--border, transparent);
}
.top-nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 650;
  color: var(--text-2); text-decoration: none; white-space: nowrap; transition: all .2s;
}
.top-nav-link:hover { background: var(--primary-soft); color: var(--primary); }
.top-nav-link.active {
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 12px rgba(99,102,241,.28);
}
.top-nav-link.sister { color: var(--primary); opacity: .9; }
.top-nav-link.sister:hover { opacity: 1; }
@media (max-width: 900px) {
  .top-nav { gap: 1px; padding: 2px; }
  .top-nav-link { padding: 6px 9px; font-size: 12px; }
  .top-nav-link.sister span { display: none; }
}
@media (max-width: 620px) {
  .top-nav-link .nav-label { display: none; }
  .top-nav-link { padding: 6px 10px; font-size: 14px; }
}
