:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --bg-soft: #111114;
  --surface: #16161b;
  --surface-2: #1e1e24;
  --card: #18181d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f5f5f7;
  --muted: #9a9aa4;
  --accent: #ff6a00;
  --accent-2: #e55d00;
  --accent-soft: rgba(255, 106, 0, .16);
  --on-accent: #1a0d00;
  --grad: linear-gradient(135deg, #ff6a00, #ff9a3d);
  --shadow: 0 18px 46px rgba(0, 0, 0, .5);
  --radius: 14px;
  --maxw: 1320px;
  --font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

main { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }

.section { margin: 44px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.section-head h1, .section-head h2 { margin: 0; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.2; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; }
.text-link {
  padding: 8px 14px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.text-link:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ============ 头部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(11, 11, 14, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
  color: var(--on-accent);
  background: var(--grad);
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(255, 106, 0, .35);
}
.brand-text { font-size: 20px; letter-spacing: .5px; }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a {
  padding: 9px 14px;
  color: var(--muted);
  font-weight: 700;
  border-radius: 999px;
  font-size: 14px;
  transition: color .18s ease, background .18s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.top-search { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.top-search input { width: 170px; padding: 9px 16px; border: 0; outline: 0; background: transparent; }
.top-search button { padding: 0 18px; border: 0; color: var(--on-accent); background: var(--accent); font-weight: 800; cursor: pointer; }
.nav-toggle { display: none; }

/* ============ 首屏 Hero ============ */
.hero { position: relative; min-height: 88vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; padding: 60px 20px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,14,.55), rgba(11,11,14,.35) 40%, rgba(11,11,14,.88)); }
.hero-inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, .35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero h1 { margin: 0 0 16px; font-size: clamp(44px, 9vw, 88px); line-height: 1.02; letter-spacing: 2px; }
.hero .hero-sub { margin: 0 0 18px; font-size: clamp(18px, 3vw, 26px); color: var(--text); font-weight: 600; }
.hero .hero-sub b { color: var(--accent); }
.hero .hero-desc { margin: 0 auto 30px; max-width: 640px; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.primary-btn, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.primary-btn { color: var(--on-accent); background: var(--grad); box-shadow: 0 10px 26px rgba(255, 106, 0, .35); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(255, 106, 0, .45); }
.ghost-btn { border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,.04); }
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-dots { position: relative; z-index: 2; display: flex; gap: 10px; margin-top: 40px; }
.hero-dots button { width: 26px; height: 4px; border: 0; border-radius: 999px; background: rgba(255,255,255,.3); cursor: pointer; transition: background .3s ease; }
.hero-dots button.active { background: var(--accent); width: 42px; }

/* ============ 数据统计 ============ */
.stats-section { padding: 0 0 20px; }
.stats-wrap { padding: 34px 0; border-bottom: 1px solid var(--line); }
.stats-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.stats-head .bar { width: 34px; height: 3px; background: var(--accent); border-radius: 2px; }
.stats-head span { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card {
  padding: 26px 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.stat-card:hover { border-color: rgba(255, 106, 0, .45); transform: translateY(-3px); }
.stat-card .num { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 6px; }
.stat-card .num strong { font-size: clamp(34px, 5vw, 48px); font-weight: 900; color: var(--text); }
.stat-card .num em { font-size: 24px; font-weight: 900; color: var(--accent); font-style: normal; }
.stat-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ============ 精选推荐 ============ */
.featured-section { padding: 20px 0; }
.featured-head { text-align: center; margin-bottom: 26px; }
.featured-head h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); }
.featured-head h2 b { color: var(--accent); }
.featured-head p { margin: 8px 0 0; color: var(--muted); }
.featured-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.feature-main { position: relative; grid-row: span 2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.feature-main img { width: 100%; height: 100%; object-fit: cover; }
.feature-main .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(11,11,14,.92)); }
.feature-main .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; }
.feature-main .tag { display: inline-block; padding: 3px 12px; color: #fff; background: var(--accent); border-radius: 999px; font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.feature-main h3 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.feature-main p { margin: 0; color: var(--muted); font-size: 14px; }
.feature-sub { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 200px; }
.feature-sub img { width: 100%; height: 100%; object-fit: cover; }
.feature-sub .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(11,11,14,.92)); }
.feature-sub .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; }
.feature-sub .tag { display: inline-block; padding: 2px 10px; color: #fff; background: var(--accent); border-radius: 999px; font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.feature-sub h3 { margin: 0 0 2px; font-size: 17px; font-weight: 900; }
.feature-sub p { margin: 0; color: var(--muted); font-size: 13px; }

/* ============ TOP10 ============ */
.top10-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.top10-item { position: relative; }
.top10-num {
  position: absolute;
  top: -12px;
  left: -8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 16px;
  font-weight: 900;
  color: var(--on-accent);
  background: var(--grad);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

/* ============ 类型标签 ============ */
.genre-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.genre-strip a {
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.genre-strip a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============ 横向片单 ============ */
.rail { position: relative; }
.rail-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 18px;
  scrollbar-width: none;
}
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-card { flex: 0 0 auto; width: 178px; scroll-snap-align: start; }
.rail-arrow {
  position: absolute;
  top: 40%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  background: rgba(17,17,20,.85);
  font-size: 20px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.rail-arrow:hover { border-color: var(--accent); color: var(--accent); }
.rail-arrow.prev { left: -18px; }
.rail-arrow.next { right: -18px; }

/* ============ 海报卡片 ============ */
.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.poster-card a { display: block; }
.poster-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  aspect-ratio: 2 / 3;
}
.poster-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(11,11,14,.94) 68%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .28s ease, transform .28s ease;
}
.poster-card:hover .poster-media img { transform: scale(1.08); }
.poster-card:hover .poster-media { border-color: var(--accent); }
.poster-card:hover .poster-overlay { opacity: 1; transform: translateY(0); }
.poster-overlay .ov-score { align-self: flex-start; padding: 3px 10px; border-radius: 999px; color: var(--on-accent); background: var(--accent); font-size: 13px; font-weight: 900; }
.poster-overlay .ov-title { margin: 10px 0 2px; font-size: 17px; font-weight: 900; line-height: 1.25; }
.poster-overlay .ov-meta { color: rgba(245,245,247,.82); font-size: 12px; }
.poster-overlay .ov-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 0;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.poster-body { padding: 10px 2px 0; }
.poster-body h3 { margin: 0; overflow: hidden; font-size: 16px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.poster-body .meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.poster-body .meta b { color: var(--accent); font-weight: 800; }

/* ============ 页面标题 + 筛选 ============ */
.page-title { padding: 40px 0 8px; }
.page-title h1 { margin: 0; font-size: clamp(32px, 5.5vw, 54px); }
.page-title p { max-width: 760px; color: var(--muted); }
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  margin: 22px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-bar label { display: grid; gap: 6px; flex: 1 1 160px; min-width: 150px; color: var(--muted); font-size: 13px; font-weight: 800; }
.filter-bar input, .filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-soft);
  outline: 0;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--accent); }
.library-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; color: var(--muted); }
.library-meta strong { color: var(--text); font-size: 20px; }

/* ============ 详情页 ============ */
.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: clamp(22px, 5vw, 54px);
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.detail-hero .hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 12% 0%, var(--tone-a, #1e2433), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, var(--tone-b, #33202a), transparent 55%), var(--bg-soft);
  opacity: .6;
}
.detail-poster, .detail-copy { position: relative; z-index: 1; }
.detail-poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.detail-copy h1 { margin: 0; font-size: clamp(32px, 5.5vw, 56px); line-height: 1.1; }
.detail-copy > p { max-width: 760px; color: var(--muted); font-size: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 14px; }
.info-grid div { padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.info-grid dt { color: var(--muted); font-size: 13px; }
.info-grid dd { margin: 3px 0 0; font-size: 22px; font-weight: 900; }
.cast-line { color: var(--muted); }

/* ============ 播放页 ============ */
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 28px; }
.player-wrap { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.player-screen {
  display: grid;
  place-items: center;
  min-height: 540px;
  padding: 30px;
  text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--tone-a, #1e2433), transparent 70%),
    radial-gradient(120% 120% at 50% 100%, var(--tone-b, #33202a), transparent 70%), var(--bg);
}
.play-symbol {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  color: var(--on-accent);
  background: var(--grad);
  border-radius: 50%;
  font-size: 40px;
  box-shadow: 0 14px 36px rgba(255, 106, 0, .35);
}
.player-screen strong { margin-top: 20px; font-size: clamp(22px, 4vw, 38px); }
.player-screen span { color: var(--muted); }
.player-meta { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 20px; }
.player-meta h1 { margin: 0; font-size: clamp(20px, 3vw, 30px); line-height: 1.2; }

/* ============ 页脚 ============ */
.site-footer { padding: 52px clamp(18px, 4vw, 56px) 34px; margin-top: 60px; background: var(--card); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto auto; gap: 20px 44px; align-items: start; width: min(1320px, 100%); margin: 0 auto; }
.footer-brand .about { max-width: 420px; margin: 14px 0 0; color: var(--muted); }
.footer-cols, .footer-legal { display: flex; flex-direction: column; gap: 10px; font-weight: 700; }
.footer-cols a, .footer-legal a { color: var(--muted); font-size: 14px; }
.footer-cols a:hover, .footer-legal a:hover { color: var(--accent); }
.footer-cols .col-title, .footer-legal .col-title { color: var(--text); font-size: 15px; font-weight: 900; margin-bottom: 4px; }
.copyright { grid-column: 1 / -1; margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top10-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .feature-main { grid-row: auto; min-height: 360px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-poster { max-width: 260px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; width: 42px; height: 42px; padding: 9px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; background: var(--text); }
  .nav-open .main-nav { display: flex; flex-wrap: wrap; flex-basis: 100%; }
  .top-search { margin-left: auto; }
  .top-search input { width: 120px; }
  .rail-arrow { display: none; }
}
@media (max-width: 720px) {
  main { width: min(100% - 24px, var(--maxw)); }
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .top10-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-screen { min-height: 360px; }
  .feature-main { min-height: 280px; }
}
@media (max-width: 430px) {
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top10-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
}
