/* ===========================================================
   插件星球 · 样式表
   =========================================================== */

/* 确保 JS 用 element.hidden 切换时一定生效（作者样式 display 会覆盖 UA 的 hidden） */
[hidden] { display: none !important; }

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f2f4fb;
  --text: #1c2138;
  --muted: #707891;
  --muted-2: #98a0b5;
  --line: #e8ebf4;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-soft: #eef0ff;
  --accent: #f59e0b;
  --green: #10b981;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(29, 36, 74, .04);
  --shadow: 0 10px 34px rgba(29, 36, 74, .07);
  --shadow-lg: 0 22px 55px rgba(29, 36, 74, .12);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.container { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

/* ---------------- 顶部导航 ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232, 235, 244, .9);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-size: 19px; line-height: 1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .32);
}
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap; }
.logo-text span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: 12px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: .2s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); }
.nav-links a.sister-nav { color: #7c3aed; background: #f5f3ff; }
.nav-links a.sister-nav:hover { background: #ede9fe; color: #6d28d9; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 11px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 11px; color: var(--muted-2);
  transition: .2s ease;
}
.header-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.header-search input { width: 150px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.header-search input::placeholder { color: var(--muted-2); }
.header-search kbd {
  font-family: inherit; font-size: 11px; color: var(--muted-2);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 6px; background: #fff;
}
/* ---------------- 主视觉 ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 74px;
  background: linear-gradient(118deg, #f6f7ff 0%, #f4f6ff 46%, #faf7ff 100%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.glow-a { width: 480px; height: 480px; left: -160px; top: -210px; background: #c7d2fe; }
.glow-b { width: 460px; height: 460px; right: -120px; bottom: -260px; background: #e9d5ff; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(99,102,241,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 95%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 56px; }
.hero-copy { animation: fadeUp .7s ease both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 10px; border-radius: 100px;
  background: rgba(255,255,255,.85); border: 1px solid #e4e7fb;
  color: #5b6180; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16,185,129,.14); animation: pulse 2s infinite; }
.hero h1 { margin: 22px 0 16px; font-size: clamp(38px, 4.2vw, 57px); line-height: 1.18; letter-spacing: -2px; font-weight: 850; }
.grad {
  background: linear-gradient(100deg, #4f46e5 5%, #7c3aed 48%, #db2777 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: shine 6s linear infinite;
}
.hero-sub { margin: 0 0 30px; color: var(--muted); font-size: 16px; line-height: 1.85; }
/* 仅桌面端保留文案里的手动换行，移动端自然折行避免空行 */
.desktop-only { display: inline; }
@media (max-width: 640px) { .desktop-only { display: none; } }
.hero-search {
  display: flex; align-items: center; gap: 12px;
  width: min(100%, 560px); height: 62px; padding: 0 8px 0 20px;
  background: #fff; border: 1px solid #e4e7f5;
  border-radius: 16px; box-shadow: var(--shadow);
  transition: .2s ease;
}
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 14px 40px rgba(99,102,241,.16); transform: translateY(-2px); }
.hero-search .search-icon { color: var(--primary); flex-shrink: 0; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.hero-search input::placeholder { color: #a7aec2; }
.hero-search-btn {
  height: 46px; padding: 0 24px; flex-shrink: 0;
  border: 0; border-radius: 12px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 8px 20px rgba(99,102,241,.28);
  transition: .2s ease;
}
.hero-search-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(99,102,241,.36); }
.hot-searches { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; font-size: 12.5px; color: var(--muted-2); }
.hot-searches > div { display: flex; flex-wrap: wrap; gap: 7px; }
.hot-searches button {
  padding: 4px 10px; border: 1px solid #e3e6f4; border-radius: 100px;
  background: rgba(255,255,255,.7); color: #66708e; font-size: 12px;
  transition: .2s ease;
}
.hot-searches button:hover { color: var(--primary); border-color: #c7ccfb; background: #fff; }
/* 浏览器插画 */
.hero-visual { position: relative; animation: fadeUp .9s .15s ease both; }
.visual-halo {
  position: absolute; inset: -25px -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.15), transparent 70%);
  filter: blur(18px);
}
.browser-mock {
  position: relative; z-index: 1;
  border-radius: 17px; overflow: hidden;
  background: #fff; border: 1px solid #e6e9f7;
  box-shadow: 0 30px 70px rgba(72, 63, 143, .18), 0 3px 10px rgba(72,63,143,.08);
  transform: perspective(1100px) rotateY(-5deg) rotateX(2deg);
  transition: transform .5s ease;
}
.hero-visual:hover .browser-mock { transform: perspective(1100px) rotateY(0deg) rotateX(0deg) translateY(-4px); }
.browser-top { height: 40px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #f7f8fc; border-bottom: 1px solid #edeff7; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #ffb4b4; }
.dots i:nth-child(2) { background: #ffd88a; }
.dots i:nth-child(3) { background: #a8e6c6; }
.mock-url { flex: 1; max-width: 240px; height: 22px; display: flex; align-items: center; padding: 0 10px; border-radius: 6px; background: #fff; color: #a1a8bd; font-size: 11px; }
.mock-menu { color: #b7bdd0; font-weight: 700; }
.browser-content { padding: 24px 24px 30px; }
.mock-heading { margin-bottom: 18px; }
.mock-h1, .mock-h2 { display: block; border-radius: 5px; background: linear-gradient(90deg, #dfe3f6, #eef0fa); }
.mock-h1 { width: 55%; height: 13px; margin-bottom: 8px; }
.mock-h2 { width: 37%; height: 8px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.mock-card { padding: 14px 12px; border: 1px solid #edf0f8; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(40,50,90,.04); }
.mock-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; font-size: 12px; font-weight: 800; margin-bottom: 11px; }
.mi-1 { background: linear-gradient(135deg,#6366f1,#a855f7); }
.mi-2 { background: linear-gradient(135deg,#2563eb,#38bdf8); }
.mi-3 { background: linear-gradient(135deg,#0ea5e9,#34d399); }
.mi-4 { background: linear-gradient(135deg,#f59e0b,#fb7185); }
.mi-5 { background: linear-gradient(135deg,#ec4899,#f472b6); }
.mi-6 { background: linear-gradient(135deg,#475569,#94a3b8); }
.mock-card i { display: block; height: 6px; margin-bottom: 5px; border-radius: 4px; background: #edf0f7; }
.mock-card i:last-child { width: 62%; margin-bottom: 0; }
.mock-bottom { display: flex; gap: 8px; margin-top: 16px; }
.mock-bottom i { height: 8px; border-radius: 5px; background: #f0f2f9; }
.mock-bottom i:nth-child(1) { flex: 2; }
.mock-bottom i:nth-child(2) { flex: 1; }
.mock-bottom i:nth-child(3) { flex: 1; }
.float-chip {
  position: absolute; z-index: 2;
  padding: 9px 14px; border-radius: 12px;
  background: rgba(255,255,255,.95); border: 1px solid #e7e9f7;
  box-shadow: var(--shadow);
  font-size: 12px; font-weight: 700; color: #4c5473;
  animation: floaty 4s ease-in-out infinite;
}
.float-chip b { color: var(--green); }
.chip-a { top: -16px; right: -8px; }
.chip-b { bottom: 60px; left: -30px; animation-delay: -1.4s; }
.chip-c { bottom: -18px; right: 20px; animation-delay: -2.7s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* ---------------- 分类栏 ---------------- */
.category-bar {
  position: sticky; top: var(--header-h); z-index: 60;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(35,42,78,.03);
}
.category-scroll { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 0; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: #5c6480;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: .2s ease;
}
.cat-pill:hover { transform: translateY(-2px); border-color: #cfd4f9; color: var(--primary); box-shadow: var(--shadow-sm); }
.cat-pill.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 6px 16px rgba(99,102,241,.25);
}
.cat-pill .cat-icon { font-size: 14px; line-height: 1; }
.cat-pill .cat-num { font-size: 11px; opacity: .65; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 66px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.7px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.section-head .emoji { font-size: 22px; }
.section-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.section-more:hover { gap: 10px; }
.result-info { color: var(--muted); font-size: 13px; white-space: nowrap; }
.result-info b { color: var(--primary); font-size: 16px; }
.section-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ---------------- 精选合集 ---------------- */
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.collection-card {
  position: relative; overflow: hidden;
  padding: 20px 20px 18px; min-height: 192px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: .25s ease;
}
.collection-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tone-grad); }
.collection-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.collection-card.selected { border-color: var(--tone-color); box-shadow: 0 8px 26px rgba(99,102,241,.13); }
.collection-card .coll-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
  border-radius: 12px; font-size: 21px;
  background: var(--tone-soft); box-shadow: var(--shadow-sm);
}
.collection-card h3 { margin: 0 0 5px; font-size: 16px; font-weight: 800; }
.collection-card p { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.55; min-height: 38px; }
.coll-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.coll-tags span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); color: #737b94; font-size: 11px;
}
.coll-tags span.more { background: var(--tone-soft); color: var(--tone-color); font-weight: 700; }
.coll-arrow { position: absolute; right: 18px; top: 18px; color: #c6cbdb; transition: .2s; }
.collection-card:hover .coll-arrow { color: var(--tone-color); transform: translateX(3px); }
.tone-violet { --tone-grad: linear-gradient(90deg,#8b5cf6,#c026d3); --tone-soft: #f2ebff; --tone-color: #8b5cf6; }
.tone-blue   { --tone-grad: linear-gradient(90deg,#3b82f6,#38bdf8); --tone-soft: #e8f2ff; --tone-color: #3b82f6; }
.tone-slate  { --tone-grad: linear-gradient(90deg,#475569,#64748b); --tone-soft: #eef1f6; --tone-color: #475569; }
.tone-pink   { --tone-grad: linear-gradient(90deg,#ec4899,#fb7185); --tone-soft: #fcebf2; --tone-color: #ec4899; }
.tone-amber  { --tone-grad: linear-gradient(90deg,#f59e0b,#fbbf24); --tone-soft: #fff5e2; --tone-color: #d97706; }
.tone-green  { --tone-grad: linear-gradient(90deg,#10b981,#4ade80); --tone-soft: #e6f8f1; --tone-color: #059669; }
.tone-cyan   { --tone-grad: linear-gradient(90deg,#0891b2,#22d3ee); --tone-soft: #e5f8fb; --tone-color: #0891b2; }
.tone-orange { --tone-grad: linear-gradient(90deg,#f97316,#fb923c); --tone-soft: #fff0e6; --tone-color: #ea580c; }

/* ---------------- 插件列表 ---------------- */
.plugins-section .section-head { align-items: flex-end; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sort-group { display: flex; gap: 7px; }
.sort-btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--muted); font-size: 12.5px; font-weight: 600;
  transition: .2s ease;
}
.sort-btn:hover { color: var(--primary); border-color: #d3d8fa; }
.sort-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 5px 14px rgba(99,102,241,.22); }
.clear-btn { padding: 7px 12px; border: 0; border-radius: 8px; background: #fff1f2; color: #e11d48; font-size: 12.5px; font-weight: 600; }

.site-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
/* 允许 grid 子项收缩到小于内容固有宽度，避免长名称在窄屏撑破容器产生横向滚动 */
.site-grid > * { min-width: 0; }
.site-card {
  position: relative; display: flex; flex-direction: column;
  min-height: 218px; padding: 19px 18px 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.site-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d8dcf8; }
.site-card::after {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--icon-from), var(--icon-to));
  opacity: 0; transition: opacity .22s ease;
}
.site-card:hover::after { opacity: 1; }
.card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.site-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 13px;
  color: #fff; font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, var(--icon-from), var(--icon-to));
  box-shadow: 0 6px 16px rgba(72,63,143,.16);
}
.site-title-wrap { min-width: 0; padding-top: 2px; }
.site-name { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-badge {
  display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .3px;
}
.badge-HOT { color: #e11d48; background: #fff1f2; }
.badge-NEW { color: #059669; background: #ecfdf5; }
.badge-精选 { color: #7c3aed; background: #f5f3ff; }
.site-desc {
  margin: 0 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 41px;
}
.site-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 13px; }
.meta-chip { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: #7c8499; font-size: 11px; }
.cat-chip { padding: 3px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; }
.site-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.downloads { color: var(--muted-2); font-size: 11.5px; }
.open-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border: 0; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700;
  transition: .2s ease;
}
.open-btn:hover { background: var(--primary); color: #fff; }

.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-emoji { font-size: 44px; }
.empty-state h3 { margin: 12px 0 4px; color: var(--text); font-size: 18px; }
.empty-state p { margin: 0 0 18px; font-size: 13px; }
.empty-state button { padding: 9px 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.load-more-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: 1px solid #dcdffa; border-radius: 12px;
  background: #fff; color: var(--primary); font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-sm); transition: .2s ease;
}
.load-more-btn:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(99,102,241,.25); }

/* ---------------- 榜单 ---------------- */
.rank-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rank-grid > * { min-width: 0; }
.rank-panel { padding: 22px 20px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 800; }
.rank-sub { color: var(--muted-2); font-size: 11px; font-weight: 500; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px dashed #f0f2f8;
  transition: .2s ease;
}
.rank-item:last-child { border-bottom: 0; }
.rank-item:hover { padding-left: 10px; background: #fafbff; }
.rank-no { width: 24px; flex-shrink: 0; color: #aab0c2; font-size: 14px; font-weight: 800; font-style: italic; text-align: center; }
.rank-item:nth-child(1) .rank-no { color: #f43f5e; }
.rank-item:nth-child(2) .rank-no { color: #f97316; }
.rank-item:nth-child(3) .rank-no { color: #eab308; }
.rank-mini-icon {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 9px; color: #fff; font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, var(--icon-from), var(--icon-to));
}
.rank-info { min-width: 0; flex: 1; }
.rank-name { display: block; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta { color: var(--muted-2); font-size: 11px; }
.rank-go { color: #c2c8d9; transition: .2s ease; }
.rank-item:hover .rank-go { color: var(--primary); transform: translateX(3px); }

/* ---------------- 页脚 ---------------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 46px 0 22px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; }
.footer-brand p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 68px; }
.footer-links > div { display: flex; flex-direction: column; gap: 8px; }
.footer-links b { font-size: 13px; margin-bottom: 3px; }
.footer-links a { color: var(--muted); font-size: 12.5px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11.5px; }

.back-top {
  position: fixed; right: 24px; bottom: 26px; z-index: 80;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--primary); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--primary); color: #fff; }
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 200;
  padding: 10px 20px; border-radius: 11px;
  background: rgba(28,33,56,.94); color: #fff; font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 14px); transition: .25s ease;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .collection-grid, .site-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 10px; }
  .hero-inner { gap: 30px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding: 54px 0 58px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 44px auto 0; width: 100%; }
  .hero-copy { text-align: center; }
  .hero-search { margin: 0 auto; }
  .hot-searches { justify-content: center; }
  .collection-grid, .site-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-grid { grid-template-columns: 1fr; }
  .header-search input { width: 120px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1240px); }
  .header-search { display: none; }
  .hero h1 { font-size: 36px; letter-spacing: -1.2px; }
  .hero-sub { font-size: 14px; }
  .hero-search { height: 56px; }
  .hero-search-btn { padding: 0 16px; }
  .collection-grid, .site-grid { grid-template-columns: 1fr; }
  .collection-card { min-height: auto; }
  .section { padding-top: 48px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-head h2 { font-size: 23px; }
  .section-head-right { align-items: flex-start; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .sort-group { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-links { gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .float-chip { font-size: 10px; padding: 6px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
