/* ============================================================
   4K世界 · H5 静态站点样式
   响应式：PC 桌面端 + 移动端（断点 860px）
   ============================================================ */

:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff4ec;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --gold: #f59e0b;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #9ca3af;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(17, 24, 39, .06);
  --shadow-lg: 0 10px 32px rgba(17, 24, 39, .10);
  --grad-primary: linear-gradient(135deg, #fbbf24, #f97316);
  --grad-accent: linear-gradient(135deg, #3b82f6, #2563eb);
  --header-h: 60px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 支持 clip 的浏览器使用 clip，不影响 sticky 定位 */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 20px; height: 42px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad-primary); box-shadow: 0 6px 16px rgba(249, 115, 22, .35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(249, 115, 22, .45); }
.btn-accent { background: var(--grad-accent); box-shadow: 0 6px 16px rgba(37, 99, 235, .30); }
.btn-accent:hover { transform: translateY(-1px); }
.btn-green { background: linear-gradient(135deg, #34d399, #10b981); box-shadow: 0 6px 16px rgba(16, 185, 129, .30); }
.btn-ghost {
  background: #fff; color: var(--text-2); border: 1px solid var(--line); height: 40px;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.logo-badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 8px;
  background: var(--grad-primary); color: #fff; font-size: 13px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(249, 115, 22, .35);
}
.logo-text { background: linear-gradient(120deg, #111827, #4b5563); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: all .18s ease;
}
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text-2);
  transition: all .18s ease;
}
.icon-btn:hover { background: #f3f4f6; color: var(--primary); }
.icon-btn svg { width: 19px; height: 19px; }

.menu-btn { display: none; }

/* 移动端抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: -280px; width: 260px; height: 100%; z-index: 201;
  background: #fff; box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
  transition: right .28s ease; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px;
}
.drawer.open { right: 0; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer .nav-link { display: block; padding: 12px 14px; border-radius: 12px; }

/* ---------- 移动端底部标签栏 ---------- */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
}
.tabbar-inner { display: flex; }
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; font-size: 11px; color: var(--muted); border-radius: 10px;
  transition: color .18s ease;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.active { color: var(--primary); font-weight: 700; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 48px; background: #fff; border-top: 1px solid var(--line); padding: 28px 16px 90px; text-align: center; }
.footer-brand { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.footer-brand em { font-style: normal; color: var(--primary); }
.footer p { color: var(--muted); font-size: 12px; line-height: 1.9; }
.footer-links { margin-top: 8px; display: flex; justify-content: center; gap: 14px; font-size: 12px; }
.footer-links a { color: var(--accent); }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom-line { margin-top: 10px; color: var(--line); font-size: 12px; letter-spacing: 2px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(249, 115, 22, .12), transparent 60%),
    radial-gradient(700px 340px at 85% 20%, rgba(37, 99, 235, .10), transparent 60%),
    linear-gradient(180deg, #ffffff, #f8f9fb);
  padding: 56px 16px 40px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(17, 24, 39, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; text-align: center; }
.hero-slogan { font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.hero-slogan em { font-style: normal; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); margin: 8px 0 24px; font-size: 14px; }

/* 搜索框 */
.search-card {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(229, 231, 235, .8);
  padding: 10px; display: flex; gap: 10px; align-items: stretch;
}
.search-input-wrap { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.search-input-wrap svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input {
  width: 100%; height: 46px; border: none; outline: none; background: #f6f7f9;
  border-radius: 12px; padding: 0 14px 0 40px; font-size: 15px; color: var(--text);
  transition: box-shadow .18s ease, background .18s ease;
}
.search-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
.search-actions { display: flex; gap: 8px; }

.hero-tips {
  margin: 22px auto 0; max-width: 640px; background: rgba(255, 251, 235, .9);
  border: 1px solid #fde68a; border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; color: #92400e; text-align: left;
  display: flex; gap: 10px; align-items: flex-start;
}
.hero-tips svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--gold); }
.hero-tips b { color: #b45309; }

/* 热搜标签 */
.hot-section { max-width: 760px; margin: 22px auto 0; text-align: left; position: relative; z-index: 1; }
.hot-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.hot-title .new-tag { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 6px; font-weight: 800; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag {
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hot-tag:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }

/* 平台特性 */
.features { max-width: 960px; margin: 34px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; position: relative; z-index: 1; }
.feature-card {
  background: #fff; border-radius: var(--radius); padding: 18px 16px;
  box-shadow: var(--shadow); border: 1px solid rgba(229, 231, 235, .7);
  display: flex; gap: 12px; align-items: flex-start; min-width: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 14.5px; margin-bottom: 2px; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, .7); padding: 18px;
}
.section-title {
  display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800;
  margin: 26px 0 14px;
}
.section-title::before {
  content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad-primary);
}
.section-title .more { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.section-title .more:hover { color: var(--primary); }

/* ---------- 海报卡片 ---------- */
.poster-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.poster-card { display: block; min-width: 0; }
.poster-cover {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 2 / 3;
  background: #e5e7eb; box-shadow: var(--shadow);
}
.poster-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.poster-card:hover .poster-cover img { transform: scale(1.07); }
.poster-badge {
  position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(17, 24, 39, .65); backdrop-filter: blur(4px);
  padding: 2px 8px; border-radius: 999px; letter-spacing: .5px;
}
.poster-badge.score { left: auto; right: 8px; background: var(--grad-primary); }
.poster-badge.new { background: linear-gradient(135deg, #ef4444, #f97316); }
.poster-hover-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, transparent 40%, rgba(17, 24, 39, .75));
  opacity: 0; transition: opacity .3s ease;
}
.poster-card:hover .poster-hover-mask { opacity: 1; }
.poster-hover-mask span {
  background: rgba(255, 255, 255, .95); color: var(--text); font-size: 12px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px; transform: translateY(8px); transition: transform .3s ease;
}
.poster-card:hover .poster-hover-mask span { transform: translateY(0); }
.poster-info { padding: 8px 2px 0; min-width: 0; }
.poster-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 文字列表（最新资源 / 相关推荐） ---------- */
.text-list { display: flex; flex-direction: column; gap: 10px; }
.text-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  border: 1px solid rgba(229, 231, 235, .7); box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
  transition: transform .18s ease, box-shadow .18s ease;
}
.text-item:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }
.text-item-main { flex: 1; min-width: 0; }
.text-item-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-item-badge {
  display: inline-block; font-size: 10px; font-weight: 800; color: #fff; letter-spacing: .5px;
  background: linear-gradient(135deg, #ef4444, #f97316); padding: 1px 7px; border-radius: 6px;
  margin-left: 8px; vertical-align: 2px;
}
.text-item-intro {
  font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.text-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.text-item-go { flex-shrink: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.text-item:hover .text-item-go { color: var(--primary); }

/* ---------- 详情页 ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; margin-top: 20px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.detail-hero { display: flex; gap: 22px; }
.detail-poster { width: 210px; flex-shrink: 0; }
.detail-poster .poster-cover { border-radius: 14px; }
.detail-body { flex: 1; min-width: 0; }
.detail-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.detail-title { font-size: 22px; font-weight: 800; line-height: 1.3; }
.quality-tag {
  font-size: 11px; font-weight: 800; color: #fff; padding: 3px 10px; border-radius: 999px;
  background: var(--grad-primary); letter-spacing: .5px;
}
.quality-tag.blue { background: var(--grad-accent); }
.quality-tag.green { background: linear-gradient(135deg, #34d399, #10b981); }
.quality-tag.gray { background: #6b7280; }

.pan-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pan-box-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: linear-gradient(180deg, #fafafa, #f3f4f6); font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.pan-row {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid #f3f4f6; transition: background .18s ease; cursor: pointer;
}
.pan-row:last-child { border-bottom: none; }
.pan-row:hover { background: var(--primary-soft); }
.pan-logo {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; color: #fff; flex-shrink: 0;
}
.pan-logo svg { width: 17px; height: 17px; }
.pan-name { font-size: 14px; font-weight: 600; }
.pan-desc { font-size: 12px; color: var(--muted); }
.pan-go { margin-left: auto; color: var(--muted); display: flex; align-items: center; gap: 4px; font-size: 13px; }
.pan-row:hover .pan-go { color: var(--primary); }

.intro-text { color: var(--text-2); font-size: 14px; line-height: 1.9; }

/* 侧边栏榜单 */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
.rank-card { padding: 16px; }
.rank-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.rank-head svg { width: 18px; height: 18px; color: var(--primary); }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-radius: 10px; transition: background .18s ease; }
.rank-item:hover { background: #f6f7f9; }
.rank-no {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--muted); background: #f3f4f6;
}
.rank-item:nth-child(1) .rank-no, .rank-item:nth-child(2) .rank-no, .rank-item:nth-child(3) .rank-no {
  background: var(--grad-primary); color: #fff;
}
.rank-item:nth-child(2) .rank-no { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-item:nth-child(3) .rank-no { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rank-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rank-tag { margin-left: auto; font-size: 10px; color: var(--primary); background: var(--primary-soft); padding: 2px 7px; border-radius: 6px; font-weight: 700; flex-shrink: 0; }

/* 返回首页 */
.back-home {
  display: inline-flex; align-items: center; gap: 6px; color: var(--accent);
  font-size: 13.5px; font-weight: 600; margin: 20px 0 4px;
}
.back-home:hover { text-decoration: underline; }

/* ---------- 搜索页 ---------- */
.search-page-top { max-width: 820px; margin: 22px auto 0; }
.progress-card { margin-top: 16px; }
.progress-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.progress-head .pct { margin-left: auto; color: var(--green); font-weight: 800; }
.progress-bar { height: 8px; border-radius: 999px; background: #f3f4f6; margin-top: 10px; overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #10b981, #059669);
  transition: width 1.2s cubic-bezier(.22, 1, .36, 1);
}
.progress-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.src-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.src-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: all .18s ease;
}
.src-chip .cnt { font-size: 11px; color: var(--muted); font-weight: 500; }
.src-chip.active { background: var(--grad-accent); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.src-chip.active .cnt { color: rgba(255, 255, 255, .85); }
.src-chip:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.result-count { font-size: 13.5px; color: var(--text-2); margin: 18px 0 10px; }
.result-count b { color: var(--primary); }

.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  border: 1px solid rgba(229, 231, 235, .7); box-shadow: var(--shadow);
  border-left: 3px solid var(--green);
  transition: transform .18s ease, box-shadow .18s ease;
}
.result-item:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }
.result-info { flex: 1; min-width: 0; }
.result-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.src-tag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.src-tag.baidu { color: #2563eb; background: var(--accent-soft); }
.src-tag.quark { color: #7c3aed; background: #f3e8ff; }
.src-tag.uc { color: #ea580c; background: #fff4ec; }
.src-tag.xunlei { color: #0369a1; background: #e0f2fe; }
.src-tag.ali { color: #0891b2; background: #ecfeff; }
.result-link-btn { flex-shrink: 0; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 24px 0 6px; font-size: 13px; color: var(--muted); }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2); font-weight: 600;
  transition: all .18s ease;
}
.page-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--grad-accent); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(37, 99, 235, .3); }
.page-jump { display: inline-flex; align-items: center; gap: 6px; }
.page-jump input {
  width: 46px; height: 34px; border: 1px solid var(--line); border-radius: 10px;
  text-align: center; outline: none; font-size: 13px;
}
.page-jump input:focus { border-color: var(--accent); }

.more-search-card {
  margin-top: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px dashed #fdba74;
}
.more-search-card h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.more-search-card p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.more-search-card .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.kw-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid #fdba74; color: var(--primary); font-weight: 700; font-size: 13px;
}

/* ---------- 获取资源页 ---------- */
.resource-stage {
  min-height: calc(100vh - var(--header-h) - 220px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(500px 300px at 20% 20%, rgba(249, 115, 22, .10), transparent 60%),
    radial-gradient(500px 300px at 80% 70%, rgba(37, 99, 235, .10), transparent 60%),
    var(--bg);
}
.qr-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 22px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(229, 231, 235, .8);
  padding: 28px 24px; text-align: center; position: relative; overflow: hidden;
}
.qr-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--grad-primary);
}
.qr-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 800; }
.qr-head .pan-logo { width: 34px; height: 34px; border-radius: 10px; }
.qr-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.qr-img-wrap {
  margin: 18px auto 0; width: 216px; height: 216px; padding: 10px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: var(--shadow);
}
.qr-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.qr-link-row {
  margin-top: 16px; display: flex; align-items: center; gap: 8px;
  background: #f6f7f9; border-radius: 12px; padding: 8px 8px 8px 14px;
  font-size: 12.5px; color: var(--text-2);
}
.qr-link-row .url { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; }
.qr-note {
  margin-top: 16px; background: var(--primary-soft); border: 1px solid #fed7aa;
  color: #9a3412; font-size: 12.5px; border-radius: 12px; padding: 10px 14px; line-height: 1.8;
}
.qr-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.qr-steps { display: flex; justify-content: space-between; margin-top: 20px; }
.qr-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); position: relative; }
.qr-step .dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft);
  border: 1px solid #fed7aa; color: var(--primary); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.qr-step:not(:last-child)::after {
  content: ""; position: absolute; top: 17px; left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 1px; background: var(--line);
}

/* ---------- 最新资源页 ---------- */
.latest-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 16px; }
.latest-tab {
  padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .18s ease;
}
.latest-tab:hover { border-color: var(--primary); color: var(--primary); }
.latest-tab.active { background: var(--grad-primary); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(249, 115, 22, .3); }
.load-more-wrap { text-align: center; margin: 26px 0 8px; }

.page-head { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.page-head h1 svg { width: 24px; height: 24px; color: var(--primary); }
.page-head .sub { color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, .92); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 11px 22px; border-radius: 999px; z-index: 400; opacity: 0; pointer-events: none;
  transition: all .3s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   移动端适配（≤ 860px）
   ============================================================ */
@media (max-width: 860px) {
  body { padding-bottom: 62px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .tabbar { display: block; }
  .footer { padding-bottom: 90px; }

  .hero { padding: 34px 14px 30px; }
  .hero-slogan { font-size: 21px; }
  .search-card { flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 8px; }
  .search-input-wrap { flex: 1 1 100%; order: 1; }
  .search-actions { order: 2; width: 100%; }
  .search-actions .btn { flex: 1; height: 42px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .detail-hero { flex-direction: column; }
  .detail-poster { width: 150px; margin: 0 auto; }
  .detail-title { font-size: 19px; }

  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

  .result-item { padding: 12px 14px; flex-wrap: wrap; }
  .result-title { font-size: 14px; }
  .result-link-btn { width: 100%; margin-top: 4px; }
  .result-link-btn .btn { width: 100%; }

  .text-item { padding: 12px 14px; align-items: flex-start; }
  .text-item-go { display: none; }
  .text-item-title { font-size: 14px; }

  .more-search-card .actions { margin-left: 0; width: 100%; }
  .more-search-card .actions .btn, .more-search-card .actions .kw-pill { flex: 1; justify-content: center; }

  .qr-card { padding: 22px 18px; }
  .qr-steps { flex-direction: column; gap: 14px; }
  .qr-step:not(:last-child)::after { display: none; }
}

@media (max-width: 380px) {
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
