/* ============================================================
   影视仓 Web — 聚合影视站样式
   深色影院风 · 玻璃拟态 · 无框架
   ============================================================ */

:root {
  --bg: #08090d;
  --bg-soft: #0d0f15;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-hi: rgba(255, 255, 255, 0.075);
  --solid: #12151d;
  --line: rgba(255, 255, 255, 0.085);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #eef1f7;
  --text-2: #aeb6c7;
  --muted: #757e92;
  --brand: #ff8a3d;
  --brand-2: #ff4d6d;
  --accent: #63b3ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.85);
  --head-h: 64px;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 背景氛围光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(255, 138, 61, 0.13), transparent 62%),
    radial-gradient(760px 480px at 92% 4%, rgba(99, 179, 255, 0.11), transparent 60%),
    radial-gradient(700px 700px at 50% 108%, rgba(255, 77, 109, 0.07), transparent 65%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
img { display: block; }

::selection { background: rgba(255, 138, 61, 0.32); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.26); background-clip: padding-box; }

/* ===================== 顶栏 ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px -6px rgba(255, 77, 109, 0.75);
  font-size: 15px;
  color: #1a0d08;
}
.brand small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--line-hi);
  border-radius: 5px;
  margin-left: 2px;
}

.tabs { display: flex; gap: 4px; margin-left: 8px; }
.tabs a {
  padding: 7px 14px;
  border-radius: 99px;
  color: var(--text-2);
  font-weight: 500;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); background: var(--panel); }
.tabs a.on {
  color: #1a1208;
  background: linear-gradient(140deg, #ffc978, var(--brand));
  box-shadow: 0 8px 20px -10px rgba(255, 138, 61, 0.9);
  font-weight: 600;
}

.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  font-size: 15px;
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-hi); background: var(--panel-hi); }
.icon-btn.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sync-info {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
.dot.err { background: var(--err); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.16); }
.dot.loading { background: var(--warn); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.28; } }

/* ===================== 容器 ===================== */
main { position: relative; z-index: 1; padding-bottom: 80px; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.view { display: none; }
.view.on { display: block; animation: fadeUp 0.42s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* ===================== 首页 Hero ===================== */
.hero {
  position: relative;
  margin-top: 0;
  height: clamp(360px, 46vh, 520px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 520px at 18% -10%, rgba(255, 138, 61, 0.18), transparent 62%),
    radial-gradient(880px 460px at 86% 12%, rgba(99, 179, 255, 0.14), transparent 64%),
    linear-gradient(180deg, #0e1118 0%, #08090d 100%);
}
/* 无海报时可见的装饰网格 */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 72px);
  -webkit-mask-image: radial-gradient(120% 110% at 72% 0%, #000 12%, transparent 70%);
  mask-image: radial-gradient(120% 110% at 72% 0%, #000 12%, transparent 70%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 22%;
  transform: scale(1.04);
  transition: opacity 0.9s var(--ease), transform 6s linear;
  opacity: 0;
}
.hero-bg.on { opacity: 1; transform: scale(1.08); }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 4%, rgba(8, 9, 13, 0.72) 38%, rgba(8, 9, 13, 0.2) 72%, rgba(8, 9, 13, 0.55) 100%),
    linear-gradient(to right, rgba(8, 9, 13, 0.9) 0%, rgba(8, 9, 13, 0.25) 58%, transparent 100%);
}
.hero-inner {
  position: absolute; inset: auto 0 0 0;
  z-index: 2;
  padding: 0 clamp(16px, 3vw, 40px) clamp(26px, 4vh, 46px);
  max-width: 1440px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  color: #ffe2c4;
  background: rgba(255, 138, 61, 0.15);
  border: 1px solid rgba(255, 138, 61, 0.35);
  padding: 4px 11px;
  border-radius: 99px;
  margin-bottom: 14px;
  backdrop-filter: blur(6px);
}
.hero-title {
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  max-width: 20em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  color: var(--text-2); font-size: 13px; margin-bottom: 12px;
}
.hero-meta .sep { color: var(--muted); opacity: 0.85; }
.hero-desc {
  max-width: 46em;
  color: #c8cfdd;
  font-size: 13.5px;
  line-height: 1.75;
  margin: 0 0 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(140deg, #ffc978, var(--brand) 55%, var(--brand-2));
  color: #1a0f06;
  box-shadow: 0 12px 30px -12px rgba(255, 108, 70, 0.95);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(255, 108, 70, 1); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-hi);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

.hero-dots {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(26px, 4vh, 46px);
  z-index: 3; display: flex; gap: 7px;
}
.hero-dots i {
  width: 22px; height: 3px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.hero-dots i.on { background: var(--brand); width: 34px; }

/* ===================== 搜索条 ===================== */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  height: 46px;
  padding: 0 6px 0 16px;
  border-radius: 13px;
  background: rgba(18, 21, 29, 0.82);
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow);
  transition: all 0.24s var(--ease);
  max-width: 560px;
}
.searchbar:focus-within { border-color: rgba(255, 138, 61, 0.6); box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.1), var(--shadow); }
.searchbar svg { flex: none; color: var(--muted); }
.searchbar input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--text); font-size: 14px;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar button {
  flex: none; height: 34px; padding: 0 16px;
  border-radius: 9px;
  background: linear-gradient(140deg, #ffc978, var(--brand));
  color: #1a0f06; font-weight: 600; font-size: 13px;
}
.searchbar button:hover { filter: brightness(1.06); }

.hero-search { position: relative; z-index: 4; padding-top: calc(var(--head-h) * -1 + 10px); }
.hero-search-inner { padding-top: 84px; }

/* ===================== 区块 ===================== */
.section { margin-top: clamp(28px, 4vw, 46px); }
.section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.section-title {
  font-size: 19px; font-weight: 700; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
.section-title::before {
  content: ""; width: 4px; height: 17px; border-radius: 99px;
  background: linear-gradient(var(--brand), var(--brand-2));
}
.section-sub { color: var(--muted); font-size: 12.5px; }
.section-more { margin-left: auto; color: var(--text-2); font-size: 13px; }
.section-more:hover { color: var(--brand); }

/* 分类切换 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 6px 15px;
  border-radius: 99px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--line-hi); color: var(--text); }
.chip.on {
  color: #12100c;
  background: linear-gradient(140deg, #ffe0a8, #ffb15c);
  border-color: transparent;
  font-weight: 600;
}

/* ===================== 影片网格 ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.card {
  position: relative;
  cursor: pointer;
  transition: transform 0.32s var(--ease);
  outline: none;
}
.card:hover, .card:focus-visible { transform: translateY(-6px); }

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(150deg, #1a1e28, #10131a);
  box-shadow: 0 8px 26px -14px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.055);
  transition: box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
}
.card:hover .poster {
  box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 138, 61, 0.42);
  border-color: rgba(255, 138, 61, 0.32);
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
  /* 缩略图始终显示，不依赖 JS 加载回调 */
  opacity: 1;
  z-index: 1;
}
.card:hover .poster img { transform: scale(1.06); }

.poster-ph {
  position: absolute; inset: 0;
  z-index: 0;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800;
  color: rgba(255, 255, 255, 0.13);
  letter-spacing: 2px;
  background: linear-gradient(150deg, #1e2330, #12151c);
  overflow: hidden;
}
/* 图片加载中：占位层走微光，避免满屏大写首字看起来像坏掉 */
.poster-ph::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}
/* 确认加载失败：停掉微光，把首字提亮 */
.poster.noimg .poster-ph::after { display: none; }
.poster.noimg .poster-ph { color: rgba(255, 255, 255, 0.24); }

.poster-mask {
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.12) 40%, transparent 62%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 14px;
}
.card:hover .poster-mask { opacity: 1; }
.play-bubble {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #12100c;
  display: grid; place-items: center;
  font-size: 15px;
  transform: scale(0.82);
  transition: transform 0.3s var(--ease);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.7);
  padding-left: 3px;
}
.card:hover .play-bubble { transform: scale(1); }

.tag-tr {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffd9a8;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tag-score {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  font-size: 11.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(255, 138, 61, 0.92);
  color: #1a0f06;
}
.tag-hd {
  position: absolute; bottom: 8px; right: 8px; z-index: 3;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(99, 179, 255, 0.9);
  color: #06121f;
}

.card-body { padding: 9px 3px 0; }
.card-title {
  font-size: 13.5px; font-weight: 600;
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.2s;
}
.card:hover .card-title { color: #ffc98a; }
.card-sub {
  font-size: 11.5px; color: var(--muted);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; gap: 6px; align-items: center;
}
.card-sub .src { color: rgba(99, 179, 255, 0.85); }

/* ===================== 骨架屏 ===================== */
.sk { position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.045); border-radius: var(--r); }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { aspect-ratio: 2 / 3; border-radius: var(--r); }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; }

/* ===================== 仓库卡片 ===================== */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}
.repo {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  transition: all 0.26s var(--ease);
  overflow: hidden;
}
.repo::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.6;
}
.repo:hover { border-color: var(--line-hi); transform: translateY(-3px); box-shadow: var(--shadow); }
.repo-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.repo-avatar {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  background: linear-gradient(150deg, rgba(255, 138, 61, 0.22), rgba(255, 77, 109, 0.14));
  border: 1px solid rgba(255, 138, 61, 0.26);
  color: #ffcf9a;
  flex: none;
}
.repo-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.repo-id { font-size: 11px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.repo-state { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.repo-stats { display: flex; gap: 18px; margin-bottom: 13px; }
.repo-stat { display: flex; flex-direction: column; }
.repo-stat b { font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -0.3px; }
.repo-stat span { font-size: 11px; color: var(--muted); }
.repo-err {
  font-size: 11.5px; color: rgba(248, 113, 113, 0.9);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.16);
  border-radius: 8px;
  padding: 6px 9px;
  margin-bottom: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.repo-actions { display: flex; gap: 8px; margin-top: auto; }
.mini-btn {
  flex: 1;
  height: 32px;
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: all 0.2s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.mini-btn:hover { color: var(--text); border-color: var(--line-hi); background: var(--panel-hi); }
.mini-btn.primary { color: #ffd9a8; border-color: rgba(255, 138, 61, 0.3); background: rgba(255, 138, 61, 0.1); }
.mini-btn.primary:hover { background: rgba(255, 138, 61, 0.18); }

/* 嵌套子仓 */
.subrepos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.subrepo {
  font-size: 11.5px; padding: 3px 9px; border-radius: 99px;
  background: rgba(99, 179, 255, 0.1);
  border: 1px solid rgba(99, 179, 255, 0.22);
  color: #a9d3ff;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.subrepo:hover { background: rgba(99, 179, 255, 0.2); }

/* ===================== 站点浏览器 ===================== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.select, .input {
  height: 36px; padding: 0 12px;
  border-radius: 10px;
  background: var(--solid);
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
  font-size: 13px;
}
.select:focus, .input:focus { border-color: rgba(255, 138, 61, 0.5); }
.count-pill { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.site-list {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
}
.site-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.16s;
}
.site-row:last-child { border-bottom: 0; }
.site-row:hover { background: rgba(255, 255, 255, 0.04); }
.site-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-repo { font-size: 11.5px; color: var(--muted); width: 92px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 99px; flex: none;
  border: 1px solid transparent; font-weight: 500;
}
.badge.web { color: #9ae6c4; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.26); }
.badge.app { color: #9fb4cf; background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.2); }
.badge.type { color: #c7b3ff; background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.24); }

/* ===================== 详情页 ===================== */
.detail-hero {
  position: relative;
  min-height: 400px;
  padding: calc(var(--head-h) + 28px) 0 0;
  overflow: hidden;
}
.detail-bg {
  position: absolute; inset: -60px 0 0;
  background-size: cover; background-position: center 20%;
  filter: blur(26px) saturate(120%) brightness(0.55);
  transform: scale(1.14);
  z-index: 0;
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, rgba(8, 9, 13, 0.75) 55%, rgba(8, 9, 13, 0.45) 100%);
  z-index: 1;
}
.detail-inner {
  position: relative; z-index: 2;
  display: flex; gap: clamp(18px, 3vw, 34px);
  align-items: flex-start;
  padding-bottom: 30px;
}
.detail-poster {
  width: clamp(150px, 17vw, 220px);
  flex: none;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #14171f;
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-main { flex: 1; min-width: 0; padding-top: 6px; }
.detail-title { font-size: clamp(22px, 3.4vw, 36px); font-weight: 800; margin: 0 0 10px; line-height: 1.2; letter-spacing: -0.4px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; color: var(--text-2); font-size: 13px; }
.detail-meta .pill {
  padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-size: 12px;
}
.detail-meta .score { color: #ffb15c; font-weight: 700; font-size: 15px; }
.detail-desc {
  color: #c2cad9; font-size: 13.5px; line-height: 1.8;
  max-width: 62em;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0 0 18px;
  cursor: pointer;
}
.detail-desc.open { -webkit-line-clamp: unset; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.panel {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(16px, 2vw, 22px);
  margin-top: 22px;
}
.panel-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.panel-title .k { font-size: 11px; font-weight: 500; color: var(--muted); }

.line-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.line-tab {
  padding: 6px 14px; border-radius: 9px; font-size: 12.5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--text-2); transition: all 0.2s var(--ease);
}
.line-tab:hover { color: var(--text); border-color: var(--line-hi); }
.line-tab.on { background: rgba(255, 138, 61, 0.16); border-color: rgba(255, 138, 61, 0.45); color: #ffd9a8; font-weight: 600; }
.line-tab.bad { opacity: 0.5; }

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.ep {
  height: 36px; border-radius: 8px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--text-2);
  padding: 0 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all 0.18s var(--ease);
}
.ep:hover { color: var(--text); background: rgba(255, 138, 61, 0.14); border-color: rgba(255, 138, 61, 0.4); }
.ep.on { background: linear-gradient(140deg, #ffc978, var(--brand)); color: #1a0f06; border-color: transparent; font-weight: 600; }

/* ===================== 播放器 ===================== */
.player-layer {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: none;
  flex-direction: column;
}
.player-layer.on { display: flex; animation: fadeIn 0.24s ease; }
@keyframes fadeIn { from { opacity: 0; } }

.player-head {
  display: flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 16px;
  background: rgba(12, 14, 19, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex: none;
}
.player-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-ep { color: var(--muted); font-size: 12.5px; flex: none; }
.player-close { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); }
.player-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.player-stage {
  flex: 1; min-height: 0;
  display: grid; place-items: center;
  background: #000;
  position: relative;
}
.player-stage video { width: 100%; height: 100%; background: #000; outline: none; }

.player-status {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-2); font-size: 13.5px;
  background: radial-gradient(circle at center, rgba(20, 23, 31, 0.9), #000 78%);
  text-align: center; padding: 24px;
}
.player-status.hide { display: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
.player-foot {
  flex: none;
  padding: 10px 16px;
  background: rgba(12, 14, 19, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.player-foot .grow { flex: 1; }
.player-foot .mini-btn { flex: 0 0 auto; }

/* ===================== 提示 / 空态 ===================== */
.toast-wrap {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(24, 27, 36, 0.96);
  border: 1px solid var(--line-hi);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s var(--ease);
  backdrop-filter: blur(10px);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
}
.empty .ico { font-size: 40px; opacity: 0.35; margin-bottom: 14px; }
.empty h3 { color: var(--text-2); font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.empty p { margin: 0; font-size: 13px; line-height: 1.7; }

.banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 11px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fcd9a0;
  font-size: 12.5px;
  margin-top: 16px;
}

/* 搜索进度 */
.search-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.progress-line { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; max-width: 220px; }
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 0.3s var(--ease); }

.group-head {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.group-head b { font-size: 14px; font-weight: 600; }
.group-head .n { font-size: 12px; color: var(--muted); }
.group-head .src { font-size: 11.5px; color: #9fd0ff; background: rgba(99, 179, 255, 0.1); border: 1px solid rgba(99, 179, 255, 0.2); padding: 1px 8px; border-radius: 99px; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .tabs { display: none; }
  .sync-info span.txt { display: none; }
  .hero { height: 340px; }
  .detail-inner { flex-direction: column; gap: 16px; }
  .detail-poster { width: 128px; }
  .site-repo { display: none; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
  .card-title { font-size: 12.5px; }

  /* Hero 改为流式高度，避免内容被固定高度挤压 */
  .hero { height: auto; min-height: 0; padding: 26px 0 28px; }
  .hero-inner { position: relative; inset: auto; padding: 0 16px; }
  .hero-title { font-size: 25px; margin-bottom: 10px; }
  .hero-desc { -webkit-line-clamp: 3; font-size: 12.5px; margin-bottom: 16px; }
  .hero-dots { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .searchbar { width: 100%; max-width: none; }

  /* 区块标题不要挤压换行 */
  .section-head { flex-wrap: wrap; gap: 6px 10px; }
  .section-sub { display: none; }
  .section-title { font-size: 17px; }
  .section-more { font-size: 12.5px; }

  .repo-grid { grid-template-columns: 1fr; }
  .detail-hero { padding-top: calc(var(--head-h) + 10px); }
}

/* 底部说明 */
.footer {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.footer b { color: var(--text-2); font-weight: 600; }

/* 移动端底部导航 */
.mobile-tabs {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  height: 56px;
  background: rgba(10, 11, 16, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .mobile-tabs { display: flex; }
  main { padding-bottom: 70px; }
}
.mobile-tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--muted);
}
.mobile-tabs a .i { font-size: 16px; }
.mobile-tabs a.on { color: var(--brand); }
