/* =========================================================
   影视站模板 - 全站样式
   结构：static/css/style.css
   设计：影院暗色系 + 金色强调，高级克制
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #0a0d14;            /* 页面底色 */
  --bg-soft: #10151f;       /* 次级底色 */
  --card: #141a26;          /* 卡片底色 */
  --card-hover: #1a2233;    /* 卡片悬停 */
  --text: #eef1f6;          /* 主文字 */
  --text-2: #aab3c5;        /* 次级文字 */
  --muted: #6b7688;         /* 弱化文字 */
  --accent: #f5b942;        /* 影院金 */
  --accent-2: #e0503a;      /* 朱红点缀 */
  --line: rgba(255, 255, 255, 0.08);
  --radius: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* 跳转链接（无障碍） */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--accent); color: #0a0d14; padding: 8px 16px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* 眉标（SEO 关键词小标签） */
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--accent); margin-right: 8px; vertical-align: middle; }

.section-title { font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-more { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.section-more:hover { color: var(--accent); }
.section-more::after { content: "→"; margin-left: 4px; }

/* 通用区块间距 */
.section { padding: 44px 0; }

/* =========================================================
   顶部导航
   ========================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 13, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}
.site-header.scrolled { background: rgba(8, 10, 16, 0.96); }

.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: 0.04em; }
.logo svg { flex-shrink: 0; }
.logo .logo-text b { color: var(--accent); }

.main-nav { display: none; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; font-size: 15px; color: var(--text-2);
  border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.main-nav a[aria-current="page"] { color: var(--accent); }

.header-search { margin-left: auto; display: none; position: relative; }
.header-search input {
  width: 220px; height: 38px; padding: 0 42px 0 16px; border-radius: 19px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s, width 0.3s;
}
.header-search input:focus { border-color: var(--accent); width: 260px; }
.header-search input::placeholder { color: var(--muted); }
.header-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  color: var(--muted); transition: color 0.2s;
}
.header-search button:hover { color: var(--accent); }

.nav-toggle {
  margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 8px; color: var(--text);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }

/* 移动端抽屉导航 */
.mobile-nav {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: rgba(10, 13, 20, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 18px;
  display: none;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 12px 8px; font-size: 16px; color: var(--text-2);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--accent); }

/* =========================================================
   Hero 轮播
   ========================================================= */
.hero { position: relative; margin-top: 64px; overflow: hidden; }

.hero-slider { position: relative; height: 420px; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
  background-size: cover; background-position: center 30%;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.35) 0%, rgba(10, 13, 20, 0.55) 55%, var(--bg) 100%);
}

.hero-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 56px;
}
.hero-content .container { width: 100%; }

.hero-tag {
  display: inline-block; padding: 3px 12px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #0a0d14; border-radius: 4px; margin-bottom: 12px;
  width: fit-content;
}
.hero-title { font-family: var(--font-serif); font-size: 34px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; max-width: 16em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.hero-meta .score { color: var(--accent); font-weight: 700; }
.hero-desc {
  font-size: 14px; color: var(--text-2); max-width: 560px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 20px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 24px; border-radius: 8px; font-size: 14px; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0a0d14; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(245, 185, 66, 0.35); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.3); color: var(--text); background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

.hero-controls { position: absolute; right: 20px; bottom: 60px; z-index: 3; display: flex; gap: 8px; }
.hero-controls button {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(10, 13, 20, 0.5); color: var(--text-2);
  transition: color 0.2s, border-color 0.2s;
}
.hero-controls button:hover { color: var(--accent); border-color: var(--accent); }

.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); transition: width 0.3s, background 0.3s; }
.hero-dots button.active { width: 24px; background: var(--accent); }

/* =========================================================
   板块条（内容分类快捷入口）
   ========================================================= */
.cat-strip { padding: 28px 0 4px; }
.cat-strip ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-strip a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text-2); font-size: 14px; transition: background 0.2s, color 0.2s, transform 0.2s;
}
.cat-strip a:hover { background: var(--card-hover); color: var(--accent); transform: translateY(-2px); }
.cat-strip svg { flex-shrink: 0; color: var(--accent); }

/* =========================================================
   影片卡片（图文并茂核心组件）
   ========================================================= */
.movie-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.movie-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: transform 0.25s, box-shadow 0.25s; }
.movie-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.movie-poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; }
.movie-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.movie-card:hover .movie-poster img { transform: scale(1.06); }

.movie-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 2px 10px; font-size: 11px; font-weight: 600; border-radius: 4px;
  background: rgba(10, 13, 20, 0.72); color: var(--text); backdrop-filter: blur(4px);
}
.movie-badge.hot { background: var(--accent-2); color: #fff; }

.movie-score {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  font-size: 15px; font-weight: 800; color: var(--accent);
  background: rgba(10, 13, 20, 0.72); padding: 2px 8px; border-radius: 4px; backdrop-filter: blur(4px);
}

.movie-info { padding: 12px 12px 14px; }
.movie-name { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }

.movie-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.movie-tags span {
  font-size: 11px; color: var(--text-2); padding: 1px 8px;
  border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.03);
}

/* 热映轮播横排 */
.scroll-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.scroll-row .movie-card { flex: 0 0 150px; scroll-snap-align: start; }

/* =========================================================
   榜单 TOP10
   ========================================================= */
.rank-list { display: grid; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s;
}
.rank-item:hover { background: var(--card-hover); transform: translateX(4px); }
.rank-num { font-family: var(--font-serif); font-size: 26px; font-weight: 800; color: var(--muted); width: 40px; text-align: center; flex-shrink: 0; }
.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-thumb { width: 46px; height: 64px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-score { font-size: 16px; font-weight: 800; color: var(--accent); flex-shrink: 0; }

/* =========================================================
   分类导航
   ========================================================= */
.genre-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.genre-card {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s;
}
.genre-card:hover { background: var(--card-hover); transform: translateY(-2px); }
.genre-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(245, 185, 66, 0.12); color: var(--accent); flex-shrink: 0; }
.genre-name { font-size: 15px; font-weight: 700; }
.genre-count { font-size: 12px; color: var(--muted); }

/* =========================================================
   影评 / 专题推荐（图文并茂）
   ========================================================= */
.feature-grid { display: grid; gap: 16px; }
.feature-card {
  position: relative; border-radius: var(--radius); overflow: hidden; height: 260px;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
}
.feature-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,13,20,0.05) 30%, rgba(10,13,20,0.92) 100%); }
.feature-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px; }
.feature-label { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.feature-title { font-size: 20px; font-weight: 800; line-height: 1.4; margin-bottom: 6px; font-family: var(--font-serif); }
.feature-desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================
   资讯
   ========================================================= */
.news-list { display: grid; gap: 0; }
.news-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 15px 4px; border-bottom: 1px solid var(--line);
  transition: color 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item h3 { font-size: 15px; font-weight: 600; color: var(--text); transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-item:hover h3 { color: var(--accent); }
.news-date { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.news-item a { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; }

/* =========================================================
   SEO 关键词区域
   ========================================================= */
.seo-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.seo-block h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.seo-block p { font-size: 13.5px; color: var(--text-2); line-height: 1.9; margin-bottom: 10px; }
.seo-block p:last-child { margin-bottom: 0; }
.seo-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.seo-tags a { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; transition: color 0.2s, border-color 0.2s; }
.seo-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   面包屑
   ========================================================= */
.breadcrumb { font-size: 12.5px; color: var(--muted); padding: 14px 0 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a:hover { color: var(--accent); }

/* =========================================================
   页脚
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 36px 0 28px; margin-top: 20px; }
.footer-grid { display: grid; gap: 24px; }
.footer-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a { font-size: 13.5px; color: var(--text-2); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-about { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); }
.footer-bottom p + p { margin-top: 4px; }

/* 返回顶部 */
.back-top {
  position: fixed; right: 18px; bottom: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--text-2);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, color 0.2s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { color: var(--accent); border-color: var(--accent); }

/* Toast 提示 */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  z-index: 200; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; padding: 10px 22px; border-radius: 8px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================
   响应式：平板与桌面
   ========================================================= */
@media (min-width: 768px) {
  .main-nav { display: block; }
  .header-search { display: block; }
  .nav-toggle { display: none; }

  .hero-slider { height: 500px; }
  .hero-title { font-size: 46px; }
  .hero-desc { font-size: 15px; }
  .hero-content { padding-bottom: 70px; }
  .hero-controls { right: 40px; bottom: 78px; }

  .movie-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .scroll-row .movie-card { flex-basis: 170px; }

  .genre-grid { grid-template-columns: repeat(4, 1fr); }
  .rank-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-card { height: 300px; }

  .section { padding: 56px 0; }
  .section-title { font-size: 30px; }
  .cat-strip ul { grid-template-columns: repeat(6, 1fr); }
  .news-list { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .hero-slider { height: 560px; }
  .movie-grid { grid-template-columns: repeat(3, 1fr); }
  .scroll-row .movie-card { flex-basis: 185px; }
  .genre-grid { grid-template-columns: repeat(4, 1fr); }
  .rank-list { grid-template-columns: repeat(2, 1fr); }
}

/* 动效偏好：减弱 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
