/* ================= 防错乱基线 ================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
img, video, iframe, embed, object { max-width: 100%; height: auto; display: block; }
img { object-fit: cover; }
table { max-width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; overflow: auto; max-width: 100%; }
a, p, h1, h2, h3, li, span { overflow-wrap: anywhere; word-break: break-word; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main, section, article, aside { position: relative; }

/* ================= 主题变量：森系自然绿 · 暗黑影院 ================= */
:root {
  --bg: #0b120e;
  --bg-2: #0d1a12;
  --panel: #12211a;
  --panel-2: #16281f;
  --line: #22392c;
  --text: #dce8de;
  --muted: #8ba896;
  --accent: #4fbf8a;
  --accent-deep: #2e7d5b;
  --gold: #e6b74f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
html { font-size: 14px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--text); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 .5em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ================= 头部：大头图 Banner 叠加导航 ================= */
.site-header { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.header-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(79, 191, 138, .18), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(46, 125, 91, .22), transparent 60%),
    linear-gradient(135deg, #0d1a12 0%, #14301f 48%, #0b1710 100%);
}
.header-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 20px; min-width: 0; }
.brand strong { font-weight: 800; letter-spacing: .5px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #08130d; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: 1 1 auto; min-width: 0; }
.site-nav a {
  padding: 6px 12px; border-radius: 999px; color: var(--text);
  font-size: 14px; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.nav-home { color: var(--accent); }
.header-search { display: flex; flex-shrink: 0; min-width: 0; }
.header-search input, .side-search input, .notfound-search input {
  min-width: 0; flex: 1 1 auto;
  background: rgba(8, 18, 12, .7); border: 1px solid var(--line);
  border-radius: 999px 0 0 999px; padding: 8px 14px;
  color: var(--text); font-size: 16px; outline: none;
}
.header-search input:focus, .side-search input:focus, .notfound-search input:focus { border-color: var(--accent-deep); }
.header-search button, .side-search button, .notfound-search button {
  flex-shrink: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #08130d; font-weight: 700; font-size: 14px;
  border: none; border-radius: 0 999px 999px 0; padding: 8px 18px;
}
.header-search button:hover, .side-search button:hover, .notfound-search button:hover { filter: brightness(1.1); }
.header-search { width: 240px; }
.header-hero { position: relative; z-index: 1; padding-bottom: 14px; }
.hero-slogan { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.nav-toggle {
  display: none; margin-left: auto; flex-shrink: 0;
  width: 40px; height: 36px; padding: 8px 9px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; }

/* ================= 主体布局 ================= */
.site-main { padding: 24px 0 40px; }
.home-title { font-size: 18px; color: var(--muted); font-weight: 600; margin: 4px 0 20px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 24vw, 340px);
  gap: 28px; align-items: start;
}
.main-col, .sidebar { min-width: 0; }

/* ================= 通用模块 ================= */
.block { margin-bottom: 32px; min-width: 0; }
.block-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px;
}
.block-head h2 { font-size: 18px; padding-left: 12px; position: relative; }
.block-head h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.block-sub { color: var(--muted); font-size: 12px; }
.more-link { margin-left: auto; color: var(--muted); font-size: 13px; }
.more-link:hover { color: var(--accent); }

/* ================= 海报卡片（影院海报墙） ================= */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.poster-grid.dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.poster-card {
  min-width: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.poster-card:hover { border-color: var(--accent-deep); }
.poster-thumb {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--panel-2);
}
.poster-thumb img, .rank-thumb img, .strip-thumb img, .score-thumb img, .item-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.78) contrast(1.03);
  transition: filter .25s ease;
}
.poster-card:hover .poster-thumb img,
.rank-item:hover .rank-thumb img,
.strip-card:hover .strip-thumb img,
.score-item:hover .score-thumb img,
.list-item:hover .item-thumb img { filter: saturate(1.05) contrast(1.03); }
.corner-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(135deg, var(--gold), #c8952e);
  color: #1c1508; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.corner-badge.new { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #08130d; }
.poster-info { padding: 10px 12px 12px; min-width: 0; }
.card-title {
  font-size: 14px; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; margin: 0; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--accent); }
.meta time { color: var(--muted); }

/* ================= 播放排行（排名徽章） ================= */
.rank-list {
  counter-reset: rank;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.rank-item {
  counter-increment: rank; min-width: 0;
  display: flex; gap: 12px; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.rank-item:hover { border-color: var(--accent-deep); }
.rank-thumb {
  position: relative; overflow: hidden; flex-shrink: 0;
  width: 72px; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); background: var(--panel-2);
}
.rank-thumb::before {
  content: counter(rank);
  position: absolute; top: 0; left: 0; z-index: 2;
  min-width: 24px; padding: 2px 6px; text-align: center;
  background: rgba(8, 18, 12, .85); color: var(--gold);
  font-weight: 800; font-size: 13px; border-radius: 0 0 10px 0;
}
.rank-item:nth-child(1) .rank-thumb::before,
.rank-item:nth-child(2) .rank-thumb::before,
.rank-item:nth-child(3) .rank-thumb::before { background: linear-gradient(135deg, var(--gold), #c8952e); color: #1c1508; }
.rank-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-intro {
  color: var(--muted); font-size: 12px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ================= 正在热播：滚动榜单条 ================= */
.hot-strip {
  counter-reset: strip;
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  padding: 4px 2px 12px; scroll-snap-type: x proximity;
}
.hot-strip::-webkit-scrollbar { height: 8px; }
.hot-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.strip-card {
  counter-increment: strip;
  flex: 0 0 auto; width: 140px; min-width: 0; scroll-snap-align: start;
}
.strip-thumb {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 2 / 3; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-2); box-shadow: var(--shadow);
}
.strip-thumb::before {
  content: counter(strip);
  position: absolute; left: 6px; bottom: 4px; z-index: 2;
  font-size: 34px; font-weight: 900; font-style: italic;
  color: var(--accent); text-shadow: 0 2px 6px rgba(0, 0, 0, .8);
  line-height: 1;
}
.strip-card .card-title { margin-top: 8px; font-size: 13px; -webkit-line-clamp: 1; }

/* ================= 高分榜单 ================= */
.score-list { counter-reset: score; display: grid; gap: 12px; }
.score-item {
  counter-increment: score; min-width: 0;
  display: flex; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; background: var(--panel);
}
.score-item:hover { border-color: var(--accent-deep); }
.score-item::before {
  content: counter(score);
  flex-shrink: 0; align-self: center;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--gold); font-weight: 800; font-size: 14px;
}
.score-thumb {
  position: relative; overflow: hidden; flex-shrink: 0;
  width: 56px; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); background: var(--panel-2);
}
.score-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }

/* ================= 列表页：细描边极简列表 ================= */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; }
.page-sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.movie-list { display: grid; gap: 14px; }
.list-item {
  min-width: 0; display: flex; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; background: transparent;
  transition: border-color .18s ease, background .18s ease;
}
.list-item:hover { border-color: var(--accent-deep); background: var(--panel); }
.item-thumb {
  position: relative; overflow: hidden; flex-shrink: 0;
  width: 96px; aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm); background: var(--panel-2);
}
.item-thumb::before {
  content: "▶"; position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--line); font-size: 20px;
}
.item-thumb img { position: relative; z-index: 1; }
.item-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item-title {
  font-size: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.item-tags a {
  color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 10px;
}
.item-tags a:hover { color: var(--accent); border-color: var(--accent-deep); }
img.img-empty { visibility: hidden; }

/* ================= 分页 ================= */
.pagination {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 26px 0 6px;
}
.pagination a {
  min-width: 36px; padding: 7px 12px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px;
}
.pagination a:hover { color: #08130d; background: var(--accent); border-color: var(--accent); }

/* ================= 面包屑 ================= */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .current {
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ================= 侧栏 ================= */
.side-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
  box-shadow: var(--shadow); min-width: 0;
}
.side-title {
  font-size: 15px; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line); padding-left: 10px; position: relative;
}
.side-title::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 12px; width: 3px;
  border-radius: 3px; background: var(--accent);
}
.side-nav-list { display: grid; gap: 6px; }
.side-nav-list a {
  display: block; padding: 7px 10px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: 13px;
}
.side-nav-list a:hover { color: var(--accent); border-color: var(--accent-deep); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; color: var(--muted);
}
.tag-cloud a:hover { color: #08130d; background: var(--accent); border-color: var(--accent); }
.side-search { display: flex; min-width: 0; }
.side-rank { counter-reset: siderank; display: grid; gap: 8px; }
.side-rank li {
  counter-increment: siderank; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.side-rank li:last-child { border-bottom: none; padding-bottom: 0; }
.side-rank li::before {
  content: counter(siderank);
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 700;
}
.side-rank li:nth-child(-n+3)::before { background: linear-gradient(135deg, var(--gold), #c8952e); color: #1c1508; border-color: transparent; }
.side-rank a {
  font-size: 13px; color: var(--muted); min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.side-rank a:hover { color: var(--accent); }

/* ================= 视频详情 / 播放器 ================= */
.player-module { margin-bottom: 20px; min-width: 0; }
.player-wrap {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden;
  background: #000; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hls-player { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-title { font-size: 24px; margin-bottom: 10px; }
.video-meta-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  color: var(--muted); font-size: 13px; margin-bottom: 20px;
}
.score-badge {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--gold), #c8952e);
  color: #1c1508; font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 3px 12px;
}
.detail-grid {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px; margin-bottom: 28px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.poster-box {
  position: relative; overflow: hidden;
  aspect-ratio: 2 / 3; border-radius: var(--radius-sm); background: var(--panel-2);
}
.poster-box img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.info-list { display: grid; gap: 8px; align-content: start; min-width: 0; }
.info-list li {
  display: flex; gap: 10px; min-width: 0;
  font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.info-list li:last-child { border-bottom: none; }
.info-label { flex-shrink: 0; color: var(--muted); width: 44px; }
.info-list em { font-style: normal; min-width: 0; }
.video-intro { color: var(--text); font-size: 14px; line-height: 1.8; }
.rich-text { font-size: 14px; line-height: 1.85; min-width: 0; }
.rich-text img { border-radius: var(--radius-sm); margin: 10px auto; }
.rich-text table { display: block; overflow-x: auto; border-collapse: collapse; }
.rich-text blockquote {
  margin: 12px 0; padding: 10px 14px;
  border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ================= 关于我们 ================= */
.about-content { margin-bottom: 26px; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat-card {
  min-width: 0; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 12px; box-shadow: var(--shadow);
}
.stat-num { display: block; font-size: 26px; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 13px; }
.about-contact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ================= 搜索无结果 ================= */
.no-result {
  display: none; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 40px 16px; margin-top: 10px;
}
.no-result-icon { font-size: 40px; color: var(--line); margin-bottom: 8px; }
.no-result-text { font-size: 16px; font-weight: 700; }
.no-result-tips { color: var(--muted); font-size: 13px; }
.no-result-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.no-result-links a { color: var(--accent); font-size: 13px; }

/* ================= 页脚 ================= */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 20px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; padding-top: 30px; padding-bottom: 22px;
}
.footer-col { min-width: 0; color: var(--muted); font-size: 13px; }
.footer-title { font-size: 15px; color: var(--text); margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 14px 0; }
.footer-bottom p { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

/* ================= 404 ================= */
.page-404 { background: radial-gradient(ellipse at 50% 0%, #14301f, var(--bg) 70%); }
.notfound-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.notfound-box {
  width: 100%; max-width: 480px; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 40px 28px; box-shadow: var(--shadow);
}
.notfound-code {
  font-size: 72px; font-weight: 900; line-height: 1; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound-title { font-size: 20px; margin-bottom: 10px; }
.notfound-desc { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.notfound-search { display: flex; margin-bottom: 20px; }
.notfound-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #08130d; font-weight: 700; border-radius: 999px; padding: 8px 22px; font-size: 13px;
}
.btn-primary:hover { color: #08130d; filter: brightness(1.1); }
.btn-ghost {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 22px; font-size: 13px; color: var(--muted);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent-deep); }

/* ================= 响应式 ================= */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .rank-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { gap: 10px; }
  .nav-toggle { display: flex; }
  .header-search { order: 3; width: 100%; }
  .site-nav {
    display: none; order: 4; width: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    border-top: 1px solid var(--line); padding-top: 10px;
    max-height: calc(100vh - 120px); overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); }
  .site-nav a:hover { background: var(--panel-2); }
  .poster-grid, .poster-grid.dense { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .poster-box { max-width: 220px; margin: 0 auto; }
  .list-item { gap: 12px; }
  .item-thumb { width: 84px; }
  .video-title { font-size: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  .poster-grid, .poster-grid.dense { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-card { width: 118px; }
  .rank-thumb { width: 60px; }
  .item-thumb { width: 76px; }
  .item-title { font-size: 15px; }
  .page-head h1 { font-size: 19px; }
  .home-title { font-size: 15px; }
}
