:root {
  color-scheme: dark;
  --ink: #e8eaef;
  --ink-strong: #f4f5f7;
  --muted: #8b909b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --red: #f04445;
  --red-dark: #d7353a;
  --surface: #1a1d26;
  --surface-2: #222632;
  --canvas: #0e1016;
  --canvas-elevated: #14171f;
  --chip: rgba(255, 255, 255, 0.06);
  --chip-active: rgba(240, 68, 69, 0.16);
  font-family: 'DM Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

/* —— Topbar —— */
.topbar {
  height: 64px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(14, 16, 22, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--ink-strong);
}
.brand-logo {
  display: block;
  width: auto;
  max-width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  position: relative;
  flex: none;
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  transition: color .18s ease, background .18s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--ink-strong); background: var(--chip); }
.main-nav a.active {
  color: #fff;
  background: var(--chip-active);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  transform: translateX(-50%);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  transition: border-color .2s, color .2s, background .2s;
}
.nav-search:hover {
  border-color: rgba(240, 68, 69, 0.45);
  background: var(--chip-active);
  color: #ff8d8b;
}
.nav-search svg.nav-search-svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-search span { margin-right: 0; font-size: 12px; }
.nav-group-link,
.nav-request-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(240, 68, 69, 0.35);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  color: #ff8d8b;
  font-weight: 700;
  line-height: 1;
  background: rgba(240, 68, 69, 0.12);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-group-link {
  border-color: rgba(90, 168, 255, 0.38);
  color: #8ec5ff;
  background: rgba(74, 144, 226, 0.14);
}
.nav-group-link:hover {
  border-color: rgba(90, 168, 255, 0.6);
  background: rgba(74, 144, 226, 0.22);
  color: #b7daff;
}
.nav-request-link:hover {
  border-color: rgba(240, 68, 69, 0.55);
  background: rgba(240, 68, 69, 0.22);
  color: #ffb0ae;
  transform: translateY(-1px);
}
.nav-group-link svg,
.nav-request-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.github-star-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
.github-star-link svg { width: 15px; height: 15px; fill: currentColor; }
.github-star-link b { color: #e4a93d; font-size: 12px; }
.github-star-link:hover {
  border-color: rgba(240, 68, 69, 0.45);
  background: var(--chip-active);
  color: #ff8d8b;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% -10%, rgba(240, 68, 69, 0.18), transparent 55%),
    linear-gradient(180deg, #151922 0%, var(--canvas) 100%);
  color: #fff;
  display: grid;
  place-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(#fff 0.6px, transparent .6px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent 8%, #000 50%, transparent 92%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 40px));
  text-align: center;
  padding: 36px 0 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  font-size: 11px;
  color: #c2c6cf;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.04);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6968;
  box-shadow: 0 0 10px #ff6968;
}
.hero h1 {
  font-size: clamp(28px, 4.2vw, 42px);
  letter-spacing: -1.6px;
  line-height: 1.25;
  margin: 16px 0 8px;
  font-weight: 850;
  color: var(--ink-strong);
}
.hero h1 .tw-accent { color: #ff7775; }
.hero h1 .tw-cursor {
  display: inline-block;
  width: .08em;
  height: .82em;
  margin-left: .06em;
  vertical-align: -0.06em;
  background: #ff7775;
  border-radius: 1px;
  animation: tw-blink 1s steps(1) infinite;
}
/* 循环打字时保留光标；仅无障碍/降动效时隐藏 */
.hero h1.is-typed .tw-cursor { opacity: 0; animation: none; }
@keyframes tw-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .tw-cursor { display: none; animation: none; }
}
.hero-copy {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  letter-spacing: .2px;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 5px;
  height: 54px;
  width: min(640px, 100%);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #a5a9b1;
  border-radius: 50%;
  margin-left: 13px;
  flex: 0 0 auto;
}
.search-icon::after {
  content: '';
  position: absolute;
  height: 7px;
  width: 2px;
  background: #a5a9b1;
  right: -4px;
  bottom: -4px;
  transform: rotate(-45deg);
  border-radius: 2px;
}
.search-form input {
  height: 100%;
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #252831;
  background: transparent;
  font-size: 14px;
}
.search-form input::placeholder { color: #a8acb4; }
.search-form button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #fff;
  background: var(--red);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.search-form button:hover { background: var(--red-dark); transform: translateY(-1px); }
.search-form button span { margin-left: 8px; font-size: 15px; }
.quick-searches {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.quick-searches > span { color: #b8bcc6; margin-right: 4px; }
.quick-searches a {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #c8ccd5;
  transition: color .2s, border-color .2s, background .2s;
}
.quick-searches a:hover {
  color: #ff9a98;
  border-color: rgba(240, 68, 69, 0.4);
  background: var(--chip-active);
}

/* —— Page shell —— */
.page-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 8px;
}
.notice-strip {
  min-height: 46px;
  margin: 18px 0 26px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}
.notice-icon { color: #f5a943; font-size: 16px; }
.notice-strip strong {
  color: var(--ink-strong);
  font-size: 12px;
  padding-right: 13px;
  border-right: 1px solid var(--line-strong);
}
.live-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #44bd83;
  box-shadow: 0 0 0 3px rgba(68, 189, 131, 0.16);
  vertical-align: 1px;
}

.section-block { margin-bottom: 40px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.section-kicker {
  color: #6f7582;
  font-size: 9px;
  letter-spacing: 1.55px;
  font-weight: 700;
  margin-bottom: 7px;
}
.heading-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip-active);
  color: #ff8d8b;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}
.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.4px;
  font-weight: 800;
  color: var(--ink-strong);
}
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.heading-aside { color: #6f7582; font-size: 10px; }
.heading-aside .live-pulse { margin-left: 5px; }

/* —— Discover row: wall + hot (legacy layout helpers) —— */
.discover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}
.discover-main { min-width: 0; }
.discover-side {
  position: sticky;
  top: 84px;
}

/* —— Compact hot search strip —— */
.hot-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.hot-strip__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.hot-strip__label h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-strong);
  white-space: nowrap;
}
.hot-strip__list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hot-strip__list::-webkit-scrollbar { display: none; }
.hot-strip__list a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--chip);
  color: #c4c8d0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .16s, background .16s;
}
.hot-strip__list a:hover,
.hot-strip__list a.is-top {
  color: #ff8d8b;
  background: var(--chip-active);
}
.hot-strip__rank {
  color: #6f7582;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.hot-strip__list a.is-top .hot-strip__rank { color: var(--red); }

.wall-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.wall-tabs button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: color .16s, background .16s;
}
.wall-tabs button:hover { color: var(--ink-strong); }
.wall-tabs button.is-active {
  background: var(--chip-active);
  color: #fff;
}

/* Cinema-scoped TMDB dark overrides */
.cinema-dark .tmdb-poster-wall { margin-bottom: 0; }
.cinema-dark .tmdb-poster-wall--compact {
  margin-bottom: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.cinema-dark .tmdb-poster-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px 12px;
}
.cinema-dark .tmdb-poster-wall--compact .tmdb-poster-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.cinema-dark .tmdb-poster-cover {
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.cinema-dark .tmdb-poster-meta h3 { color: var(--ink-strong); font-size: 13px; }
.cinema-dark .tmdb-poster-meta p { color: var(--muted); font-size: 11px; }
.cinema-dark .tmdb-poster-empty,
.tmdb-poster-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.cinema-dark .tmdb-skel-line { background: #2a303c; }

/* —— Hot search (side / compact) —— */
.hot-panel {
  padding: 14px 14px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hot-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.hot-panel__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-strong);
}
.hot-panel__intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}
.hot-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hot-list li { border-top: 1px solid var(--line); }
.hot-list li:first-child { border-top: 0; }
.hot-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c4c8d0;
  transition: color .16s;
}
.hot-list a:hover { color: #ff8d8b; }
.hot-rank {
  width: 18px;
  color: #6f7582;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hot-rank.is-top { color: var(--red); }
.hot-word {
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-tag {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--chip-active);
  color: #ff8d8b;
  font-size: 9px;
}
.empty-hot-search {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* —— Resource hall / category sections —— */
.category-hall { margin-bottom: 8px; }
.resource-hall,
.resource-category { margin-bottom: 36px; }
.resource-category:target .section-heading h2 {
  color: #ff8d8b;
}
.section-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding-bottom: 3px;
}
.section-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: color .16s;
}
.section-more:hover { color: #ff8d8b; }
.resource-count {
  padding-bottom: 0;
  color: #6f7582;
  font-size: 10px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 12px;
}
.resource-card {
  min-width: 0;
  display: block;
  transition: transform .2s ease;
}
.resource-card:hover { transform: translateY(-3px); }
.resource-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(160deg, #2a3140, #151922);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}
.resource-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 无封面：渐变 + 首字海报 */
.cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 10px 16px;
  overflow: hidden;
  color: #f3ebe3;
  isolation: isolate;
}
.cover-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  background:
    repeating-linear-gradient(
      -28deg,
      transparent 0 9px,
      rgba(255, 255, 255, 0.035) 9px 10px
    ),
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 55%);
  pointer-events: none;
}
.cover-fallback__glow {
  position: absolute;
  width: 70%;
  height: 42%;
  top: 18%;
  left: 15%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 139, 131, 0.28), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.cover-fallback__glyph {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond", "Songti SC", "Noto Serif SC", Georgia, serif;
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #f7efe6;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.cover-fallback__label {
  position: relative;
  z-index: 1;
  max-width: 90%;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.28);
  color: rgba(243, 235, 227, 0.82);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cover-fallback[data-tone="0"] { background: linear-gradient(158deg, #4a312c 0%, #1c1416 52%, #0d0b0e 100%); }
.cover-fallback[data-tone="1"] { background: linear-gradient(158deg, #2f3a48 0%, #151a22 52%, #0c0e12 100%); }
.cover-fallback[data-tone="2"] { background: linear-gradient(158deg, #334239 0%, #151c18 52%, #0c100e 100%); }
.cover-fallback[data-tone="3"] { background: linear-gradient(158deg, #453828 0%, #1a1510 52%, #100e0b 100%); }
.cover-fallback[data-tone="4"] { background: linear-gradient(158deg, #3a3146 0%, #17131d 52%, #0e0c12 100%); }
.cover-fallback[data-tone="5"] { background: linear-gradient(158deg, #2a4044 0%, #121a1c 52%, #0b1012 100%); }
.cover-fallback[data-tone="6"] { background: linear-gradient(158deg, #463038 0%, #1a1216 52%, #100c0e 100%); }
.cover-fallback[data-tone="7"] { background: linear-gradient(158deg, #323642 0%, #14161c 52%, #0c0e12 100%); }

.resource-cover > .cover-fallback {
  border-radius: inherit;
}
.resource-cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #ed8b83;
  font-size: 22px;
}
.resource-cover--media .tmdb-poster-scrim,
.resource-cover--media .tmdb-poster-badge,
.resource-cover--media .tmdb-poster-rating {
  z-index: 2;
  pointer-events: none;
}
.resource-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(10, 12, 18, 0.48);
  font-size: 18px;
  opacity: 0;
  transition: opacity .2s;
}
.resource-card:hover .resource-open { opacity: 1; }
.resource-info {
  margin-top: 10px;
  min-width: 0;
}
.resource-info h3 {
  overflow: hidden;
  margin: 0 0 5px;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-info span {
  display: inline-block;
  overflow: hidden;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--chip);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 110px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}
.resource-empty > span { color: #ed8b83; font-size: 22px; }
.resource-empty strong { display: block; color: #c4c8d0; font-size: 12px; }
.resource-empty p { margin: 5px 0 0; font-size: 11px; }
.resource-empty--compact {
  min-height: 72px;
  justify-content: flex-start;
  padding: 0 16px;
}

.bottom-search {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  margin: 0 0 36px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #fff;
}
.bottom-search .section-kicker { color: #6f7582; }
.bottom-search h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.3px; }
.bottom-search p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.bottom-search > a {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s;
}
.bottom-search > a:hover { background: rgba(255, 255, 255, 0.06); }
.bottom-search > a span { margin-left: 8px; }
.bottom-spark {
  position: absolute;
  right: 20%;
  top: -22px;
  color: rgba(255, 104, 102, 0.16);
  font-size: 100px;
  pointer-events: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--canvas-elevated);
  color: var(--muted);
}
.site-footer__inner {
  width: min(1200px, calc(100% - 56px));
  min-height: 130px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  padding: 24px 0;
}
.site-footer__identity { flex: 0 0 auto; }
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  color: #b8bcc6;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.site-footer__logo {
  display: block;
  width: auto;
  max-width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
}
.site-footer__identity > p {
  margin: 9px 0 0 34px;
  color: #6f7582;
  font-size: 11px;
}
.site-footer__details { max-width: 650px; text-align: right; }
.site-footer__disclaimer {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.site-footer__meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 19px;
  color: #7a808c;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.site-footer__meta a { transition: color .18s; }
.site-footer__meta a:hover { color: #ff8d8b; }

@media (max-width: 1100px) {
  .discover-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .discover-side { position: static; }
  .cinema-dark .tmdb-poster-grid,
  .cinema-dark .tmdb-poster-wall--compact .tmdb-poster-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .resource-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .hot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
  .hot-list li { border-top: 1px solid var(--line); }
  .hot-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 58px;
    padding: 0 14px;
    gap: 12px;
  }
  .brand { font-size: 15px; gap: 7px; }
  .brand-logo { max-width: 34px; height: 34px; }
  .main-nav {
    flex: 1;
    gap: 2px;
    margin: 0 -4px;
    padding: 0 4px;
  }
  .main-nav a {
    height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }
  .topbar-actions { gap: 6px; }
  .github-star-link { gap: 0; padding: 7px 9px; font-size: 0; }
  .github-star-link svg { width: 17px; height: 17px; }
  .github-star-link b { display: none; }
  .nav-search,
  .nav-group-link,
  .nav-request-link {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0;
  }
  .nav-search svg.nav-search-svg,
  .nav-group-link svg,
  .nav-request-link svg { width: 18px; height: 18px; }
  .nav-search .nav-search-text,
  .nav-group-link .nav-group-text,
  .nav-request-link .nav-request-text { display: none; }
  .hero-content { padding: 28px 0 22px; }
  .hero h1 { font-size: 30px; letter-spacing: -1.2px; }
  .hero-copy { font-size: 12px; }
  .search-form { height: 50px; gap: 8px; }
  .search-form input { font-size: 13px; }
  .search-form button { height: 40px; padding: 0 14px; font-size: 12px; }
  .page-shell { width: calc(100% - 28px); }
  .section-heading h2 { font-size: 19px; }
  .cinema-dark .tmdb-poster-grid,
  .cinema-dark .tmdb-poster-wall--compact .tmdb-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .resource-category { margin-bottom: 28px; }
  .section-heading-actions { gap: 8px; }
  .hot-list { grid-template-columns: 1fr; }
  .bottom-search { padding: 18px 16px; flex-wrap: wrap; gap: 14px; }
  .bottom-search h2 { font-size: 16px; }
  .site-footer__inner {
    width: calc(100% - 28px);
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 22px 0;
  }
  .site-footer__brand { font-size: 15px; }
  .site-footer__logo { max-width: 34px; height: 34px; }
  .site-footer__identity > p { margin: 6px 0 0 30px; font-size: 10px; }
  .site-footer__details { width: 100%; text-align: left; }
  .site-footer__meta { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .cinema-dark .tmdb-poster-grid,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— Side dock (right middle) —— */
.side-dock {
  position: fixed;
  right: max(14px, calc((100vw - 1200px) / 2 - 8px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.side-dock__btn {
  pointer-events: auto;
  width: 52px;
  min-height: 52px;
  padding: 8px 6px 7px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(22, 26, 36, 0.92);
  color: var(--muted);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}
.side-dock__btn svg { width: 18px; height: 18px; }
.side-dock__btn span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1;
}
.side-dock__btn:hover {
  transform: translateY(-2px);
  color: var(--ink-strong);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}
.side-dock__btn--group {
  color: #dff0ff;
  border-color: rgba(90, 168, 255, 0.5);
  background: linear-gradient(180deg, #4f90e2 0%, #2f6fbf 100%);
  box-shadow: 0 14px 30px rgba(47, 111, 191, 0.32);
  text-decoration: none;
}
.side-dock__btn--group:hover {
  color: #fff;
  border-color: #8ec5ff;
  background: linear-gradient(180deg, #6aa4ea 0%, #3d7fd0 100%);
}
.side-dock__btn--request {
  color: #fff;
  border-color: rgba(240, 68, 69, 0.55);
  background: linear-gradient(180deg, #f25555 0%, #d7353a 100%);
  box-shadow: 0 14px 30px rgba(240, 68, 69, 0.32);
}
.side-dock__btn--request:hover {
  color: #fff;
  border-color: #ff7a78;
  background: linear-gradient(180deg, #ff6363 0%, #e04443 100%);
}
.side-dock__btn--top[hidden] { display: none; }
.side-dock__btn--top:hover { color: #ff8d8b; border-color: rgba(240, 68, 69, 0.45); background: rgba(240, 68, 69, 0.14); }
@media (max-width: 720px) {
  .side-dock {
    right: 10px;
    top: auto;
    bottom: 88px;
    transform: none;
  }
  .side-dock__btn {
    width: 46px;
    min-height: 46px;
    border-radius: 12px;
  }
  .side-dock__btn svg { width: 16px; height: 16px; }
  .side-dock__btn span { font-size: 9px; }
}

/* —— Search popup —— */
.search-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(14, 16, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.search-popup {
  position: fixed;
  z-index: 10021;
  top: 18%;
  left: 50%;
  width: min(640px, calc(100vw - 32px));
  padding: 22px 22px 20px;
  transform: translate(-50%, 0);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, #1b1f2a 0%, #151922 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  color: var(--ink);
}
.search-popup[hidden],
.search-popup-backdrop[hidden] { display: none; }
.search-popup__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.search-popup__eyebrow {
  display: block;
  color: #ff8d8b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.search-popup__header h2 {
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ink-strong);
}
.search-popup__header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.search-popup__close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.search-popup__close:hover {
  color: #ff8d8b;
  border-color: rgba(240, 68, 69, 0.45);
  background: var(--chip-active);
}
.search-popup__form {
  width: 100%;
  margin: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
body.is-search-popup-open { overflow: hidden; }
@media (max-width: 720px) {
  .search-popup {
    top: 12%;
    padding: 18px 16px 16px;
    border-radius: 14px;
  }
  .search-popup__header h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
