@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: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --panel: #ffffff;
  --text: #451a03;
  --muted: #92400e;
  --line: #f3d28c;
  --brand: #b45309;
  --brand-dark: #78350f;
  --brand-soft: #fef3c7;
  --accent: #dc2626;
  --shadow: 0 22px 50px rgba(120, 53, 15, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff1d6 0, var(--bg-soft) 36%, var(--bg) 100%);
  color: var(--text);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #78350f, #92400e, #78350f);
  border-bottom: 2px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 16px 34px rgba(69, 26, 3, 0.22);
}

.nav-shell {
  max-width: 1240px;
  height: 78px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(252, 211, 77, 0.35);
  color: #fde68a;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 30px;
  box-shadow: inset 0 0 24px rgba(253, 230, 138, 0.12);
}

.brand-text strong,
.footer-logo {
  display: block;
  font-family: "Ma Shan Zheng", cursive;
  letter-spacing: 0.04em;
}

.brand-text strong {
  font-size: 30px;
  line-height: 1;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  color: #fcd34d;
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #fffbeb;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fde68a;
  background: rgba(69, 26, 3, 0.36);
}

.header-search,
.mobile-search,
.search-banner form,
.search-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-banner input,
.search-panel input,
.search-panel select {
  border: 1px solid rgba(251, 191, 36, 0.46);
  background: rgba(69, 26, 3, 0.34);
  color: #fff7ed;
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.search-banner input::placeholder,
.search-panel input::placeholder {
  color: #fcd34d;
}

.header-search button,
.mobile-search button,
.search-banner button,
.search-panel button,
.primary-btn {
  border: 0;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.28);
  transition: 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-banner button:hover,
.search-panel button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: rgba(69, 26, 3, 0.36);
  color: #fff7ed;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  width: 44px;
  height: 44px;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.hero {
  background: #451a03;
}

.hero-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-copy {
  width: min(760px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1240px) / 2 + 24px));
  color: #fff7ed;
  position: relative;
  z-index: 2;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 119, 6, 0.88);
  color: #fff7ed;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 22px 0 16px;
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 78px);
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
}

.hero-desc {
  max-width: 690px;
  margin: 0 0 24px;
  color: #fde68a;
  font-size: 19px;
}

.hero-tags,
.detail-tags,
.movie-tags,
.tag-cloud,
.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags a,
.movie-tags span,
.tag-cloud a,
.genre-cloud a {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags a {
  padding: 8px 12px;
  color: #fff7ed;
  background: rgba(69, 26, 3, 0.48);
  border: 1px solid rgba(252, 211, 77, 0.3);
  backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
}

.ghost-btn {
  color: #fff7ed;
  border: 1px solid rgba(253, 230, 138, 0.44);
  border-radius: 12px;
  background: rgba(69, 26, 3, 0.28);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(253, 230, 138, 0.26);
  border-radius: 999px;
  background: rgba(69, 26, 3, 0.48);
  backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
  cursor: pointer;
  border: 0;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 247, 237, 0.14);
  color: #fff7ed;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(254, 243, 199, 0.42);
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: #f59e0b;
}

.search-banner,
.site-section,
.footer-shell,
.detail-hero-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.search-banner {
  margin-top: -58px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(254, 243, 199, 0.95));
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-banner h2,
.section-heading h2,
.panel-head h2,
.side-card h2,
.content-card h2,
.player-card h2 {
  margin: 0;
  color: var(--text);
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}

.search-banner h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.search-banner p,
.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-banner input,
.search-panel input,
.search-panel select {
  width: 100%;
  background: #fff7ed;
  color: var(--text);
  border-color: rgba(180, 83, 9, 0.25);
}

.site-section {
  padding: 62px 0 0;
}

.section-heading,
.panel-head,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2,
.panel-head h2 {
  font-size: clamp(26px, 3.5vw, 38px);
}

.section-more,
.panel-head a,
.category-overview-head a {
  color: var(--brand);
  font-weight: 800;
}

.movie-grid,
.category-grid,
.category-overview-grid,
.rank-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.09);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(120, 53, 15, 0.18);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
  background: #78350f;
}

.movie-poster img,
.rank-cover img,
.detail-cover,
.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-poster img {
  transition: transform 0.5s ease;
}

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

.movie-type {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #fff;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.movie-title {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-title a:hover {
  color: var(--brand);
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags span,
.tag-cloud a,
.genre-cloud a {
  padding: 6px 10px;
  background: var(--brand-soft);
  color: #78350f;
}

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

.category-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff7ed;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
}

.category-card span {
  font-size: 28px;
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
}

.category-card strong {
  margin-top: 10px;
  color: #fde68a;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.ranking-panel,
.side-card,
.content-card,
.player-card,
.category-overview-card,
.search-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 119, 6, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 100px;
  padding: 22px;
}

.wide-panel {
  position: static;
}

.rank-list,
.mini-list {
  display: grid;
  gap: 12px;
}

.rank-item,
.mini-card {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.mini-card {
  grid-template-columns: 78px minmax(0, 1fr);
}

.rank-item:hover,
.mini-card:hover {
  background: #fef3c7;
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d97706;
  color: #fff;
  font-weight: 900;
}

.rank-item img,
.mini-card img {
  border-radius: 12px;
  aspect-ratio: 3 / 4;
}

.rank-text strong,
.mini-card strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text em,
.mini-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero,
.detail-hero {
  color: #fff7ed;
  background: linear-gradient(135deg, #78350f, #451a03);
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  background-image: radial-gradient(circle at top right, rgba(252, 211, 77, 0.24), transparent 36%), linear-gradient(135deg, #78350f, #451a03);
}

.page-hero > div {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: #fde68a;
  font-size: 18px;
}

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

.category-overview-card {
  padding: 24px;
}

.category-overview-card p {
  color: var(--muted);
  margin: 0 0 20px;
}

.genre-cloud-section {
  padding-bottom: 62px;
}

.genre-cloud a:hover,
.tag-cloud a:hover {
  background: #d97706;
  color: #fff;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.page-link,
.page-ellipsis {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(217, 119, 6, 0.16);
  color: var(--text);
  font-weight: 800;
}

.page-link.is-active {
  background: #d97706;
  color: #fff;
}

.page-link.is-disabled {
  color: #c7a36f;
  pointer-events: none;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.1);
}

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover span {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-weight: 900;
}

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-card em {
  color: var(--brand);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.search-panel-section {
  padding-top: 36px;
}

.search-panel {
  padding: 20px;
  grid-template-columns: 1fr 220px auto;
}

.detail-hero {
  background-size: cover;
  background-position: center;
}

.detail-hero-shell {
  padding: 34px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #fde68a;
  margin-bottom: 28px;
}

.breadcrumb a:hover {
  color: #fff7ed;
}

.detail-hero-content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 3 / 4.1;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.detail-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.detail-hero p {
  max-width: 760px;
  color: #fde68a;
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.player-card,
.content-card,
.side-card {
  padding: 24px;
}

.video-shell {
  position: relative;
  margin-top: 16px;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.24);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.54));
  cursor: pointer;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.92);
  color: #fff;
  font-size: 38px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
  transition: 0.2s ease;
}

.play-layer:hover span {
  transform: scale(1.06);
}

.video-shell.is-playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.content-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  white-space: pre-line;
  text-align: justify;
}

.info-list {
  margin: 14px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(217, 119, 6, 0.12);
}

.info-list dt {
  color: var(--brand);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, #78350f, #451a03);
  color: #fffbeb;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 42px;
  padding: 52px 0 34px;
}

.footer-logo {
  color: #fde68a;
  font-size: 36px;
}

.footer-brand p {
  max-width: 520px;
  color: #fcd34d;
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #fde68a;
  font-size: 18px;
}

.footer-links a {
  color: #fffbeb;
}

.footer-links a:hover {
  color: #fde68a;
}

.footer-bottom {
  padding: 18px 24px;
  border-top: 1px solid rgba(253, 230, 138, 0.16);
  color: #fcd34d;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 860px) {
  .nav-shell {
    height: 68px;
  }

  .brand-text em,
  .main-nav {
    display: none;
  }

  .brand-text strong {
    font-size: 24px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-stage {
    min-height: 580px;
  }

  .hero-copy {
    width: min(100% - 36px, 720px);
    margin: 0 auto;
  }

  .search-banner {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-overview-grid,
  .rank-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-cover {
    width: min(260px, 72vw);
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .mobile-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 25px;
  }

  .search-banner,
  .site-section,
  .footer-shell,
  .detail-hero-shell,
  .page-hero > div {
    width: min(100% - 28px, 1240px);
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-desc,
  .page-hero p,
  .detail-hero p {
    font-size: 16px;
  }

  .movie-grid,
  .catalog-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .hero-controls {
    bottom: 16px;
  }
}
