/* =========================================================
   Aurora TV — 极光影院
   ========================================================= */
:root {
  --bg: #06070b;
  --bg-1: #0a0c13;
  --bg-2: #0e1118;
  --surface: rgba(255, 255, 255, 0.048);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f2f4f9;
  --text-2: #a6aebe;
  --text-3: #6b7385;
  --a1: #7b61ff;
  --a2: #38e0ff;
  --gold: #ffcb6b;
  --danger: #ff5f7a;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
  --nav-bg: rgba(8, 9, 14, 0.72);
}

[data-theme="light"] {
  --bg: #eef0f7;
  --bg-1: #f7f8fc;
  --bg-2: #ffffff;
  --surface: rgba(18, 20, 32, 0.05);
  --surface-2: rgba(18, 20, 32, 0.08);
  --surface-3: rgba(18, 20, 32, 0.12);
  --line: rgba(18, 20, 32, 0.1);
  --line-2: rgba(18, 20, 32, 0.18);
  --text: #10121a;
  --text-2: #565d70;
  --text-3: #8b92a4;
  --shadow: 0 20px 50px -24px rgba(30, 35, 60, 0.35);
  --nav-bg: rgba(255, 255, 255, 0.78);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: rgba(123, 97, 255, 0.35); }
.sprite { display: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); background-clip: content-box; }

/* 环境光 */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5; }
.ambient-a { width: 620px; height: 620px; left: -180px; top: -260px; background: radial-gradient(circle, rgba(123, 97, 255, 0.5), transparent 70%); }
.ambient-b { width: 520px; height: 520px; right: -160px; top: 120px; background: radial-gradient(circle, rgba(56, 224, 255, 0.32), transparent 70%); }
.ambient-c { width: 700px; height: 700px; left: 40%; top: 60%; background: radial-gradient(circle, rgba(255, 92, 160, 0.16), transparent 70%); }
[data-theme="light"] .ambient span { opacity: 0.32; }

/* ============================ 顶栏 ============================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner {
  max-width: 1520px; margin: 0 auto; height: 100%;
  padding: 0 32px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 8px 22px -8px rgba(123, 97, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff; transition: transform 0.4s var(--ease);
}
.brand-mark svg { fill: currentColor; stroke: none; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.brand-text em {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  margin-left: 5px; padding: 2px 6px; border-radius: 6px; vertical-align: 2px;
  background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 8px 14px; font-size: 14px; font-weight: 500;
  color: var(--text-2); border-radius: 999px; transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 14px; height: 2px;
  transform: translateX(-50%); border-radius: 2px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  box-shadow: 0 0 10px rgba(123, 97, 255, 0.8);
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
.search-input {
  width: 268px; height: 38px; padding: 0 58px 0 40px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 13.5px;
  transition: width 0.35s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.25s;
  outline: none;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  width: 340px; border-color: rgba(123, 97, 255, 0.55);
  background: var(--surface-2); box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.12);
}
.search-kbd {
  position: absolute; right: 12px; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
  font-family: inherit; transition: opacity 0.2s;
}
.search-input:focus ~ .search-kbd { opacity: 0; }
.search-pop {
  position: absolute; top: 48px; left: 0; right: 0; z-index: 70;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 8px; min-width: 300px;
}
.pop-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer;
}
.pop-item:hover { background: var(--surface); color: var(--text); }
.pop-item svg { color: var(--text-3); }
.pop-item .pop-del { margin-left: auto; opacity: 0; font-size: 12px; color: var(--text-3); }
.pop-item:hover .pop-del { opacity: 1; }
.pop-head { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 11.5px; color: var(--text-3); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid transparent; border-radius: 11px; background: transparent;
  color: var(--text-2); transition: all 0.2s;
}
.icon-btn:hover { background: var(--surface); color: var(--text); border-color: var(--line); }
#themeBtn .ic-sun { display: none; }
[data-theme="light"] #themeBtn .ic-moon { display: none; }
[data-theme="light"] #themeBtn .ic-sun { display: block; }

/* ============================ 布局 ============================ */
.app { position: relative; z-index: 1; min-height: 100vh; padding-bottom: 80px; }
.container { max-width: 1520px; margin: 0 auto; padding: 0 32px; }
.view { animation: viewIn 0.5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================ Hero ============================ */
.hero {
  position: relative; height: clamp(440px, 62vh, 660px);
  margin-bottom: 12px; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 22%;
  transform: scale(1.04); opacity: 0; transition: opacity 0.9s var(--ease), transform 8s linear;
  filter: saturate(1.05);
}
.hero-media.on { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(6, 7, 11, 0.82) 34%, rgba(6, 7, 11, 0.1) 72%, transparent 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(6, 7, 11, 0.35) 30%, transparent 62%);
}
[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(238, 240, 247, 0.9) 34%, rgba(238, 240, 247, 0.2) 74%, transparent 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(238, 240, 247, 0.4) 32%, transparent 64%);
}
.hero-inner {
  position: relative; z-index: 2; height: 100%;
  max-width: 1520px; margin: 0 auto; padding: 0 32px 64px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 11.5px; letter-spacing: 0.16em; font-weight: 600; color: var(--text-2);
  text-transform: uppercase;
}
.hero-eyebrow i {
  width: 22px; height: 1px; background: linear-gradient(90deg, var(--a2), transparent);
  display: inline-block;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 10px var(--a2); }
.hero-title {
  margin: 0 0 18px; font-size: clamp(34px, 4.6vw, 62px); line-height: 1.04;
  font-weight: 800; letter-spacing: -0.035em; max-width: 15em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .hero-title { text-shadow: none; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 7px; font-size: 12px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
}
.chip.hot { color: var(--gold); border-color: rgba(255, 203, 107, 0.28); background: rgba(255, 203, 107, 0.1); }
.chip svg { color: currentColor; }
.hero-desc {
  max-width: 560px; margin: 0 0 26px; font-size: 14px; line-height: 1.75; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px;
  border-radius: 12px; border: 1px solid transparent; font-size: 14px; font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--a1), #5b8cff 55%, var(--a2));
  color: #fff; box-shadow: 0 14px 34px -14px rgba(105, 95, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(105, 95, 255, 1); }
.btn-primary svg { fill: currentColor; stroke: none; }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; }
.btn.is-fav svg { fill: var(--danger); stroke: var(--danger); }

.hero-dots { position: absolute; right: 32px; bottom: 72px; z-index: 3; display: flex; flex-direction: column; gap: 10px; }
.hero-dots button {
  width: 6px; height: 20px; border-radius: 99px; border: none; padding: 0;
  background: rgba(255, 255, 255, 0.22); transition: all 0.4s var(--ease);
}
.hero-dots button.on { height: 34px; background: linear-gradient(180deg, var(--a2), var(--a1)); box-shadow: 0 0 16px rgba(123, 97, 255, 0.7); }
[data-theme="light"] .hero-dots button { background: rgba(20, 22, 34, 0.16); }

/* ============================ 区块 / 横滑 ============================ */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.section-title::before {
  content: ""; width: 3px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, var(--a2), var(--a1));
  box-shadow: 0 0 12px rgba(123, 97, 255, 0.7);
}
.section-title span.count { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.section-more {
  font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 2px;
  transition: color 0.2s, gap 0.2s;
}
.section-more:hover { color: var(--text); gap: 6px; }

.rail { position: relative; }
.rail-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; padding: 6px 2px 14px; scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-btn {
  position: absolute; top: 50%; transform: translateY(-56%); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 12, 18, 0.72); border: 1px solid var(--line-2); color: #fff;
  backdrop-filter: blur(14px); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
[data-theme="light"] .rail-btn { background: rgba(255, 255, 255, 0.8); color: var(--text); }
.rail:hover .rail-btn { opacity: 1; pointer-events: auto; }
.rail-btn:hover { transform: translateY(-56%) scale(1.08); }
.rail-btn.prev { left: -18px; }
.rail-btn.next { right: -18px; }

/* ============================ 卡片 ============================ */
.card {
  position: relative; flex: 0 0 auto; width: 168px; scroll-snap-align: start;
  cursor: pointer; transition: transform 0.4s var(--ease);
  animation: cardIn 0.5s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-7px); }
.card-poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.4s;
}
.card:hover .card-poster { box-shadow: 0 26px 44px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(123, 97, 255, 0.45); }
.card-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ease), filter 0.4s; background: var(--bg-2);
}
.card:hover .card-poster img { transform: scale(1.07); filter: brightness(0.72); }
.card-poster::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(4, 5, 9, 0.72) 0%, transparent 42%);
}
.card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(6, 8, 14, 0.6); color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px);
}
.card-remark {
  position: absolute; left: 8px; bottom: 8px; right: 8px; z-index: 2;
  font-size: 11px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  opacity: 0; transition: opacity 0.35s;
}
.card:hover .card-play { opacity: 1; }
.card-play i {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px); color: #fff; transform: scale(0.85);
  transition: transform 0.35s var(--ease), background 0.2s;
}
.card:hover .card-play i { transform: scale(1); }
.card-play i:hover { background: rgba(255, 255, 255, 0.3); }
.card-play svg { fill: currentColor; stroke: none; margin-left: 3px; }
.card-title {
  margin: 10px 2px 0; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.2s;
}
.card:hover .card-title { color: #fff; }
[data-theme="light"] .card:hover .card-title { color: #000; }
.card-sub {
  margin: 3px 2px 0; font-size: 11.5px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.card-sub .srcs { color: var(--a2); }
.card-progress {
  position: absolute; left: 8px; right: 8px; bottom: 6px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.25); z-index: 2; overflow: hidden;
}
.card-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.card-rank {
  position: absolute; top: 0; left: 0; z-index: 3; font-size: 30px; font-weight: 800;
  line-height: 1; padding: 6px 8px; color: transparent;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.3));
  -webkit-background-clip: text; background-clip: text;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); font-style: italic;
}
.card.rank-1 .card-rank { background: linear-gradient(180deg, #ffe08a, #ff9f43); -webkit-background-clip: text; background-clip: text; }

/* 网格 */
.grid {
  display: grid; gap: 22px 16px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.grid .card { width: 100%; }

/* ============================ 浏览页 ============================ */
.page-head { padding: 34px 0 6px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; }
.page-sub { color: var(--text-3); font-size: 13px; margin: 0; }
.filters {
  position: sticky; top: var(--header-h); z-index: 30; padding: 14px 0;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-label { font-size: 12px; color: var(--text-3); margin-right: 4px; }
.pill {
  padding: 6px 12px; border-radius: 9px; font-size: 12.5px; color: var(--text-2);
  background: transparent; border: 1px solid transparent; transition: all 0.2s;
}
.pill:hover { background: var(--surface); color: var(--text); }
.pill.on { background: var(--surface-2); color: var(--text); border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.pill.on::before { content: ""; }
.filters select {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 10px; font-size: 12.5px; outline: none;
}

.load-more { display: flex; justify-content: center; margin: 34px 0 10px; }

/* 搜索页 */
.search-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 22px; }
.src-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px;
  font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
}
.src-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; }
.src-pill.bad .dot { background: var(--danger); }
.src-pill b { color: var(--text); font-weight: 600; }

.result-card { cursor: default; }
.result-card:hover { transform: none; }
.result-card .card-poster { cursor: pointer; }
.result-card:hover .card-poster { box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line); }
.result-srcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.src-tag {
  font-size: 10.5px; padding: 3px 7px; border-radius: 6px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); transition: all 0.2s;
}
.src-tag:hover { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }
.src-tag.on { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; }

/* ============================ 详情页 ============================ */
.detail-backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 480px; z-index: -1;
  background-size: cover; background-position: center 20%; opacity: 0.34; filter: blur(6px) saturate(1.2);
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}
.detail-wrap { position: relative; padding-top: 44px; }
.detail-hero { display: flex; gap: 34px; align-items: flex-end; }
.detail-poster {
  flex: none; width: 216px; aspect-ratio: 2 / 3; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--line);
  background: var(--surface);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.detail-title { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px; line-height: 1.1; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-desc { font-size: 13.5px; line-height: 1.8; color: var(--text-2); max-width: 820px; white-space: pre-line; }
.detail-desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.desc-toggle { background: none; border: none; color: var(--a2); font-size: 12.5px; padding: 6px 0 0; }
.detail-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.lines { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.line-tab {
  padding: 7px 14px; border-radius: 9px; font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.line-tab.on { background: linear-gradient(135deg, rgba(123, 97, 255, 0.22), rgba(56, 224, 255, 0.16)); color: var(--text); border-color: rgba(123, 97, 255, 0.5); }
.line-tab .badge { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(61, 220, 151, 0.16); color: #3ddc97; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.ep {
  position: relative; padding: 11px 8px; border-radius: 10px; font-size: 12.5px;
  text-align: center; color: var(--text-2); background: var(--surface); border: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all 0.2s;
}
.ep:hover { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); border-color: transparent; transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(105, 95, 255, 0.9); }
.ep.playing { color: #fff; background: linear-gradient(135deg, rgba(123, 97, 255, 0.9), rgba(56, 224, 255, 0.7)); border-color: transparent; }
.ep .ep-dot { position: absolute; right: 6px; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--a2); }
.related { margin-top: 44px; }

/* ============================ 我的 ============================ */
.lib-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 20px; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { padding: 7px 16px; border-radius: 9px; font-size: 13px; color: var(--text-2); background: none; border: none; transition: all 0.2s; }
.tabs button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.6); }
.hist-row { display: grid; gap: 14px; }
.hist-item {
  display: flex; gap: 14px; padding: 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); transition: all 0.25s; cursor: pointer;
}
.hist-item:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateX(3px); }
.hist-thumb { width: 108px; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; flex: none; background: var(--bg-2); }
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hist-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hist-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { font-size: 11.5px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.hist-bar { height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.hist-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.hist-del { align-self: center; opacity: 0; }
.hist-item:hover .hist-del { opacity: 1; }

/* ============================ 播放器 ============================ */
.player {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; align-items: center; justify-content: center;
  animation: pIn 0.35s var(--ease) both;
}
@keyframes pIn { from { opacity: 0; } to { opacity: 1; } }
.player-stage { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-shade {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, transparent 26%, transparent 66%, rgba(0, 0, 0, 0.85) 100%);
}
.player.show-ui .player-shade { opacity: 1; }
.player.idle { cursor: none; }

.player-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  opacity: 0; transform: translateY(-10px); transition: all 0.35s var(--ease); pointer-events: none;
}
.player.show-ui .player-top { opacity: 1; transform: none; pointer-events: auto; }
.player-title { font-size: 15px; font-weight: 600; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-title span { color: rgba(255, 255, 255, 0.55); font-weight: 400; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pbtn {
  width: 40px; height: 40px; border-radius: 10px; border: none; background: transparent;
  color: rgba(255, 255, 255, 0.9); display: grid; place-items: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.pbtn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pbtn:active { transform: scale(0.94); }
.pbtn.ptext { width: auto; padding: 0 12px; font-size: 12.5px; font-weight: 600; }
.pbadge {
  height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12px;
  background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.pbadge:hover { background: rgba(255, 255, 255, 0.24); }

.player-ctrl {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 22px 18px;
  opacity: 0; transform: translateY(12px); transition: all 0.35s var(--ease); pointer-events: none;
}
.player.show-ui .player-ctrl { opacity: 1; transform: none; pointer-events: auto; }
.progress { position: relative; padding: 12px 0; cursor: pointer; }
.progress-rail { position: relative; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); transition: height 0.2s; }
.progress:hover .progress-rail { height: 6px; }
.progress-buf { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.3); }
.progress-played {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--a1), var(--a2)); box-shadow: 0 0 14px rgba(90, 140, 255, 0.8);
}
.progress-played i {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%) scale(0);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.35); transition: transform 0.2s;
}
.progress:hover .progress-played i { transform: translateY(-50%) scale(1); }
.progress-tip {
  position: absolute; bottom: 26px; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px;
  background: rgba(10, 12, 18, 0.9); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 11.5px; opacity: 0; transition: opacity 0.15s; pointer-events: none; white-space: nowrap;
}
.ctrl-row { display: flex; align-items: center; gap: 6px; }
.time { font-size: 12px; color: rgba(255, 255, 255, 0.72); font-variant-numeric: tabular-nums; margin-left: 6px; }
.ctrl-spacer { flex: 1; }
.vol { display: flex; align-items: center; }
.vol input { width: 0; opacity: 0; transition: width 0.3s var(--ease), opacity 0.2s; accent-color: #fff; height: 4px; }
.vol:hover input, .vol input:focus { width: 78px; opacity: 1; margin-right: 8px; }
.pop-wrap { position: relative; }
.pop {
  position: absolute; bottom: 48px; right: 0; min-width: 96px; padding: 6px;
  background: rgba(14, 16, 24, 0.96); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px; box-shadow: 0 20px 40px -18px #000; backdrop-filter: blur(20px);
}
.pop button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: none; background: none; color: rgba(255, 255, 255, 0.82); font-size: 12.5px; border-radius: 7px; }
.pop button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pop button.on { color: var(--a2); }

.player-bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff; backdrop-filter: blur(14px); transition: all 0.3s var(--ease);
}
.player-bigplay:hover { transform: translate(-50%, -50%) scale(1.07); background: rgba(255, 255, 255, 0.24); }
.player-bigplay svg { fill: currentColor; stroke: none; margin-left: 5px; }

.player-loading {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.75); font-size: 13px;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--a2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ep-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px; z-index: 8;
  background: rgba(9, 10, 16, 0.92); backdrop-filter: blur(26px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; flex-direction: column; animation: slideIn 0.35s var(--ease) both;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.ep-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px; color: #fff; }
.ep-panel-head strong { font-size: 14px; }
.ep-panel-lines { display: flex; gap: 6px; padding: 0 18px 12px; flex-wrap: wrap; }
.ep-panel-grid {
  flex: 1; overflow-y: auto; padding: 0 18px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start;
}
.ep-panel-grid .ep { padding: 9px 6px; font-size: 12px; }
.ep-panel .line-tab { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
.ep-panel .line-tab.on { color: #fff; background: linear-gradient(135deg, rgba(123, 97, 255, 0.6), rgba(56, 224, 255, 0.4)); border-color: transparent; }

.autonext {
  position: absolute; right: 26px; bottom: 104px; z-index: 7; width: 300px;
  padding: 18px; border-radius: var(--r-md);
  background: rgba(12, 14, 22, 0.9); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px); box-shadow: 0 24px 50px -20px #000;
  display: flex; flex-direction: column; gap: 6px; animation: autoIn 0.4s var(--ease) both;
}
@keyframes autoIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.autonext span { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); }
.autonext strong { font-size: 14px; color: #fff; margin-bottom: 6px; }
.autonext .btn { align-self: flex-start; }

/* ============================ 抽屉 / 弹层 ============================ */
.drawer { position: fixed; inset: 0; z-index: 120; }
.drawer-mask { position: absolute; inset: 0; background: rgba(3, 4, 8, 0.6); backdrop-filter: blur(4px); animation: fadeIn 0.3s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw;
  background: var(--bg-1); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; animation: slideIn 0.4s var(--ease) both;
  box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.8);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.set-block { margin-bottom: 28px; }
.set-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.set-hint { font-size: 11.5px; color: var(--text-3); margin: 0 0 12px; line-height: 1.6; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.src-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.src-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
}
.src-item .name { font-size: 13px; font-weight: 600; }
.src-item .url { font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.src-item .lat {
  margin-left: auto; font-size: 10.5px; padding: 2px 7px; border-radius: 5px;
  background: var(--surface-2); color: var(--text-3); font-variant-numeric: tabular-nums;
}
.src-item .lat.ok { color: #3ddc97; background: rgba(61, 220, 151, 0.12); }
.src-item .lat.bad { color: var(--danger); background: rgba(255, 95, 122, 0.12); }
.src-item .del { opacity: 0.5; }
.src-item .del:hover { opacity: 1; color: var(--danger); }

.switch { appearance: none; width: 40px; height: 23px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background 0.25s; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.25s var(--ease); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); }
.switch:checked { background: linear-gradient(135deg, var(--a1), var(--a2)); }
.switch:checked::after { transform: translateX(17px); }

.src-add { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.src-add input, .field {
  height: 38px; padding: 0 12px; border-radius: 9px; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); outline: none;
}
.src-add input:focus { border-color: rgba(123, 97, 255, 0.6); box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.12); }
.mini-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); transition: all 0.2s;
}
.mini-btn:hover { background: var(--surface-2); color: var(--text); }
.mini-btn.primary { background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; border-color: transparent; }
.disclaimer { font-size: 11px; line-height: 1.7; color: var(--text-3); padding: 12px; border-radius: 10px; background: var(--surface); }
.version { font-size: 10.5px; line-height: 1.7; color: var(--text-3); margin-top: 12px; }

.sheet { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; }
.sheet-mask { position: absolute; inset: 0; background: rgba(3, 4, 8, 0.66); backdrop-filter: blur(5px); animation: fadeIn 0.25s both; }
.sheet-panel {
  position: relative; width: 440px; max-width: 92vw; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -30px #000; animation: sheetIn 0.35s var(--ease) both; overflow: hidden;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet-head strong { font-size: 14px; }
.sheet-body { padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.alt-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line); transition: all 0.2s; text-align: left;
}
.alt-item:hover { background: var(--surface-2); border-color: var(--line-2); }
.alt-item .alt-src { font-size: 13px; font-weight: 600; }
.alt-item .alt-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.alt-item .alt-go { margin-left: auto; font-size: 11.5px; color: var(--a2); }

/* ============================ 提示 / 空态 / 骨架 ============================ */
.toasts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  background: rgba(16, 18, 27, 0.94); border: 1px solid var(--line-2); color: #fff;
  font-size: 12.5px; box-shadow: 0 18px 40px -16px #000; backdrop-filter: blur(16px);
  animation: toastIn 0.35s var(--ease) both;
}
.toast.err { border-color: rgba(255, 95, 122, 0.5); }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 8px var(--a2); }
.toast.err .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(0.96); } to { opacity: 1; transform: none; } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 20px; color: var(--text-3); text-align: center; }
.empty svg { opacity: 0.35; width: 44px; height: 44px; }
.empty p { margin: 0; font-size: 13.5px; }
.empty small { font-size: 12px; opacity: 0.7; }

.skeleton { background: var(--surface); border-radius: var(--r-md); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { width: 168px; flex: none; }
.sk-poster { aspect-ratio: 2/3; border-radius: var(--r-md); }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; }

/* ============================ 响应式 ============================ */
@media (max-width: 1100px) {
  .search-input { width: 200px; }
  .search-input:focus { width: 250px; }
}
.m-search-btn { display: none; }
@media (max-width: 620px) {
  .search { display: none; }
  .m-search-btn { display: grid; }
  body.search-open .search {
    display: flex; position: fixed; top: calc(var(--header-h) + 8px); left: 12px; right: 12px; z-index: 80;
    animation: viewIn 0.25s var(--ease) both;
  }
  body.search-open .search-input { width: 100%; }
  body.search-open .search-kbd { display: none; }
  body.search-open .search-pop { top: 50px; }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .topbar-inner { padding: 0 18px; gap: 14px; }
  .nav { display: none; }
  .container, .hero-inner { padding-left: 18px; padding-right: 18px; }
  .hero { height: 68vh; min-height: 460px; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 6%, rgba(6, 7, 11, 0.55) 45%, rgba(6, 7, 11, 0.2) 100%); }
  [data-theme="light"] .hero::after { background: linear-gradient(0deg, var(--bg) 6%, rgba(238, 240, 247, 0.6) 45%, rgba(238, 240, 247, 0.25) 100%); }
  .hero-inner { padding-bottom: 44px; }
  .hero-desc { -webkit-line-clamp: 2; }
  .hero-dots { display: none; }
  .card { width: 132px; }
  .section { margin-top: 26px; }
  .section-title { font-size: 16.5px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 10px; }
  .detail-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .detail-poster { width: 130px; }
  .detail-backdrop { height: 340px; }
  .filters { position: static; }
  .ep-panel { width: 100%; }
  .autonext { right: 12px; left: 12px; width: auto; bottom: 96px; }
  .player-ctrl { padding: 0 12px 12px; }
  .player-top { padding: 12px; }
  .hist-thumb { width: 86px; }
}
@media (max-width: 620px) {
  .search { display: none; }
  .brand-text { font-size: 17px; }
  .hero-title { font-size: 30px; }
  .hero-actions .btn { height: 40px; padding: 0 16px; font-size: 13px; }
  .page-title { font-size: 24px; }
  .detail-poster { width: 108px; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .drawer-panel { width: 100%; }
}

/* 打印 / 减少动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
