@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 {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --amber-950: #451a03;
  --text-main: #3b2209;
  --text-soft: #8a5a20;
  --white: #ffffff;
  --shadow-soft: 0 14px 35px rgba(120, 53, 15, 0.12);
  --shadow-strong: 0 20px 60px rgba(69, 26, 3, 0.3);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--amber-50) 0%, #fff8e6 45%, #ffffff 100%);
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-950), var(--amber-800), var(--amber-950));
  border-bottom: 2px solid var(--amber-600);
  box-shadow: 0 12px 30px rgba(69, 26, 3, 0.35);
}

.header-inner {
  max-width: 1280px;
  height: 78px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-950);
  background: radial-gradient(circle at 30% 20%, var(--amber-100), var(--amber-400));
  font-family: "Ma Shan Zheng", cursive;
  font-size: 25px;
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.45), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.brand-text {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 25px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.desktop-nav a,
.mobile-panel a {
  color: var(--amber-100);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.header-search {
  width: 300px;
  display: flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.header-search input,
.mobile-panel input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--amber-950);
  background: var(--white);
  border-radius: 999px;
  padding: 10px 14px;
}

.header-search button,
.mobile-panel button,
.search-panel button {
  border: 0;
  color: var(--white);
  background: var(--amber-600);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-panel button:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--white);
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 20px;
  flex-direction: column;
  gap: 8px;
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--amber-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: brightness(0.42);
  transform: scale(1.04);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--amber-950) 0%, rgba(69, 26, 3, 0.78) 28%, rgba(69, 26, 3, 0.24) 70%, rgba(69, 26, 3, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  padding: 84px 24px 120px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
  color: var(--white);
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--white);
  background: rgba(217, 119, 6, 0.92);
  border: 1px solid rgba(253, 230, 138, 0.36);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 24px;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--amber-100);
  font-size: clamp(17px, 2vw, 23px);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  color: var(--amber-100);
  background: rgba(120, 53, 15, 0.78);
  border: 1px solid rgba(253, 230, 138, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.section-more,
.category-link,
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.section-more,
.pagination-link {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 26px rgba(180, 83, 9, 0.28);
}

.btn-primary:hover,
.section-more:hover,
.pagination-link:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(180, 83, 9, 0.35);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--amber-400);
}

main {
  min-height: 60vh;
}

.container,
.content-section,
.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.content-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-dark {
  max-width: none;
  color: var(--white);
  background: var(--amber-900);
}

.section-dark .section-head,
.section-dark .movie-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2,
.page-title,
.detail-title {
  margin: 0 0 8px;
  color: var(--amber-900);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.section-dark .section-head h2,
.section-dark .section-head p {
  color: var(--white);
}

.section-head p,
.page-subtitle,
.movie-desc {
  margin: 0;
  color: var(--text-soft);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(120, 53, 15, 0.22);
}

.poster {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-200), var(--amber-800));
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster img,
.category-card:hover img,
.ranking-item:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 44px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.68) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  color: var(--white);
  background: var(--amber-600);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(69, 26, 3, 0.86);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--amber-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-content h3 a:hover,
.related-info h3 a:hover {
  color: var(--amber-700);
}

.movie-meta {
  margin: 0 0 10px;
  color: var(--amber-600);
  font-size: 13px;
  font-weight: 700;
}

.movie-desc {
  display: -webkit-box;
  min-height: 46px;
  margin-bottom: 14px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 18% 15%, rgba(251, 191, 36, 0.35), transparent 28%), linear-gradient(135deg, var(--amber-950), var(--amber-800));
}

.page-hero-inner {
  padding-top: 70px;
  padding-bottom: 70px;
}

.page-title {
  color: var(--white);
}

.page-subtitle {
  max-width: 820px;
  color: var(--amber-100);
  font-size: 18px;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: var(--amber-900);
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(69, 26, 3, 0.92), rgba(69, 26, 3, 0.2));
}

.category-card-body {
  position: absolute;
  inset: auto 20px 22px 20px;
  z-index: 2;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--amber-100);
}

.category-link {
  min-height: 38px;
  color: var(--amber-950);
  background: var(--amber-200);
  padding: 8px 14px;
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-count {
  color: var(--amber-700);
  font-weight: 800;
  white-space: nowrap;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 68px 156px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.18);
}

.ranking-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
}

.ranking-cover {
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--amber-100);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ranking-content h3 {
  margin: 0 0 6px;
  color: var(--amber-900);
  font-size: 21px;
}

.ranking-content p {
  margin: 0 0 10px;
  color: var(--text-soft);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 32px;
  align-items: start;
}

.back-link,
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--amber-700);
  font-weight: 800;
}

.breadcrumb {
  flex-wrap: wrap;
  font-size: 14px;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-shell {
  position: relative;
  background: #000000;
}

.movie-player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.16));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--amber-950);
  background: var(--amber-300);
  font-size: 34px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

.play-layer strong {
  font-size: 22px;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.detail-card,
.side-card {
  padding: 26px;
  margin-top: 24px;
}

.detail-title {
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.info-cell {
  padding: 14px;
  border-radius: 14px;
  background: var(--amber-50);
}

.info-cell span {
  display: block;
  color: var(--amber-600);
  font-size: 12px;
  font-weight: 800;
}

.info-cell strong {
  color: var(--amber-950);
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin: 0 0 14px;
  color: var(--amber-900);
  font-family: "Noto Serif SC", serif;
  font-size: 25px;
}

.article-block p {
  margin: 0;
  color: #5c3a13;
  text-align: justify;
  white-space: pre-line;
}

.side-card {
  position: sticky;
  top: 102px;
}

.side-card h2 {
  margin: 0 0 18px;
  color: var(--amber-900);
  font-size: 22px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.related-card:hover {
  background: var(--amber-50);
}

.related-thumb {
  height: 74px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--amber-100);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-info h3 {
  margin: 0 0 6px;
  color: var(--amber-900);
  font-size: 15px;
  line-height: 1.35;
}

.related-info p {
  margin: 0;
  color: var(--amber-600);
  font-size: 12px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.empty-results {
  padding: 36px;
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.site-footer {
  color: var(--amber-100);
  background: linear-gradient(90deg, var(--amber-950), var(--amber-900));
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 28px;
}

.footer-inner p {
  margin: 0;
  color: var(--amber-200);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  color: var(--amber-200);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 30px;
  color: var(--amber-300);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

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

  .brand-text {
    font-size: 21px;
  }

  .mobile-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 56px 18px 96px;
  }

  .content-section,
  .container,
  .page-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .movie-grid,
  .search-results,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .poster {
    height: 220px;
  }

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

  .ranking-item {
    grid-template-columns: 46px 104px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .ranking-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .ranking-cover {
    height: 82px;
  }

  .ranking-content p:not(.movie-meta),
  .ranking-content .tag-row {
    display: none;
  }

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

  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .search-results,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster {
    height: 280px;
  }

  .hero-actions {
    display: grid;
  }

  .related-card {
    grid-template-columns: 96px 1fr;
  }
}
