@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;500;600;700;900&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #120705;
  --bg-soft: #1d0d08;
  --panel: rgba(43, 21, 13, 0.78);
  --panel-strong: rgba(64, 28, 17, 0.92);
  --line: rgba(255, 214, 146, 0.18);
  --text: #fff7e7;
  --muted: #d8b986;
  --gold: #f7c45d;
  --gold-strong: #ffdf8a;
  --red: #9f1d1d;
  --red-soft: #5d1511;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.22), transparent 30rem),
    radial-gradient(circle at 80% 15%, rgba(159, 29, 29, 0.24), transparent 36rem),
    linear-gradient(180deg, #1b0906 0%, #100604 48%, #070403 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 7, 5, 0.82);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #3b1708;
  background: linear-gradient(135deg, #ffe2a3, #e5a02d 55%, #a2381e);
  box-shadow: 0 10px 30px rgba(247, 196, 93, 0.28);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 28px;
}

.brand-name {
  font-size: 24px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-link,
.mobile-link {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--text);
  background: rgba(247, 196, 93, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-panel {
  display: none;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 12, 8, 0.95);
  overflow: hidden;
}

.mobile-panel.is-open {
  display: grid;
}

.mobile-link {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.mobile-link:last-child {
  border-bottom: 0;
}

.hero-slider {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  margin: 26px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 700px;
  background: #140704;
  box-shadow: var(--shadow);
}

.hero-rail {
  position: relative;
  min-height: 700px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 42px;
  padding: 82px clamp(28px, 6vw, 92px) 132px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop,
.page-hero::before,
.category-tile::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(90deg, rgba(18, 7, 5, 0.94) 0%, rgba(18, 7, 5, 0.76) 42%, rgba(18, 7, 5, 0.18) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.12);
}

.hero-backdrop::after,
.page-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 224, 145, 0.2), transparent 20rem),
    linear-gradient(180deg, transparent 42%, rgba(18, 7, 5, 0.88));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 0;
  max-width: 820px;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.hero-content h2 {
  margin: 18px 0 0;
  color: var(--gold-strong);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(26px, 3.4vw, 48px);
  font-weight: 800;
}

.hero-content p,
.page-hero p,
.section-heading span,
.movie-card-body p,
.detail-one-line,
.article-main p,
.site-footer p {
  color: var(--muted);
  line-height: 1.85;
}

.hero-content p {
  max-width: 780px;
  margin: 20px 0 0;
  font-size: 18px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  border: 1px solid rgba(247, 196, 93, 0.28);
  border-radius: 999px;
  color: #ffe6ac;
  background: rgba(247, 196, 93, 0.1);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #351407;
  background: linear-gradient(135deg, #ffe2a3, #f4b03e 60%, #d85228);
  box-shadow: 0 14px 34px rgba(244, 176, 62, 0.28);
}

.ghost-button,
.section-more {
  color: var(--gold-strong);
  border: 1px solid rgba(247, 196, 93, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  justify-self: end;
  width: min(430px, 100%);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 224, 145, 0.35);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: clamp(28px, 6vw, 92px);
  bottom: 48px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(247, 196, 93, 0.35);
  color: var(--gold-strong);
  background: rgba(0, 0, 0, 0.32);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--gold);
}

.hero-thumbs {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(420px, 42vw);
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 224, 145, 0.2);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.34);
}

.hero-thumb img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
}

.hero-thumb span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

main {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  margin: 58px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.article-main h2,
.rank-sidebar h2 {
  margin: 8px 0 0;
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 44px);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-tile::before {
  background-image:
    linear-gradient(180deg, rgba(18, 7, 5, 0.22), rgba(18, 7, 5, 0.94)),
    var(--tile-image);
  transition: transform 0.35s ease;
}

.category-tile:hover::before {
  transform: scale(1.06);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: var(--gold-strong);
  font-family: "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-grid,
.rank-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.compact-grid,
.rank-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(54, 24, 15, 0.84), rgba(24, 10, 6, 0.94));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(247, 196, 93, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.poster-link img {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #351407;
  background: var(--gold);
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 9px 0 8px;
  color: var(--text);
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 72px;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 14px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  border: 1px solid rgba(247, 196, 93, 0.22);
  border-radius: 16px;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  padding: 0 15px;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 22px;
}

.empty-state.is-visible {
  display: block;
}

.page-hero,
.detail-hero {
  position: relative;
  margin: 30px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.page-hero {
  min-height: 420px;
  display: grid;
  align-items: end;
  padding: clamp(32px, 6vw, 72px);
}

.page-hero::before {
  background-image:
    linear-gradient(90deg, rgba(18, 7, 5, 0.94), rgba(18, 7, 5, 0.45)),
    var(--page-image);
}

.slim-hero::before {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(247, 196, 93, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(96, 29, 16, 0.96), rgba(18, 7, 5, 0.96));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 66px);
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: 18px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.rank-sidebar,
.detail-aside {
  position: sticky;
  top: 100px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.05);
  padding: 22px;
}

.rank-sidebar h2,
.detail-aside h2 {
  margin-top: 0;
  font-size: 24px;
}

.rank-line,
.aside-card {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rank-line:last-child,
.aside-card:last-child {
  border-bottom: 0;
}

.rank-line span {
  color: var(--gold);
  font-weight: 900;
}

.rank-line strong {
  color: var(--text);
}

.rank-line em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--gold-strong);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(22px, 5vw, 60px);
  padding: clamp(22px, 5vw, 54px);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(247, 196, 93, 0.3);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.detail-one-line {
  max-width: 900px;
  margin: 18px 0 0;
  font-size: 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-meta strong {
  color: var(--text);
  font-size: 15px;
}

.large-tags span {
  font-size: 14px;
}

.player-shell {
  position: relative;
  border: 1px solid rgba(247, 196, 93, 0.28);
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--text);
  border: 0;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.74)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.84));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 226, 163, 0.55);
  border-radius: 50%;
  background: rgba(247, 196, 93, 0.16);
  box-shadow: 0 0 0 18px rgba(247, 196, 93, 0.08);
}

.play-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #351407;
  background: var(--gold);
  padding-left: 4px;
  font-size: 24px;
}

.play-cover strong {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(24px, 4vw, 42px);
}

.article-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.article-main {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.045);
  padding: clamp(22px, 4vw, 42px);
}

.article-main h2 {
  margin-top: 0;
  font-size: 30px;
}

.article-main h2:not(:first-child) {
  margin-top: 34px;
}

.article-main p {
  font-size: 17px;
}

.aside-card {
  color: var(--gold-strong);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.footer-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  color: var(--gold-strong);
  font-size: 24px;
}

.footer-shell p {
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.footer-links a {
  padding: 9px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.movie-card.is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .movie-grid,
  .rank-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .hero-thumbs {
    display: none;
  }

  .ranking-layout,
  .article-section {
    grid-template-columns: 1fr;
  }

  .rank-sidebar,
  .detail-aside {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: grid;
    place-items: center;
  }

  .hero-slider,
  .hero-rail {
    min-height: 640px;
  }

  .hero-slide {
    padding: 52px 22px 112px;
  }

  .hero-controls {
    left: 22px;
    bottom: 32px;
  }

  .movie-grid,
  .rank-grid,
  .compact-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-panel {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-shell {
    display: grid;
  }

  .footer-links {
    justify-content: start;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }

  .detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .header-shell,
  main,
  .hero-slider,
  .footer-shell,
  .mobile-panel {
    width: min(100% - 20px, 1440px);
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .movie-grid,
  .rank-grid,
  .compact-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider,
  .hero-rail {
    min-height: 690px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .page-hero {
    min-height: 360px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}
