/* ============================================================
   I LOVE FILM — 主样式
   设计语言：深夜放映厅。近黑底色 + 胶片金 + 大字排版。
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #08080b;
  --bg-soft: #0b0b10;
  --surface: #111116;
  --surface-2: #17171e;
  --surface-3: #1e1e27;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f1eb;
  --dim: #a5a3af;
  --mute: #6b6977;

  --gold: #e6b45c;
  --gold-bright: #f4d29a;
  --gold-soft: rgba(230, 180, 92, 0.13);
  --crimson: #d8503c;
  --green: #4ec9a0;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 18px 48px -12px rgba(0, 0, 0, 0.75);
  --shadow-gold: 0 12px 40px -14px rgba(230, 180, 92, 0.5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 68px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --maxw: 1560px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Songti SC", "STSong", "SimSun", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

::selection { background: rgba(230, 180, 92, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #2a2a34 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #262630;
  border-radius: 20px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }

/* ---------- 2. 环境光 / 噪点 ---------- */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}
.ambient-glow--a {
  width: 60vw; height: 60vw;
  top: -28vw; left: -12vw;
  background: radial-gradient(circle, rgba(120, 88, 40, 0.5), transparent 68%);
}
.ambient-glow--b {
  width: 52vw; height: 52vw;
  top: 18vh; right: -20vw;
  background: radial-gradient(circle, rgba(60, 52, 96, 0.4), transparent 70%);
}
.ambient-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -1%); }
}

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(to bottom, rgba(8, 8, 11, 0.92), rgba(8, 8, 11, 0.55) 70%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(8, 8, 11, 0.9);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark { color: var(--gold); display: grid; place-items: center; }
.brand-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-transform: uppercase;
}
.brand-text em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  padding: 0 0.1em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-desktop a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--dim);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-desktop a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-desktop a.is-active { color: var(--text); }
.nav-desktop a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 1px;
  transform: translateX(-50%);
  width: 14px; height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  height: 38px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--mute);
  transition: width 0.4s var(--ease), border-color 0.25s, background 0.25s;
}
.header-search:focus-within {
  width: 320px;
  border-color: rgba(230, 180, 92, 0.45);
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold);
}
.header-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 13.5px;
  color: var(--text);
}
.header-search input::placeholder { color: var(--mute); }
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.header-search kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--mute);
  line-height: 1.5;
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--dim);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.header-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1.5px;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright));
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 12px rgba(230, 180, 92, 0.7);
}
.site-header.is-loading .header-progress { opacity: 1; animation: prog 1.6s var(--ease-in-out) infinite; }
@keyframes prog {
  0% { width: 0%; transform: translateX(0); }
  55% { width: 62%; }
  100% { width: 92%; transform: translateX(100%); }
}

/* ---------- 4. App shell ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 100px;
  min-height: 58vh;
  outline: none;
}
.app--flush { max-width: none; padding: 0; }

.view-enter { animation: viewIn 0.55s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 5. 通用元件 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 54px 0 20px;
}
.section-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2::before {
  content: "";
  width: 3px; height: 17px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(230, 180, 92, 0.6);
}
.section-head .sub { font-size: 13px; color: var(--mute); }
.section-head .spacer { margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: transparent;
  color: #1a1308;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover { background: linear-gradient(180deg, #ffe0b8, var(--gold-bright)); box-shadow: 0 16px 48px -12px rgba(230, 180, 92, 0.65); }
.btn--ghost { background: transparent; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--icon { width: 42px; padding: 0; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }
.chip.is-active {
  color: #1a1308;
  background: var(--gold);
  border-color: transparent;
  font-weight: 600;
}
.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mute);
}
.chip .dot.is-ok { background: var(--green); box-shadow: 0 0 8px rgba(78, 201, 160, 0.8); }
.chip .dot.is-bad { background: var(--crimson); box-shadow: 0 0 8px rgba(216, 80, 60, 0.6); }
.chip .dot.is-wait { background: var(--gold); animation: pulse 1s infinite; }

@keyframes pulse { 50% { opacity: 0.25; } }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11.5px;
  border-radius: 5px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  line-height: 1.5;
}
.tag--gold { color: var(--gold); background: var(--gold-soft); border-color: rgba(230, 180, 92, 0.28); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  height: clamp(420px, 56vh, 600px);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(90% 80% at 12% 8%, rgba(230, 180, 92, 0.12), transparent 62%),
    radial-gradient(100% 90% at 88% 0%, rgba(96, 74, 128, 0.18), transparent 66%),
    linear-gradient(160deg, #14131a, #0a0a0e 72%);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.9) contrast(1.04);
  transform: scale(1.06);
  animation: heroDrift 22s ease-out both;
}
@keyframes heroDrift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(8, 8, 11, 0.86) 26%, rgba(8, 8, 11, 0.25) 66%, rgba(8, 8, 11, 0.7) 100%),
    linear-gradient(to right, rgba(8, 8, 11, 0.92) 0%, rgba(8, 8, 11, 0.5) 42%, transparent 72%);
}
/* 海报缺失时的"幽灵字幕"：让空态看起来是设计，而不是坏了 */
.hero-bg::before {
  content: "FILM";
  position: absolute;
  right: -1.5vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(140px, 27vw, 360px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.78;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  user-select: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero-eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.hero-title {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.015em;
  max-width: 16ch;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}
.hero-title.is-lg {
  font-size: clamp(28px, 4vw, 46px);
  max-width: 22ch;
}
.hero-title.is-xl {
  font-size: clamp(23px, 3vw, 36px);
  max-width: 30ch;
  line-height: 1.18;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13.5px;
  color: var(--dim);
  margin-bottom: 16px;
}
.hero-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--mute); }
.hero-desc {
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(244, 241, 235, 0.72);
  margin: 0 0 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-dots {
  display: flex;
  gap: 7px;
  margin-left: 8px;
}
.hero-dots button {
  width: 26px; height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.3s, width 0.4s var(--ease);
}
.hero-dots button.is-active { background: var(--gold); width: 42px; }

/* ---------- 7. 影片卡片 ---------- */
.rail {
  position: relative;
}
.rail-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(118px, 12.6vw, 172px);
  grid-template-rows: 1fr;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 0 8px;
  scroll-behavior: smooth;
}
.rail-scroller::-webkit-scrollbar { display: none; }
.rail-scroller > * { scroll-snap-align: start; }
.rail-nav {
  position: absolute;
  top: calc(50% - 26px);
  z-index: 5;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(14, 14, 19, 0.86);
  border: 1px solid var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  transform: scale(0.9);
}
.rail:hover .rail-nav { opacity: 1; transform: scale(1); }
.rail-nav:hover { background: var(--gold); color: #1a1308; border-color: transparent; }
.rail-nav[disabled] { opacity: 0 !important; pointer-events: none; }
.rail-nav--prev { left: -18px; }
.rail-nav--next { right: -18px; }

.card {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 2 / 3;
  isolation: isolate;
  transition: transform 0.42s var(--ease), box-shadow 0.42s var(--ease);
  will-change: transform;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  pointer-events: none;
  z-index: 3;
}
.card:hover { transform: translateY(-7px); box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.95); }
.card:hover::after { box-shadow: inset 0 0 0 1px rgba(230, 180, 92, 0.55); }

.card-poster {
  width: 100%; height: 100%;
  object-fit: cover;
  background: linear-gradient(150deg, #1a1a22, #101015);
  transition: transform 0.6s var(--ease), filter 0.45s;
}
.card:hover .card-poster { transform: scale(1.055); filter: brightness(0.82); }

.card-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 16px 14px;
  text-align: center;
  color: rgba(244, 241, 235, 0.72);
  background:
    radial-gradient(115% 85% at 22% 0%, hsl(var(--ph, 38) 46% 26% / 0.9), transparent 64%),
    radial-gradient(90% 70% at 100% 100%, hsl(calc(var(--ph, 38) + 40) 40% 22% / 0.7), transparent 70%),
    linear-gradient(168deg, hsl(var(--ph, 38) 14% 13%), #0a0a0e 82%);
  overflow: hidden;
}
.card-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 7px);
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, #000, transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 55%);
}
.cf-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  max-width: 100%;
}
.cf-rule {
  display: block;
  width: 22px;
  height: 1px;
  background: rgba(230, 180, 92, 0.65);
}
.cf-name {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.42;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.card:hover .cf-name { color: rgba(244, 241, 235, 0.9); }

.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(to top, rgba(6, 6, 9, 0.96) 0%, rgba(6, 6, 9, 0.72) 30%, transparent 62%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card:hover .card-overlay, .card:focus-visible .card-overlay { opacity: 1; }
.card-overlay .co-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-overlay .co-sub {
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-overlay .co-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%) scale(0.8);
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(230, 180, 92, 0.95);
  color: #191206;
  opacity: 0;
  transition: opacity 0.3s, transform 0.35s var(--ease);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8);
}
.card:hover .co-play { opacity: 1; transform: translate(-50%, -54%) scale(1); }

.card-badge {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 4;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 5px;
  color: #16110a;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.card-badge--soft {
  background: rgba(8, 8, 11, 0.72);
  color: rgba(244, 241, 235, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-weight: 500;
}
.card-badge--left { right: auto; left: 9px; }

.card-source {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 4;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(244, 241, 235, 0.85);
  background: rgba(8, 8, 11, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.card-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
}
.card-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
}

/* 网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 22px 18px;
}
.grid--dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }

/* ---------- 8. 搜索页 ---------- */
.search-page { padding-top: 46px; }
.search-hero { max-width: 820px; margin: 0 auto 34px; text-align: center; }
.search-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.search-hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--gold); }
.search-hero p { margin: 0 0 26px; color: var(--dim); font-size: 14px; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-strong);
  transition: border-color 0.25s, box-shadow 0.3s, background 0.25s;
}
.search-box:focus-within {
  border-color: rgba(230, 180, 92, 0.6);
  box-shadow: 0 0 0 4px rgba(230, 180, 92, 0.1), var(--shadow-2);
  background: rgba(255, 255, 255, 0.075);
}
.search-box svg { color: var(--mute); flex-shrink: 0; }
.search-box:focus-within svg { color: var(--gold); }
.search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.search-box input::placeholder { color: var(--mute); font-size: 15px; }
.search-box .btn { height: 44px; flex-shrink: 0; }

.hot-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .chips { display: flex; gap: 8px; }
.filter-bar .spacer { margin-left: auto; }
.filter-bar .result-count { font-size: 13px; color: var(--mute); white-space: nowrap; }
.filter-bar .result-count b { color: var(--text); font-weight: 600; }

.source-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.src-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--mute);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.src-pill.is-ok { color: rgba(78, 201, 160, 0.95); border-color: rgba(78, 201, 160, 0.25); }
.src-pill.is-bad { color: rgba(216, 80, 60, 0.9); border-color: rgba(216, 80, 60, 0.22); }
.src-pill b { color: var(--text); font-weight: 600; }

/* ---------- 9. 详情页 ---------- */
.detail { padding-top: 26px; }
.detail-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 560px;
  z-index: -1;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 0%, #000 32%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 32%, transparent 100%);
}
.detail-backdrop img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: blur(26px) saturate(0.75) brightness(0.5);
  transform: scale(1.15);
}
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 8, 11, 0.7), transparent 60%);
}

.detail-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.detail-poster {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.95);
  background: var(--surface);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.detail-info { min-width: 0; padding-top: 8px; }
.detail-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--dim);
}
.detail-meta .score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
}
.detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(244, 241, 235, 0.74);
  margin: 0 0 26px;
  max-width: 78ch;
  white-space: pre-wrap;
}
.detail-desc.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc-toggle {
  font-size: 12.5px;
  color: var(--gold);
  margin-bottom: 24px;
  display: inline-block;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 28px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  max-width: 820px;
}
.fact { font-size: 13px; }
.fact dt { color: var(--mute); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.fact dd { margin: 0; color: var(--text); line-height: 1.6; }

/* 剧集 / 线路 */
.play-section { margin-top: 44px; }
.line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.line-tabs .chip { height: 34px; }

.episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.ep {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  transition: all 0.2s var(--ease);
  text-align: center;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.085);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.ep.is-current {
  color: #16110a;
  background: var(--gold);
  border-color: transparent;
  font-weight: 700;
}
.ep--more {
  grid-column: span 2;
  color: var(--gold);
  border-style: dashed;
  border-color: rgba(230, 180, 92, 0.35);
  background: rgba(230, 180, 92, 0.06);
}
.ep--more:hover { background: rgba(230, 180, 92, 0.12); border-color: rgba(230, 180, 92, 0.55); }

/* ---------- 10. 播放页 ---------- */
.watch { padding-top: 18px; }
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}
.watch-stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 1);
  border: 1px solid var(--line);
}
.watch-stage.is-portrait { aspect-ratio: auto; height: min(78vh, 720px); }
#playerMount { width: 100%; height: 100%; }

.watch-side {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(15, 15, 20, 0.6);
  backdrop-filter: blur(10px);
  overflow: hidden;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.watch-side-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.watch-side-head h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-side-head p { margin: 0; font-size: 12px; color: var(--mute); }
.watch-side-body { overflow-y: auto; padding: 10px; flex: 1; }
.watch-side-body .ep { min-height: 38px; font-size: 12.5px; }
.watch-side .episodes { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }

.watch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.watch-bar .title-wrap { min-width: 0; margin-right: auto; }
.watch-bar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-bar .sub { font-size: 12.5px; color: var(--mute); }

/* ---------- 11. 直播 ---------- */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.channel {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.22s var(--ease);
  text-align: left;
  min-width: 0;
  height: 62px;
  overflow: hidden;
}
.channel:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(230, 180, 92, 0.4);
  transform: translateY(-2px);
}
.channel-logo {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
}
.channel-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.channel-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-meta {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 12. 我的 / 设置 ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head p { margin: 0; color: var(--dim); font-size: 14px; }

.tabs {
  display: flex;
  gap: 6px;
  margin: 26px 0 24px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--mute);
  transition: color 0.2s;
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--text); }
.tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(15, 15, 20, 0.55);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.panel-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--mute); }
.panel-head .spacer { margin-left: auto; }
.panel-body { padding: 20px 22px; }
.panel-body--flush { padding: 0; }

.form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.form-row:last-child { border-bottom: 0; }
.form-row .label { width: 150px; flex-shrink: 0; font-size: 13.5px; }
.form-row .label small { display: block; color: var(--mute); font-size: 11.5px; font-weight: 400; }
.input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  outline: none;
  font-size: 13.5px;
  transition: border-color 0.2s, background 0.2s;
}
.input:focus { border-color: rgba(230, 180, 92, 0.5); background: rgba(255, 255, 255, 0.07); }
.input::placeholder { color: var(--mute); }

.src-list { display: flex; flex-direction: column; }
.src-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.src-row:last-child { border-bottom: 0; }
.src-row:hover { background: rgba(255, 255, 255, 0.025); }
.src-row .name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.src-row .url { font-size: 11.5px; color: var(--mute); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.src-row .grow { flex: 1; min-width: 0; }

.switch {
  position: relative;
  width: 40px; height: 23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.25s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #cfcfd8;
  transition: transform 0.28s var(--ease), background 0.2s;
}
.switch.is-on { background: var(--gold); }
.switch.is-on::after { transform: translateX(17px); background: #191206; }

.empty {
  padding: 72px 20px;
  text-align: center;
  color: var(--mute);
}
.empty svg { opacity: 0.35; margin-bottom: 16px; }
.empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--dim); font-weight: 600; }
.empty p { margin: 0 0 20px; font-size: 13.5px; }
.empty .btn { margin: 0 auto; }

/* ---------- 13. 骨架屏 / 加载 ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #14141a;
  border-radius: var(--r-md);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-card { aspect-ratio: 2 / 3; }
.sk-line { height: 12px; border-radius: 6px; margin-bottom: 8px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.center-load {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 0;
  color: var(--mute);
  font-size: 13.5px;
}

/* ---------- 14. Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: min(90vw, 520px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  background: rgba(22, 22, 29, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(16px);
  animation: toastIn 0.4s var(--ease) both;
  color: var(--text);
}
.toast.is-out { animation: toastOut 0.3s var(--ease) forwards; }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.toast--ok .dot { background: var(--green); }
.toast--err .dot { background: var(--crimson); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ---------- 15. Modal ---------- */
.modal-host { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.modal-host.is-open { pointer-events: auto; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 7, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
}
.modal-host.is-open .modal-backdrop { opacity: 1; }
.modal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(0.97);
  width: min(92vw, 560px);
  max-height: 86vh;
  overflow: auto;
  border-radius: var(--r-xl);
  background: #111116;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px -20px #000;
  padding: 26px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.modal-host.is-open .modal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal--wide { width: min(94vw, 900px); }
.modal h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.modal .modal-sub { margin: 0 0 20px; font-size: 13px; color: var(--mute); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--mute);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.copy-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  word-break: break-all;
  margin-bottom: 14px;
}
.copy-box span { flex: 1; min-width: 0; }

.code-block {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #0a0a0e;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #c9d1a8;
  overflow-x: auto;
  white-space: pre;
}

/* ---------- 16. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35));
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 52px var(--gutter) 34px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr);
  gap: 42px;
}
.footer-brand .brand-text { font-size: 16px; }
.footer-brand p { margin: 14px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--mute); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 26px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.footer-col a {
  display: block;
  font-size: 12.5px;
  color: var(--dim);
  padding: 3px 0;
  transition: color 0.2s, transform 0.2s;
}
.footer-col a:hover { color: var(--gold); transform: translateX(2px); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--mute);
}

/* ---------- 17. Tabbar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1180px) {
  .watch-layout { grid-template-columns: minmax(0, 1fr); }
  .watch-side { max-height: none; }
  .watch-side-body { max-height: 260px; }
}

@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .header-search { width: 190px; }
  .header-search:focus-within { width: 230px; }
  .detail-main { grid-template-columns: 190px minmax(0, 1fr); gap: 26px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  :root { --header-h: 58px; }
  body { font-size: 14.5px; }
  .header-inner { gap: 12px; }
  .header-search { display: none; }
  .brand-text { font-size: 14px; letter-spacing: 0.1em; }
  .icon-btn { width: 34px; height: 34px; }
  .only-mobile { display: grid; }

  .hero { margin: 0 calc(var(--gutter) * -1); height: 76vh; min-height: 460px; }
  .hero-content { padding-bottom: 46px; }
  .hero-title { font-size: clamp(24px, 7.4vw, 32px); letter-spacing: -0.01em; max-width: 100%; }
  .hero-desc { -webkit-line-clamp: 2; font-size: 13.5px; margin-bottom: 20px; }
  .hero-meta { font-size: 12.5px; margin-bottom: 12px; }
  .hero-actions .btn { height: 40px; padding: 0 16px; font-size: 13px; }
  .hero-dots { width: 100%; margin: 14px 0 0; }

  .section-head { margin: 38px 0 14px; }
  .section-head h2 { font-size: 18px; }
  .section-head .sub { display: none; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
  .grid--dense { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 9px; }
  .card-overlay { opacity: 1; background: linear-gradient(to top, rgba(6, 6, 9, 0.94), transparent 46%); padding: 9px; }
  .card-overlay .co-play, .card-overlay .co-sub { display: none; }
  .card-overlay .co-title { font-size: 11.5px; }
  .card-badge { font-size: 9.5px; padding: 1px 5px; top: 6px; right: 6px; }
  .card-source { display: none; }

  .detail-main { grid-template-columns: 1fr; gap: 22px; }
  .detail-poster { width: 148px; margin: 0 auto; }
  .detail-info { text-align: left; }
  .detail-title { font-size: 24px; }
  .episodes { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
  .ep { font-size: 12px; min-height: 38px; }

  .app { padding-bottom: 110px; }
  .site-footer { margin-bottom: 62px; }

  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 95;
    background: rgba(10, 10, 14, 0.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(20px) saturate(150%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 0 8px;
    font-size: 10px;
    color: var(--mute);
    transition: color 0.2s;
  }
  .tabbar a.is-active { color: var(--gold); }
  .toast-host { bottom: 78px; }
  .search-hero { margin-bottom: 24px; }
  .search-box { height: 50px; padding-left: 16px; }
  .search-box input { font-size: 15px; }
  .search-box .btn { height: 38px; padding: 0 16px; }
}

@media (min-width: 721px) {
  .only-mobile { display: none !important; }
}

/* 打印/减少动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   19. 补充块：弹窗列表 / 历史卡片 / 关于
   ============================================================ */

/* 首页搜索引导 */
.search-teaser {
  position: relative;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(230, 180, 92, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.022);
  overflow: hidden;
}
.search-teaser p {
  margin: 0 0 16px;
  max-width: 70ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--dim);
}
.search-teaser b { color: var(--gold); font-weight: 600; }

/* 换源列表 */
.alt-list { display: flex; flex-direction: column; gap: 8px; }
.alt-item {
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  color: var(--dim);
  transition: all 0.2s var(--ease);
}
.alt-item:hover {
  border-color: rgba(230, 180, 92, 0.4);
  background: rgba(230, 180, 92, 0.07);
  color: var(--text);
  transform: translateX(2px);
}
.alt-name { font-size: 14px; font-weight: 600; color: var(--text); }
.alt-meta { font-size: 12px; color: var(--mute); }

/* 下载列表 */
.dl-list {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.dl-row {
  display: grid;
  grid-template-columns: 1fr 46px auto;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dl-row:last-child { border-bottom: 0; }
.dl-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-type {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--mute);
  text-align: center;
  padding: 1px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.modal-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--mute);
}
.modal-hint code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold);
}

/* 历史/收藏卡片删除按钮 */
.history-wrap { position: relative; }
.hx-del {
  position: absolute;
  top: 7px; right: 7px;
  z-index: 6;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  background: rgba(8, 8, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.25s var(--ease), background 0.2s;
}
.history-wrap:hover .hx-del { opacity: 1; transform: scale(1); }
.hx-del:hover { background: var(--crimson); border-color: transparent; }

/* 关于 */
.about-text p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.85; color: var(--dim); }
.about-text p:last-child { margin-bottom: 0; }
.about-text a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.about-text a:hover { color: var(--gold-bright); }
.about-text .muted { font-size: 12px; color: var(--mute); padding-top: 10px; border-top: 1px dashed var(--line); }

/* 直播工具条 */
.live-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.live-toolbar .result-count { font-size: 12.5px; color: var(--mute); }

/* 设置项里的状态文字 */
.src-state { white-space: nowrap; }

@media (max-width: 720px) {
  .search-teaser { padding: 20px 18px; }
  .dl-row { grid-template-columns: 1fr auto; }
  .dl-type { display: none; }
  .hx-del { opacity: 1; transform: none; }
  .live-toolbar .search-box { max-width: none; width: 100%; }
}

