/* DramaNova 前端样式 v2：影院级深色布局（billboard + 横滑货架 + 海报卡）。
   约束：零框架、零外链字体/图标、弱网首屏优先、移动端优先。 */

:root {
  --bg: #08090c;
  --bg-soft: #0b0d12;
  --surface: #11141c;
  --surface-2: #171b25;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f4f6fa;
  --muted: #9ba3b4;
  --muted-2: #6c7488;
  --accent: #ff4f6d;
  --accent-2: #ffa53d;
  --accent-soft: rgba(255, 79, 109, 0.14);
  --ink: #20060c;
  --radius: 14px;
  --max: 1240px;
  --hh: 72px;
  --shadow-card: 0 12px 28px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 26px 60px rgba(0, 0, 0, 0.62);
  --tint: 255 79 109;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hh) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Leelawadee UI", Tahoma, "Noto Sans Thai", "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 10px; }
::selection { background: rgba(255, 79, 109, 0.35); }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 90;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface-2);
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--hh);
  display: flex;
  align-items: center;
  transition: border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.92) 0%, rgba(6, 7, 10, 0.55) 55%, rgba(6, 7, 10, 0) 100%);
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-header.is-scrolled::before {
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: saturate(150%) blur(16px);
}

.header-inner { display: flex; align-items: center; gap: 26px; width: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}
.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(255, 79, 109, 0.4);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  width: 0;
  height: 0;
  border-left: 8px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.brand em { font-style: normal; color: var(--accent-2); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.header-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.header-nav a.is-active { color: var(--text); }
.header-nav .nav-sep { width: 1px; height: 16px; background: var(--line-strong); margin: 0 6px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.84rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }
.icon-btn svg { width: 15px; height: 15px; }

/* 移动端菜单 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.nav-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); }

.nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  max-height: calc(100vh - var(--hh));
  overflow-y: auto;
  padding: 6px 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.98);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.6);
}
.nav-panel-inner { display: grid; gap: 0; }
.nav-panel a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}
.nav-panel a:last-child { border-bottom: 0; }
.nav-panel-title {
  margin: 14px 4px 2px;
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ Billboard */
.billboard {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(66vh, 560px);
  margin-top: calc(var(--hh) * -1);
  padding-top: var(--hh);
  padding-bottom: clamp(26px, 4.5vh, 50px);
  overflow: hidden;
  background: #0b0d12;
}
.billboard-bg {
  position: absolute;
  inset: -12%;
  z-index: -2;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(72px) saturate(140%) brightness(0.42);
  transform: scale(1.1);
}
.billboard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(56% 82% at 78% 24%, rgb(var(--tint) / 0.5), transparent 68%),
    radial-gradient(38% 56% at 94% 78%, rgb(var(--tint) / 0.2), transparent 72%);
}
.billboard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.96) 0%, rgba(8, 9, 12, 0.82) 38%, rgba(8, 9, 12, 0.34) 68%, rgba(8, 9, 12, 0.72) 100%),
    linear-gradient(0deg, var(--bg) 1%, rgba(8, 9, 12, 0.5) 26%, rgba(8, 9, 12, 0) 62%);
}
.billboard-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(24px, 4vw, 56px);
  width: 100%;
}
.billboard-copy { max-width: 620px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 79, 109, 0.16);
}
.billboard h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.038em;
  font-weight: 800;
}
.billboard-desc {
  margin: 0 0 22px;
  max-width: 54ch;
  color: #c5ccdb;
  font-size: clamp(0.92rem, 1.6vw, 1rem);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
}
.meta-row .meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.meta-rank {
  padding: 3px 9px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.billboard-poster {
  width: clamp(140px, 15vw, 208px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  transform: translateY(4px);
}
.billboard-poster img { aspect-ratio: 2 / 3; width: 100%; height: auto; object-fit: cover; }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 0.96rem; border-radius: 12px; }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b050a;
  box-shadow: 0 12px 30px rgba(255, 79, 109, 0.28);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ------------------------------------------------------------------ 货架 */
.shelf { margin-top: 30px; }
.shelf:first-of-type { margin-top: 26px; }
.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.shelf-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.shelf-head h2::before {
  content: "";
  width: 3px;
  height: 17px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.shelf-head .shelf-count { color: var(--muted-2); font-size: 0.78rem; font-weight: 400; }
.shelf-tools { display: flex; align-items: center; gap: 10px; }
.shelf-link { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.shelf-link:hover { color: var(--text); }
.shelf-arrows { display: none; gap: 6px; }
.shelf-arrows button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.shelf-arrows button:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.shelf-arrows button[disabled] { opacity: 0.3; cursor: default; }
.shelf-arrows svg { width: 15px; height: 15px; }
@media (min-width: 900px) { .shelf-arrows { display: flex; } }

.shelf-track {
  display: flex;
  gap: 14px;
  padding: 4px 0 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf.is-scrollable .shelf-track {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
}

/* ------------------------------------------------------------------ 海报卡片 */
.tile {
  position: relative;
  flex: 0 0 158px;
  min-width: 0;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .tile { flex-basis: 176px; } }
@media (min-width: 1080px) { .tile { flex-basis: 190px; } }

.tile-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #1d2331, #0f121a);
  box-shadow: var(--shadow-card);
}
.tile-poster::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;
}
.tile-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile:hover .tile-poster img,
.tile:focus-within .tile-poster img { transform: scale(1.06); }
.tile-poster { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.tile:hover .tile-poster {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.tile-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2a0b0f;
  background: linear-gradient(135deg, #ffd166, var(--accent-2));
  box-shadow: 0 4px 12px rgba(255, 157, 61, 0.35);
}
.tile-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 8px;
  opacity: 0;
  background: linear-gradient(0deg, rgba(4, 5, 8, 0.86) 0%, rgba(4, 5, 8, 0.2) 55%, rgba(4, 5, 8, 0) 100%);
  transition: opacity 0.22s ease;
}
.tile:hover .tile-play,
.tile:focus-within .tile-play { opacity: 1; }
.play-circle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0a0b10;
  transform: scale(0.86);
  transition: transform 0.22s ease;
}
.play-circle svg { width: 17px; height: 17px; margin-left: 2px; }
.tile:hover .play-circle { transform: scale(1); }
.tile-play small {
  position: absolute;
  bottom: 12px;
  left: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.tile-title {
  margin: 9px 2px 2px;
  min-height: 2.64em;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.32;
  color: #e8ebf2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-sub {
  margin: 0 2px;
  color: var(--muted-2);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile:hover .tile-title { color: #fff; }

.tile-body { display: block; }
/* Top 10：大号描边排名立在卡左侧（对齐封面顶边，不压标题） */
.tile.ranked { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 8px; }
.tile.ranked .tile-body { width: 138px; flex: 0 0 auto; }
@media (min-width: 640px) { .tile.ranked .tile-body { width: 152px; } }
.tile.ranked .rank {
  align-self: flex-start;
  margin-top: -2px;
  font-size: clamp(40px, 4.6vw, 58px);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: -0.07em;
  color: rgba(255, 255, 255, 0.06);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
  user-select: none;
}

/* ------------------------------------------------------------------ 浏览区 / 筛选 */
.browse { padding-top: 4px; }
body.is-filtering #home-hero { display: none; }
body.is-filtering #browse .browse-head { margin-top: 30px; }
.browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 10px;
}
.browse-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.browse-head .browse-count { color: var(--muted-2); font-size: 0.8rem; }

.toolbar {
  position: relative;
  z-index: 40;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: saturate(150%) blur(16px);
}
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search { position: relative; flex: 1 1 240px; min-width: 190px; }
.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { border-color: rgba(255, 165, 61, 0.55); background: rgba(255, 255, 255, 0.08); outline: none; }
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.seg button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: #fff; background: rgba(255, 255, 255, 0.13); }

.select {
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
}
.select:focus { outline: none; border-color: rgba(255, 165, 61, 0.5); }

.chips { display: flex; gap: 8px; padding: 10px 0 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  color: #1b050a;
  border-color: transparent;
  background: linear-gradient(135deg, #ffe2c2, #ffd0a6);
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 20px 12px;
  padding: 20px 0 8px;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 26px 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 18px; } }
.grid .tile { flex: none; }

.empty { padding: 70px 0; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 1.05rem; }

.more-wrap { display: flex; justify-content: center; padding: 24px 0 8px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ 详情页 */
.detail-hero {
  position: relative;
  isolation: isolate;
  margin-top: calc(var(--hh) * -1);
  padding: calc(var(--hh) + 26px) 0 4px;
  overflow: hidden;
}
.detail-hero .hero-bg {
  position: absolute;
  inset: -12% -6% 0;
  z-index: -2;
  width: 118%;
  height: 132%;
  object-fit: cover;
  filter: blur(38px) saturate(120%) brightness(0.42);
  transform: scale(1.05);
}
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52% 74% at 84% 14%, rgb(var(--tint) / 0.42), transparent 70%),
    radial-gradient(34% 48% at 8% 88%, rgb(var(--tint) / 0.14), transparent 72%);
}
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.95) 0%, rgba(8, 9, 12, 0.7) 46%, rgba(8, 9, 12, 0.55) 100%),
    linear-gradient(0deg, var(--bg) 1%, rgba(8, 9, 12, 0.55) 30%, rgba(8, 9, 12, 0.1) 70%);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 22px;
  color: var(--muted-2);
  font-size: 0.78rem;
}
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: 0.45; }
.crumbs [aria-current] { color: var(--muted); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 236px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 8px;
}
.poster-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.poster-card img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.75rem;
}
a.tag:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }
.tag.accent {
  color: #ffd7b8;
  border-color: rgba(255, 165, 61, 0.4);
  background: rgba(255, 165, 61, 0.12);
}
.tag.hot {
  color: #2a0b0f;
  border-color: transparent;
  background: linear-gradient(135deg, #ffd166, var(--accent-2));
  font-weight: 700;
}
.detail-info .intro {
  margin: 0 0 22px;
  max-width: 62ch;
  color: #c9d0de;
  font-size: 0.98rem;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.facts div { display: grid; gap: 3px; }
.facts span {
  color: var(--muted-2);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facts b { font-size: 0.88rem; font-weight: 600; }
.hint { margin: 14px 0 0; max-width: 54ch; color: var(--muted-2); font-size: 0.76rem; }
.disclosure {
  margin: 30px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(255, 165, 61, 0.5);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 165, 61, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
}

/* ------------------------------------------------------------------ 平台 / 语言页 */
.page-hero {
  position: relative;
  isolation: isolate;
  margin-top: calc(var(--hh) * -1);
  padding: calc(var(--hh) + 30px) 0 10px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  z-index: -1;
  height: 400px;
  background: radial-gradient(56% 100% at 18% 0%, rgb(var(--tint) / 0.34), transparent 70%),
    radial-gradient(46% 100% at 82% 0%, rgb(80 110 255 / 0.12), transparent 72%);
}
.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.page-hero p { margin: 0; max-width: 62ch; color: var(--muted); font-size: 0.95rem; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 0.8rem;
}
.hero-stats b { color: var(--text); font-size: 0.92rem; font-weight: 700; }

/* ------------------------------------------------------------------ 空状态 / 404 */
.notfound { padding: clamp(60px, 14vh, 130px) 0; }
.notfound h1 { margin: 0 0 12px; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.04em; }
.notfound p { margin: 0 0 24px; color: var(--muted); }

/* ------------------------------------------------------------------ 页脚 */
.site-footer {
  margin-top: 70px;
  padding: 40px 0 34px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%);
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.footer-brand p { margin: 10px 0 0; max-width: 34ch; color: var(--muted-2); font-size: 0.8rem; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 24px;
  min-width: min(100%, 460px);
}
.footer-cols h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-cols a { color: var(--muted); }
.footer-cols a:hover { color: var(--text); }
.footer-note {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.65;
}
.footer-note p { margin: 0 0 8px; }
.footer-note .disclaimer { color: var(--muted); }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 960px) {
  .billboard-inner { grid-template-columns: 1fr; gap: 0; }
  .billboard-poster { display: none; }
  .detail-grid { grid-template-columns: minmax(0, 190px) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --hh: 58px; }
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .header-inner { gap: 14px; }
  .header-nav { display: none; }
  .brand { font-size: 1rem; }
  .nav-toggle { display: inline-flex; }
  .header-actions { gap: 6px; }
  .billboard { min-height: 0; padding-top: calc(var(--hh) + 22px); padding-bottom: 24px; }
  .billboard h1 { font-size: clamp(1.85rem, 7.4vw, 3rem); margin-bottom: 10px; }
  .billboard-desc { -webkit-line-clamp: 2; margin-bottom: 18px; }
  .btn-lg { height: 46px; padding: 0 20px; font-size: 0.9rem; }
  .detail-grid { grid-template-columns: 1fr; align-items: start; }
  .detail-grid .poster-card { width: 200px; margin: 0 auto 6px; }
  .detail-info h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .facts { gap: 18px; }
  .shelf-track { gap: 11px; padding-bottom: 18px; }
  .tile { flex-basis: 138px; }
  .toolbar { padding: 10px 0; }
  .browse-head { margin-top: 26px; }
  .shelf { margin-top: 24px; }
}

@media (max-width: 480px) {
  .meta-row { gap: 8px; font-size: 0.78rem; }
  .meta-row .meta-dot { display: none; }
  .icon-btn { width: 38px; padding: 0; justify-content: center; }
  .icon-btn-label { display: none; }
}

@media (max-width: 420px) {
  .tile { flex-basis: 126px; }
  .tile-title { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ 观看引导 */
.btn-xl {
  height: 58px;
  min-width: 280px;
  padding: 0 34px;
  font-size: 1.02rem;
  border-radius: 14px;
}
.watch-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 4px 0 2px; }
.watch-note { color: var(--muted-2); font-size: 0.76rem; }

/* 移动端常驻观看条 */
.watch-bar { display: none; }
@media (max-width: 720px) {
  .watch-cta { width: 100%; }
  .watch-cta .btn { width: 100%; }
  .watch-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 9, 12, 0.95);
    backdrop-filter: blur(16px) saturate(150%);
    border-top: 1px solid var(--line);
  }
  .watch-bar-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
  .watch-bar-info b { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .watch-bar-info span { font-size: 0.72rem; color: var(--muted-2); }
  .watch-bar .btn { flex: 0 0 auto; height: 44px; padding: 0 18px; }
  body.has-watch-bar { padding-bottom: 80px; }
}

/* ------------------------------------------------------------------ 剧情简介 */
.section-label {
  margin: 24px 0 8px;
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.synopsis .intro { margin: 0; }

/* ------------------------------------------------------------------ 首页精简头 + 筛选区 */
.home-head { padding-block: 26px 4px; }
.home-head h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.home-head .hero-stats { margin-top: 0; }

.toolbar-row { align-items: center; gap: 10px; }
.toolbar-row .chips { flex: 1 1 auto; min-width: 0; padding: 0; }
.toolbar-search { display: flex; padding-top: 10px; }
.toolbar-search .search { flex: 0 1 560px; }

@media (max-width: 720px) {
  .home-head { padding-block: 18px 2px; }
  .toolbar-row { flex-wrap: nowrap; }
  .toolbar-row .seg { flex: 0 0 auto; }
  .toolbar-search .search { flex: 1 1 100%; }
}

/* ------------------------------------------------------------------ Masthead + 筛选面板 */
.masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 34px 0 6px;
}
.masthead-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  opacity: 0.3;
  filter: blur(20px) saturate(130%) brightness(0.62);
  transform: scale(1.08);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 92%);
}
.masthead-bg img { flex: 1 1 0; width: 0; height: 100%; object-fit: cover; }
.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 130% at 86% 0%, rgb(var(--tint) / 0.4), transparent 68%),
    linear-gradient(180deg, rgba(8, 9, 12, 0.42) 0%, rgba(8, 9, 12, 0.88) 58%, var(--bg) 100%);
}
.masthead-inner { position: relative; }
.masthead .eyebrow { margin-bottom: 12px; }
.masthead h1 {
  margin: 0 0 14px;
  max-width: 20ch;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.masthead h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.masthead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 0.82rem;
}
.masthead-meta b { color: var(--text); font-weight: 700; }
.masthead-meta .meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

.filter-deck {
  display: grid;
  gap: 10px;
  margin: 20px 0 6px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(10px);
}
.filter-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.filter-row .chips { flex: 1 1 auto; min-width: 0; padding: 0; }
.filter-label {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.filter-row--search .search { flex: 1 1 auto; max-width: 560px; }
.search-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 0.68rem;
}

/* 选中态：干净的白色药丸，比奶黄色更“平台化” */
.chip { background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.chip[aria-pressed="true"] { background: #f4f6fa; color: #0a0b10; border-color: transparent; font-weight: 600; }
.seg { background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.seg button[aria-pressed="true"] { background: #f4f6fa; color: #0a0b10; font-weight: 600; }

@media (max-width: 720px) {
  .masthead { padding: 20px 0 4px; }
  .masthead-bg { opacity: 0.16; }
  .masthead-meta { font-size: 0.76rem; gap: 6px 14px; }
  .masthead-meta .meta-dot { display: none; }
  .filter-deck { padding: 12px; border-radius: 14px; gap: 8px; }
  .filter-row { gap: 8px; }
  .filter-label { display: inline-block; font-size: 0.6rem; letter-spacing: 0.12em; }
  .filter-row--search .search { max-width: none; }
}

/* ------------------------------------------------------------------ 筛选 chips 换行 + 展开 */
.filter-block { display: grid; gap: 8px; }
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.filter-row--sort { justify-content: flex-start; }
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  overflow: hidden;
}
.chips-wrap.is-collapsed {
  max-height: 36px;
  overflow: hidden;
}
.chips-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-2);
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
}
.chips-toggle:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .chips-wrap.is-collapsed { max-height: 36px; }
  .filter-head { margin-top: 2px; }
}

@media (max-width: 720px) {
  .filter-deck { padding: 12px 14px 14px; gap: 12px; }
  .filter-block { gap: 6px; }
  .filter-head { gap: 8px; }
  .chips-toggle { font-size: 0.68rem; }
  .chip { height: 30px; padding: 0 12px; font-size: 0.76rem; }
  .chips-wrap { gap: 6px; }
  .chips-wrap.is-collapsed { max-height: 30px; }
  .seg button { height: 32px; padding: 0 12px; font-size: 0.8rem; }
}

/* ------------------------------------------------------------------ 法务页 */
.footer-link { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }
.footer-link:hover { color: var(--text); }
.legal { max-width: 760px; padding-top: 40px; }
.legal h1 { margin: 0 0 18px; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; }
.legal h2 { margin: 28px 0 8px; font-size: 1.02rem; }
.legal p { color: var(--muted); margin: 0 0 12px; line-height: 1.7; }
.legal-back { margin-top: 28px; }
.legal-back a { color: var(--accent-2); }

/* ------------------------------------------------------------------ 精简页脚 */
.footer-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-compact .footer-brand p { margin: 8px 0 0; }
.footer-copy {
  margin: 0;
  max-width: 520px;
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: right;
}
@media (max-width: 720px) {
  .footer-compact { align-items: flex-start; }
  .footer-copy { text-align: left; }
}

/* ------------------------------------------------------------------ 首页导语 */
.masthead-lead {
  margin: 0 0 16px;
  max-width: 56ch;
  color: #c9d0de;
  font-size: clamp(0.95rem, 1.5vw, 1.06rem);
  line-height: 1.55;
}
@media (max-width: 720px) {
  .masthead-lead { margin-bottom: 14px; font-size: 0.95rem; }
}

/* 一句话主标题 */
.masthead h1 {
  max-width: 38ch;
  font-size: clamp(1.7rem, 3.5vw, 2.85rem);
  line-height: 1.1;
}
@media (max-width: 720px) {
  .masthead h1 { font-size: clamp(1.55rem, 6.6vw, 2rem); max-width: none; }
}

/* 顶部导航的排序激活态 */
.header-nav a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* 列表标题右侧：当前排序 + 数量 */
.browse-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.8rem;
}
.browse-meta .meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
