:root {
  --font-sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --page-width: 1500px;
  --header-height: 78px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --accent: #1683bd;
  --accent-2: #8bd7f5;
  --positive: #45d69a;
  --text: #f7f7fb;
  --text-muted: #a9acba;
  --surface: #171923;
  --surface-raised: #20232f;
  --surface-soft: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .11);
  --page: #0c0e14;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[data-feature].feature-disabled { display: none !important; }
html.no-theme-animation *, html.no-theme-animation *::before, html.no-theme-animation *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
.mac_pop_bg, .mac_pop_msg_bg { position: fixed; inset: 0; z-index: 998; background: rgba(4,6,12,.62); backdrop-filter: blur(6px); }
.mac_pop, .mac_pop_msg { position: fixed; top: 50%; left: 50%; z-index: 999; overflow: hidden; max-width: calc(100vw - 28px); max-height: calc(100vh - 28px); border: 1px solid var(--border); border-radius: 18px; background: var(--surface-raised); box-shadow: 0 24px 80px rgba(0,0,0,.45); color: var(--text); transform: translate(-50%,-50%); }
.mac_pop_msg { display: grid; min-width: 220px; min-height: 54px; padding: 14px 18px; place-items: center; }
.mac_pop_msg .pop-msg { line-height: 1.6; text-align: center; }
.mac_pop .pop_top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.mac_pop .pop_top h2 { margin: 0; font-size: 16px; }
.mac_pop .pop_close { padding: 6px; color: var(--text-muted); cursor: pointer; }
.mac_pop .pop_content { overflow: auto; max-height: calc(100vh - 90px); padding: 16px; }

.jump-page { min-height: 100vh; display: grid; padding: 24px; place-items: center; }
.jump-card { width: min(100%, 520px); padding: 42px 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow); text-align: center; }
.jump-mark { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-size: 30px; font-weight: 900; }
.jump-card h1 { margin: 0; font-size: clamp(22px, 4vw, 34px); }
.jump-card p { margin: 14px 0 24px; color: var(--text-muted); }

.ambient {
  position: fixed;
  z-index: -2;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .18;
  pointer-events: none;
}
.ambient-one { top: -15vw; left: -10vw; background: #62c7f0; }
.ambient-two { top: 30vh; right: -20vw; background: #b8e8fa; }

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  width: min(calc(100% - 40px), var(--page-width));
  min-height: var(--header-height);
  padding: 12px 16px 12px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: 0 12px 40px rgba(0,0,0,.16);
  backdrop-filter: blur(var(--glass-blur, 24px)) saturate(140%);
  transform: translateX(-50%);
  transition: min-height .25s ease, background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { min-height: 66px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 18px 46px rgba(0,0,0,.3); }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: -.08em;
}
/* Logo 图片按比例缩放且不超过容器：方形图保持原尺寸不放大，横向长图标填满加宽后的容器 */
.brand-mark img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; border-radius:inherit; }
/* 关闭右侧文字后：logo 加长，适配内含文字的横向长图标 */
.brand-text-hidden .brand-mark { width: 150px; height: 42px; border-radius: 12px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.desktop-nav { display: flex; align-items: center; gap: 6px; margin-left: 5vw; }
.desktop-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px; color: var(--text-muted); font-size: 14px; font-weight: 600; transition: .2s ease; }
.desktop-nav a:hover, .desktop-nav a.is-active { background: var(--surface-soft); color: var(--text); }
.desktop-nav-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.desktop-nav-custom-icon { border-radius: 3px; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(190px, 22vw, 320px);
  gap: 4px;
  padding: 0 5px 0 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}
.header-search:focus-within { border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); }
.header-search input { min-width: 0; width: 100%; height: 42px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.header-search input::placeholder { color: var(--text-muted); }
.header-search-submit {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.header-search-submit:hover,
.header-search-submit:focus-visible { background: var(--surface-soft); color: var(--accent); outline: none; transform: translateY(-1px); }
.header-search-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-button.mobile-search-toggle { display: none; }
.mobile-search-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.header-search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(380px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
  backdrop-filter: blur(24px) saturate(140%);
}
.header-search-panel::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 12px;
  content: "";
}
.header-search-panel[hidden],
.header-search-section[hidden],
.header-search-status[hidden] { display: none !important; }
.header-search-section > p,
.header-search-status { margin: 0 0 10px; color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.header-hot-list { display: flex; flex-wrap: wrap; gap: 7px; }
.header-hot-list a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
}
.header-hot-list a:hover,
.header-hot-list a:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent); outline: none; }
.header-match-list { display: grid; gap: 5px; }
.header-match-link {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.header-match-link::before { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); content: ""; }
.header-match-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-match-link:hover,
.header-match-link:focus-visible,
.header-match-link.is-active { background: var(--surface-soft); color: var(--accent); outline: none; }
.header-search-status { margin: 2px 0 0; padding: 10px; border-radius: 10px; background: var(--surface-soft); letter-spacing: 0; line-height: 1.55; }
.icon-button, .profile-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.icon-button svg, .profile-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-button { position: relative; overflow: hidden; background: linear-gradient(145deg,color-mix(in srgb,var(--accent) 54%,#fff),var(--accent-2)); box-shadow: 0 8px 20px color-mix(in srgb,var(--accent) 17%,transparent), inset 0 1px rgba(255,255,255,.55); color: #17363d; }
.profile-button::after { position: absolute; inset: 1px; border: 1px solid rgba(255,255,255,.22); border-radius: inherit; content: ""; pointer-events: none; }
.theme-toggle:hover, .profile-button:hover, .header-history-toggle:hover { border-color: color-mix(in srgb,var(--accent) 38%,var(--border)); transform: translateY(-2px); }
.header-history { position: relative; flex: 0 0 auto; }
.header-history.is-open .header-history-toggle { border-color: color-mix(in srgb,var(--accent) 48%,var(--border)); background: color-mix(in srgb,var(--accent) 12%,var(--surface)); color: var(--accent); }
.header-history-panel { position: absolute; top: calc(100% + 12px); right: -108px; z-index: 82; width: min(360px,calc(100vw - 40px)); padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb,var(--surface) 95%,transparent); box-shadow: 0 22px 55px rgba(0,0,0,.32); backdrop-filter: blur(24px) saturate(140%); }
.header-history-panel::before { position: absolute; right: 0; bottom: 100%; left: 0; height: 12px; content: ""; }
.header-history-panel[hidden] { display: none !important; }
.header-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 2px 11px; border-bottom: 1px solid var(--border); }
.header-history-heading > div { display: flex; flex-direction: column; gap: 3px; }
.header-history-heading span { color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.header-history-heading strong { font-size: 14px; }
.header-history-heading > a { color: var(--text-muted); font-size: 10px; font-weight: 700; }
.header-history-heading > a:hover { color: var(--accent); }
.header-history-list { display: grid; max-height: 360px; gap: 5px; margin-top: 8px; overflow-y: auto; }
.header-history-item { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 10px; padding: 7px; border-radius: 12px; transition: background .2s ease, color .2s ease; }
.header-history-item:hover, .header-history-item:focus-visible { background: var(--surface-soft); color: var(--accent); outline: none; }
.header-history-poster { display: grid; width: 46px; height: 58px; overflow: hidden; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--accent); font-size: 13px; }
.header-history-poster img { width: 100%; height: 100%; object-fit: cover; }
.header-history-copy { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.header-history-copy strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.header-history-copy small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.header-history-empty { margin: 0; padding: 24px 12px; color: var(--text-muted); font-size: 11px; line-height: 1.7; text-align: center; }

main { padding-top: 14px; }
.hero {
  position: relative;
  width: min(calc(100% - 40px), var(--page-width));
  height: min(64vh, 680px);
  min-height: 540px;
  margin: 100px auto 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-track, .hero-slide { width: 100%; height: 100%; }
.hero-slide { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity .8s ease, visibility .8s; }
.hero-slide.is-active { visibility: visible; opacity: 1; }
.hero-backdrop { position: absolute; inset: 0; overflow: hidden; transform: scale(1.035); transition: transform 7s ease; }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.hero-slide.is-active .hero-backdrop { transform: scale(1); }
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none; /* 纯视觉遮罩，不拦截点击，允许点击背景跳转详情 */
  background:
    linear-gradient(90deg, rgba(8,10,16,.97) 0%, rgba(8,10,16,.78) 36%, rgba(8,10,16,.12) 75%),
    linear-gradient(0deg, rgba(8,10,16,.88) 0%, transparent 48%);
}
.hero-content { position: absolute; top: 50%; left: clamp(34px, 6vw, 94px); z-index: 2; width: min(580px, 49%); transform: translateY(-45%); }
.eyebrow, .section-kicker { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero-eyebrow-mobile { display: none; }
.eyebrow span { margin-right: 10px; padding: 7px 10px; border-radius: 99px; background: var(--accent); color: #fff; letter-spacing: .08em; }
.hero h1 { max-width: 680px; margin: 24px 0 14px; color: #f7f7fb; font-size: clamp(42px, 5.8vw, 84px); line-height: .98; letter-spacing: -.055em; text-shadow: 0 3px 24px rgba(0,0,0,.34); text-wrap: balance; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #d4d5dc; font-size: 13px; }
.hero-meta strong { color: #70e5ad; }
.hero-meta span:not(:last-child)::after { margin-left: 10px; color: #747785; content: "•"; }
.hero-summary { display: -webkit-box; max-width: 520px; margin: 20px 0 28px; overflow: hidden; color: #c7c8d0; font-size: 15px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* 移动端按钮块默认隐藏，仅桌面端按钮块显示；820px 断点以下在 responsive.css 中切换 */
.hero-actions-mobile { display: none; }
/* 关闭幻灯片“显示按钮/显示简介”时 JS 通过 hidden 属性隐藏，需用 !important 覆盖 display 声明 */
.hero-actions[hidden],
.hero-summary[hidden] { display: none !important; }
/* 幻灯片简洁模式：隐藏精选标签/简介/按钮，标题缩小并把标题与元信息整体下移到幻灯片内部左下角 */
.hero-clean .hero-eyebrow-desktop,
.hero-clean .hero-eyebrow-mobile { display: none; }
.hero-clean .hero-summary { display: none; }
.hero-clean .hero-actions,
.hero-clean .hero-actions-desktop,
.hero-clean .hero-actions-mobile { display: none !important; }
.hero-clean .hero-content { top: auto; bottom: clamp(30px, 5.5vw, 62px); transform: none; }
.hero-clean .hero-content h1 { margin: 14px 0 12px; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.06; }
/* 简洁模式下移动到元信息行的类型标签：默认隐藏，简洁模式显示为主题色胶囊 */
.hero-meta-type { display: none; padding: 4px 11px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 88%, #fff); color: #fff; font-weight: 800; }
.hero-clean .hero-meta-type { display: inline-flex; }
.hero-meta .hero-meta-type::after { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 9px; padding: 0 22px; border: 1px solid transparent; border-radius: 15px; font-size: 14px; font-weight: 800; transition: transform .2s ease, filter .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button-primary { background: #fff; color: #11131a; }
.button-primary span { color: var(--accent); }
.button-secondary { border-color: rgba(255,255,255,.24); background: rgba(20,22,30,.42); color: #f7f7fb; box-shadow: inset 0 1px 0 rgba(255,255,255,.1); backdrop-filter: blur(16px); }
.hero-poster { position: absolute; right: clamp(36px, 6vw, 90px); bottom: 9%; z-index: 2; width: clamp(200px, 20vw, 300px); aspect-ratio: 2/3; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 24px; box-shadow: 0 30px 70px rgba(0,0,0,.45); transform: rotate(2.5deg); }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.douban-score {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 5px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  background: rgba(8,12,14,.76);
  box-shadow: 0 7px 18px rgba(0,0,0,.24);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  backdrop-filter: blur(12px) saturate(135%);
}
.douban-score img { width: 19px; height: 19px; flex: 0 0 auto; border-radius: 5px; object-fit: contain; }
.hero-controls { position: absolute; right: 34px; bottom: 26px; z-index: 3; display: flex; align-items: center; gap: 12px; }
.hero-controls > button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(12,14,20,.56); font-size: 24px; cursor: pointer; backdrop-filter: blur(10px); }
.hero-dots { display: flex; align-items: center; gap: 6px; }
.hero-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 10px; background: rgba(255,255,255,.35); cursor: pointer; transition: width .25s ease, background .25s ease; }
.hero-dot.is-active { width: 26px; background: #fff; }

.content-section { width: min(calc(100% - 40px), var(--page-width)); margin: 72px auto 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 5px 0 0; font-size: clamp(24px, 2.3vw, 34px); letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--accent); }
.section-heading > a, .text-button { border: 0; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.section-heading > a:hover, .text-button:hover { color: var(--text); }
.media-row { display: grid; grid-auto-columns: clamp(165px, 15vw, 225px); grid-auto-flow: column; gap: 18px; padding: 8px 4px 24px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: inline proximity; }
.media-row::-webkit-scrollbar { display: none; }
.scroll-row-shell { position: relative; isolation: isolate; }
.scroll-row-shell::before,
.scroll-row-shell::after { position: absolute; top: 0; bottom: 18px; z-index: 3; width: 70px; pointer-events: none; content: ""; opacity: .72; }
.scroll-row-shell::before { left: 0; background: linear-gradient(90deg, var(--page), transparent); }
.scroll-row-shell::after { right: 0; background: linear-gradient(270deg, var(--page), transparent); }
.row-scroll-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transform: translateY(-50%);
  transition: opacity .2s ease, transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.row-scroll-arrow:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 84%, transparent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 26%, transparent);
  color: #fff;
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}
.row-scroll-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.row-scroll-arrow[hidden] { display: none; }
.row-scroll-arrow:disabled { opacity: .3; cursor: default; }
.row-scroll-prev { left: 10px; }
.row-scroll-next { right: 10px; }
.media-row-featured { grid-auto-columns: clamp(240px, 23vw, 340px); }
.media-card { min-width: 0; scroll-snap-align: start; }
.card-poster { position: relative; display: block; aspect-ratio: 2/3; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 14px 34px rgba(0,0,0,.18); transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
/* 封面加载占位动画：图片加载完成前显示居中的旋转加载环（transform 旋转，GPU 合成，性能开销小），完成后由 JS 移除 */
.card-poster::before, .rank-cover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  background: transparent;
  animation: cover-loader-spin .85s linear infinite;
}
@keyframes cover-loader-spin { to { transform: rotate(360deg); } }
.card-poster.is-loaded::before, .rank-cover.is-loaded::before { display: none; }
/* 小尺寸海报（首页卡片列表 52x70）缩小加载环，避免遮挡 */
.home-category-layout-compact .card-poster::before { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-width: 2px; }
/* 自定义加载动画图片：后台选择“自定义图片”时以该图片铺满整个封面作为占位 */
html[data-cover-loader="custom"] .card-poster::before,
html[data-cover-loader="custom"] .rank-cover::before {
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background-color: var(--surface-soft);
  background-image: var(--cover-loader-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: none;
}
.media-card-wide .card-poster { aspect-ratio: 16/10; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .3s ease; }
.card-poster .douban-score img { width: 19px; height: 19px; border-radius: 5px; object-fit: contain; transition: none; }
.card-poster::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,7,12,.76), transparent 42%); content: ""; }
.card-poster:hover { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); box-shadow: 0 22px 46px rgba(0,0,0,.32); transform: translateY(-7px); }
.card-poster:hover img { transform: scale(1.055); }
.card-play { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.16); opacity: 0; backdrop-filter: blur(12px); transform: translate(-50%,-40%) scale(.8); transition: .25s ease; }
.card-poster:hover .card-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.card-remark { position: absolute; right: 10px; bottom: 10px; z-index: 2; max-width: calc(100% - 20px); overflow: hidden; color: #fff; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-copy { padding: 13px 3px 0; }
.card-copy h3, .ranking-card h3 { margin: 0; overflow: hidden; font-size: 15px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.card-copy p { display: flex; gap: 10px; margin: 7px 0 0; color: var(--text-muted); font-size: 11px; }
.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 18px; }
.home-category-layout-poster { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 28px 18px; }
.home-category-layout-poster .home-category-card:nth-child(n+13) { display: none; }
.home-category-layout-slider { display: grid; grid-template-columns: none; grid-auto-columns: clamp(165px,15vw,225px); grid-auto-flow: column; gap: 18px; padding: 8px 4px 24px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: inline proximity; }
.home-category-layout-slider::-webkit-scrollbar { display: none; }
.home-category-module:not(.home-category-module-slider) .home-category-shell::before,
.home-category-module:not(.home-category-module-slider) .home-category-shell::after,
.home-category-module:not(.home-category-module-slider) .row-scroll-arrow { display: none; }
.home-category-module-compact { box-sizing: border-box; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-soft); }
.home-category-layout-compact { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 34px; }
.home-category-layout-compact .home-category-card { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 13px; min-width: 0; padding: 9px; border-radius: 15px; transition: background .2s ease,transform .2s ease; }
.home-category-layout-compact .home-category-card:nth-child(n+13) { display: none; }
.home-category-layout-compact .home-category-card:hover { background: var(--surface); transform: translateX(3px); }
.home-category-layout-compact .card-poster { width: 52px; height: 70px; aspect-ratio: auto; border: 0; border-radius: 9px; box-shadow: none; }
.home-category-layout-compact .card-poster:hover { box-shadow: none; transform: none; }
.home-category-layout-compact .card-poster::after,
.home-category-layout-compact .douban-score,
.home-category-layout-compact .card-play,
.home-category-layout-compact .card-remark { display: none; }
.home-category-layout-compact .card-copy { min-width: 0; }
/* 卡片列表名称允许换行（最多两行），长标题不再截断为一行 */
.home-category-layout-compact .card-copy h3 { overflow: visible; font-size: 13px; line-height: 1.4; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-category-layout-compact .card-copy p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-category-layout .home-category-remark { display: none; }
.home-category-layout-compact .home-category-year { display: none; }
.home-category-layout-compact .home-category-remark { display: inline; }
.featured-rows-1 .featured-grid .media-card:nth-child(n+7),
.featured-rows-2 .featured-grid .media-card:nth-child(n+13) { display: none; }
.ranking-row { grid-auto-columns: clamp(280px, 30vw, 420px); }
.ranking-card { position: relative; display: grid; grid-template-columns: 82px 92px minmax(0,1fr); align-items: center; min-height: 136px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); scroll-snap-align: start; }
.rank-number { color: transparent; font-size: 74px; font-weight: 950; letter-spacing: -.1em; -webkit-text-stroke: 1px color-mix(in srgb, var(--text) 40%, transparent); transform: translateX(-8px); }
.rank-poster { width: 76px; height: 108px; overflow: hidden; border-radius: 12px; transform: rotate(2deg); }
.rank-poster img { width: 100%; height: 100%; object-fit: cover; }
.ranking-card > div { min-width: 0; padding: 0 16px; }
.ranking-card p { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
.split-sections { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 34px; }
.split-section { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-soft); }
.compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.compact-module .compact-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.compact-card { display: flex; align-items: center; min-width: 0; gap: 13px; padding: 9px; border-radius: 15px; transition: background .2s ease, transform .2s ease; }
.compact-card:hover { background: var(--surface-soft); transform: translateX(3px); }
.compact-card img { width: 52px; height: 70px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.compact-card span { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.compact-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.compact-card small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }

.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: end; width: min(calc(100% - 40px), var(--page-width)); gap: 26px; margin: 100px auto 30px; padding: 34px; border-top: 1px solid var(--border); color: var(--text-muted); }
.footer-brand strong { color: var(--text); }
.site-footer p { margin: 13px 0 0; font-size: 12px; }
.footer-links { display: flex; gap: 22px; font-size: 12px; }
.footer-resource-links { display:flex; grid-column:1/-1; align-items:center; flex-wrap:wrap; gap:10px 16px; padding-top:18px; border-top:1px solid var(--border); font-size:11px; }
.footer-resource-links strong { color:var(--text); font-size:11px; }
.footer-resource-links a { color:var(--text-muted); transition:color .2s ease; }
.footer-resource-links a:hover { color:var(--accent); }
.copyright { grid-column: 1/-1; }
.mobile-nav { display: none; }
.theme-ad-slot { width:min(calc(100% - 40px),var(--page-width)); min-height:1px; margin:28px auto; overflow:hidden; border-radius:var(--radius-md); }
.theme-ad-slot img,.theme-ad-slot iframe { max-width:100%; }
.pull-refresh-indicator { position:fixed; top:12px; left:50%; z-index:90; display:grid; width:42px; height:42px; place-items:center; border:1px solid var(--border); border-radius:50%; background:var(--surface); box-shadow:var(--shadow); opacity:0; pointer-events:none; transform:translate(-50%,-70px) rotate(0); transition:opacity .18s ease,transform .18s ease; }
.pull-refresh-indicator.is-visible { opacity:1; }
html.no-background-gradient .ambient { display:none; }

/* 页面切换加载动画（APP 风格过渡遮罩 + 顶部进度条），由 js/page-transition.js 动态创建 */
.page-transition-veil { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 84%, transparent); backdrop-filter: blur(8px) saturate(120%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s; }
.page-transition-veil.is-active { opacity: 1; visibility: visible; }
.page-transition-spinner { width: 42px; height: 42px; border: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: page-transition-spin .8s linear infinite; }
@keyframes page-transition-spin { to { transform: rotate(360deg); } }
.page-transition-bar { position: fixed; top: 0; left: 0; z-index: 9991; width: 0; height: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }

/* 首页弹窗公告：进入首页时显示，可关闭；弹出频率由 js/app.js 按运行时配置驱动显隐 */
.notice-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .28s ease, visibility .28s ease; }
.notice-modal.is-open { visibility: visible; opacity: 1; }
.notice-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 16, .66); backdrop-filter: blur(8px); }
.notice-modal-box { position: relative; width: min(580px, 92vw); max-height: 78vh; overflow: auto; padding: 0 26px 28px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); border-radius: 24px; background: var(--surface); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.2, .8, .3, 1.1); scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent; }
.notice-modal.is-open .notice-modal-box { transform: none; }
/* 顶部装饰光晕：主题色渐变 + 高光细线，提升弹窗质感 */
.notice-modal-box::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; border-radius: 24px 24px 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent)), transparent 70%); content: ""; pointer-events: none; }
.notice-modal-box::after { position: absolute; top: -70px; right: -50px; z-index: 0; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%); content: ""; pointer-events: none; }
/* 喇叭图标：主题色渐变圆底，悬停在标题区上方作为视觉锚点 */
.notice-modal-horn { position: relative; z-index: 1; display: flex; width: 58px; height: 58px; align-items: center; justify-content: center; margin: 0 auto 4px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2, var(--accent)))); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 38%, transparent); color: #fff; transform: translateY(-20px); }
.notice-modal-horn svg { width: 28px; height: 28px; }
/* 标题区：居中排版，中文标题 + 英文小字装饰 */
.notice-modal-head { position: relative; z-index: 1; margin: -8px 0 16px; text-align: center; }
.notice-modal-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .02em; background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2, var(--accent)))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notice-modal-subtitle { margin: 4px 0 0; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; }
/* 内容区：浅色底板 + 圆角卡片化，标题与内容视觉分层 */
.notice-modal-content { position: relative; z-index: 1; padding: 18px; border-radius: 14px; background: color-mix(in srgb, var(--surface-soft, var(--surface)) 72%, var(--accent) 4%); color: var(--text); font-size: 14px; line-height: 1.8; }
.notice-modal-content > :first-child { margin-top: 0; }
.notice-modal-content > :last-child { margin-bottom: 0; }
.notice-modal-content img { max-width: 100%; border-radius: 10px; }
.notice-modal-content a { color: var(--accent); }
.notice-modal-content blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 8px; }
.notice-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; transition: background .2s ease, color .2s ease, transform .2s ease; }
.notice-modal-close:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface-soft)); color: var(--text); transform: rotate(90deg); }
@media (max-width: 820px) {
  .notice-modal-box { padding: 0 18px 22px; }
  .notice-modal-horn { width: 50px; height: 50px; transform: translateY(-16px); }
  .notice-modal-horn svg { width: 24px; height: 24px; }
  .notice-modal-title { font-size: 18px; }
  .notice-modal-content { padding: 14px; }
}

/* 首页公告条：幻灯片下方滚动/固定文字公告（由 js/app.js 按运行时配置控制显隐与样式）。
   宽度与 hero / .content-section 等模块一致（min(100% - 40px, --page-width)），左侧为喇叭矢量图标。
   图标绝对定位覆盖在公告条左侧（底色与公告条一致）：滚动文字在整条宽度内跑马灯（从最右侧/最左侧进入），
   穿过图标下方的部分被图标底色遮挡，不与图标重叠穿模；固定文字从图标右侧开始左对齐显示 */
.notice-bar { position: relative; display: flex; align-items: center; width: min(calc(100% - 40px), var(--page-width)); margin: 0 auto 22px; padding: 10px 18px; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border)); border-radius: 13px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--text); font-size: 13px; }
.notice-bar-icon { position: absolute; top: 1px; bottom: 1px; left: 18px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 24px; color: var(--accent); pointer-events: none; }
.notice-bar-icon svg { width: 18px; height: 18px; }
.notice-bar-viewport { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.notice-bar-inner { min-width: 0; max-width: 100%; }
/* 滚动样式：内容双份并排 + 横向位移 50% 实现无缝循环，任意时刻至少一份内容在视口内。
   flex:0 0 auto 与 max-width:none 防止 flex 收缩把文字压没，保证双份内容完整参与动画；
   滚动区占满整条公告条宽度，文字从最右侧（向左滚动）或最左侧（向右滚动）进入 */
.notice-bar-scroll .notice-bar-inner { display: flex; flex: 0 0 auto; width: max-content; max-width: none; animation: notice-bar-marquee 18s linear infinite; will-change: transform; }
.notice-bar-scroll.notice-bar-reverse .notice-bar-inner { animation-direction: reverse; }
.notice-bar-scroll .notice-bar-inner span, .notice-bar-scroll .notice-bar-inner a { flex: 0 0 auto; display: inline-flex; align-items: center; padding-right: 3em; white-space: nowrap; }
.notice-bar-scroll .notice-bar-inner:hover { animation-play-state: paused; }
.notice-bar-fixed .notice-bar-viewport { overflow: visible; }
.notice-bar-fixed .notice-bar-inner { flex: 1 1 auto; min-width: 0; margin-left: 34px; text-align: left; }
.notice-bar a { color: var(--accent); font-weight: 700; }
.notice-bar a:hover { text-decoration: underline; }
@keyframes notice-bar-marquee { from { transform: translateX(var(--notice-bar-start,100%)); } to { transform: translateX(var(--notice-bar-end,-50%)); } }
/* 公告条为紧凑元素，紧随其后的首个内容区（热门推荐）适当收紧间距，避免上方留白过多 */
.notice-bar + .content-section { margin-top: 40px; }
@media (max-width: 820px) { .notice-bar { width: calc(100% - 24px); margin-bottom: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
