:root {
  --bg: #12100D;
  --surface: #1C1915;
  --primary: #C9A227;
  --accent: #E4572E;
  --text: #F2EDE3;
  --muted: #8A8378;
  --radius: 4px;
  --font-heading: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --line: rgba(201, 162, 39, 0.18);
  --line-strong: rgba(201, 162, 39, 0.38);
  --glow: 0 0 0 1px rgba(201, 162, 39, 0.55), 0 0 18px rgba(201, 162, 39, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--primary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--primary);
  color: #12100D;
}

/* ---------- 容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 头部 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 16, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.7);
  flex: none;
}

.logo:hover {
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  transition: color 0.25s ease, background 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.search-box input {
  width: 180px;
  padding: 9px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  padding: 9px 16px;
  border: 0;
  background: var(--primary);
  color: #12100D;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s ease;
}

.search-box button:hover {
  background: var(--accent);
  color: var(--text);
}

/* ---------- 轮播 Hero ---------- */
.hero {
  position: relative;
  margin: 36px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: block;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 16, 13, 0.96) 0%, rgba(18, 16, 13, 0.72) 42%, rgba(18, 16, 13, 0.15) 100%);
  z-index: 1;
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-info h2 {
  font-size: 44px;
  letter-spacing: -0.02em;
}

.hero-info p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 460px;
}

.hero-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  padding: 12px 30px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #12100D;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn.ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- 区块 ---------- */
.sec {
  margin: 72px 0;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: var(--primary);
}

.sec-title {
  font-size: 30px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.sec-title small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec-more {
  flex: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.sec-more:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- 影片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0c0b09;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.card:hover .card-cover img {
  transform: scale(1.06);
  opacity: 0.88;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: rgba(18, 16, 13, 0.82);
  border: 1px solid var(--line-strong);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 14px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  transition: color 0.25s ease;
}

.card:hover .card-title {
  color: var(--primary);
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 分类列表 ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

.cat-count {
  flex: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- 排行榜 ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
  box-shadow: var(--glow);
}

.rank-num {
  flex: none;
  width: 34px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  color: var(--primary);
  text-align: center;
  letter-spacing: -0.02em;
}

.rank-item:nth-child(-n+3) .rank-num {
  color: var(--accent);
}

.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-item:hover .rank-title {
  color: var(--primary);
}

.rank-score {
  flex: none;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

/* ---------- 详情页 ---------- */
.detail {
  margin: 40px 0 72px;
}

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c0b09;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.detail-meta h1 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

.detail-meta .sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.detail-meta dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  margin: 0;
  font-size: 14px;
}

.detail-meta dl div {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.detail-meta dt {
  flex: none;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.detail-meta dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.detail-score small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-body {
  margin-top: 40px;
  max-width: 900px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(242, 237, 227, 0.86);
}

.detail-body p {
  margin: 0 0 18px;
}

.detail-body h2,
.detail-body h3 {
  margin: 36px 0 14px;
  font-size: 22px;
  color: var(--text);
}

/* ---------- 标签 ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tag:hover {
  color: #12100D;
  background: var(--primary);
  border-color: var(--primary);
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 56px 0 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #12100D;
  cursor: default;
}

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* ---------- 友情链接 ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  padding: 22px 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--primary);
}

.crumbs span {
  margin: 0 8px;
  color: rgba(138, 131, 120, 0.5);
}

/* ---------- 搜索高亮 ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(201, 162, 39, 0.12);
  border-radius: 2px;
  padding: 0 2px;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 88px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--primary);
}

.footer .copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.04em;
}

/* ---------- 胶片齿孔分隔（装饰） ---------- */
.sec + .sec::before {
  content: "";
  display: block;
  height: 1px;
  margin: -36px 0 36px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.5;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-info {
    padding: 56px 40px;
  }

  .hero-info h2 {
    font-size: 36px;
  }

  .detail-head {
    grid-template-columns: 200px 1fr;
    gap: 28px;
  }

  .detail-meta h1 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .nav a {
    padding: 8px 12px;
  }

  .search-box {
    margin-left: auto;
  }

  .search-box input {
    width: 120px;
  }

  .hero {
    margin-top: 20px;
  }

  .hero-slide {
    min-height: 320px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(18, 16, 13, 0.35) 0%, rgba(18, 16, 13, 0.92) 78%);
  }

  .hero-info {
    padding: 140px 22px 28px;
    gap: 12px;
  }

  .hero-info h2 {
    font-size: 26px;
  }

  .hero-info p {
    font-size: 13px;
  }

  .btn {
    padding: 10px 22px;
    font-size: 13px;
  }

  .sec {
    margin: 48px 0;
  }

  .sec-head {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }

  .sec-title {
    font-size: 22px;
  }

  .sec-title small {
    font-size: 10px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .card-info {
    padding: 10px;
  }

  .cat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cat-item {
    padding: 14px 14px;
    font-size: 14px;
  }

  .rank-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rank-item {
    padding: 12px 12px;
    gap: 12px;
  }

  .rank-num {
    width: 28px;
    font-size: 17px;
  }

  .detail {
    margin: 24px 0 48px;
  }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 28px;
  }

  .detail-cover {
    max-width: 200px;
  }

  .detail-meta h1 {
    font-size: 26px;
  }

  .detail-meta dl {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .detail-score {
    font-size: 28px;
  }

  .detail-body {
    margin-top: 28px;
    font-size: 14px;
  }

  .pager {
    margin-top: 36px;
    gap: 6px;
  }

  .pg {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .footer {
    margin-top: 56px;
    padding: 32px 0 28px;
  }

  .footer .copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .cat-list {
    grid-template-columns: 1fr;
  }

  .hero-info h2 {
    font-size: 22px;
  }
}