* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #fff7ed;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  background: linear-gradient(180deg, rgba(255, 247, 237, .96), rgba(255, 247, 237, .52));
}

.site-header.scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(146, 64, 14, .12);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 78px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #92400e;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #f97316);
  box-shadow: 0 14px 28px rgba(217, 119, 6, .28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: .02em;
  background: linear-gradient(90deg, #b45309, #ea580c);
  -webkit-background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #78350f;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #fed7aa;
  color: #9a3412;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #9a3412;
  background: #ffedd5;
}

.hero-shell {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #9a3412;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 120px 24px 120px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform .9s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(0deg, #fff7ed, rgba(255, 247, 237, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  color: #fff;
}

.hero-badge,
.detail-kicker,
.page-hero span,
.section-head span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  color: #9a3412;
  background: rgba(255, 237, 213, .9);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
}

.hero-content h1 {
  max-width: 820px;
  margin: 24px 0 18px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-content h1 span {
  display: block;
  color: #fde68a;
  font-size: clamp(28px, 4.5vw, 54px);
  margin-top: 10px;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #fff7ed;
  font-size: 20px;
  line-height: 1.8;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .24);
}

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

.hero-tags span,
.tag-row span,
.filter-row a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #9a3412;
  background: #fff;
  box-shadow: 0 18px 40px rgba(120, 53, 15, .2);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .48);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 38px;
  width: min(680px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(120, 53, 15, .18);
}

.hero-search input,
.inline-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #78350f;
  background: #fff7ed;
  border-radius: 999px;
  padding: 0 18px;
  min-height: 48px;
}

.hero-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
}

.home-strip {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.home-strip a {
  display: grid;
  place-items: center;
  min-height: 76px;
  border-radius: 24px;
  color: #92400e;
  background: #fff;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(146, 64, 14, .1);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 22px;
}

.alt-section {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  background: linear-gradient(180deg, #fff, #fff7ed);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-head h2 {
  margin: 16px 0 10px;
  color: #431407;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.section-head p {
  color: #78716c;
  font-size: 17px;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(120, 53, 15, .1);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(120, 53, 15, .16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #92400e, #fdba74);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .52), rgba(0, 0, 0, 0));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(234, 88, 12, .35);
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: #a16207;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #431407;
  font-size: 19px;
  line-height: 1.35;
}

.card-body p {
  min-height: 66px;
  margin: 0 0 14px;
  color: #57534e;
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  min-height: 178px;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 45px rgba(120, 53, 15, .14);
  transition: transform .25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 8px;
  font-style: normal;
  color: #ffedd5;
  line-height: 1.5;
}

.split-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(120, 53, 15, .08);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: #f59e0b;
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 88px;
  border-radius: 16px;
}

.rank-main {
  min-width: 0;
}

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

.rank-main strong {
  color: #431407;
  font-size: 17px;
}

.rank-main em {
  margin-top: 6px;
  color: #78716c;
  font-style: normal;
  font-size: 13px;
}

.rank-arrow {
  color: #d97706;
  font-size: 30px;
}

.page-main,
.detail-main {
  padding-top: 78px;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: center;
  padding: 70px 22px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f97316);
  background-size: cover;
  background-position: center;
}

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

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 740px;
  color: #fff7ed;
  font-size: 18px;
  line-height: 1.75;
}

.inline-search {
  max-width: 520px;
  margin-top: 22px;
}

.filter-row {
  margin-top: 18px;
}

.filter-row a {
  background: rgba(255, 255, 255, .92);
}

.category-card {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(120, 53, 15, .1);
  transition: transform .25s ease;
}

.category-cover {
  min-height: 176px;
  background-size: cover;
  background-position: center;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  color: #431407;
  font-size: 24px;
}

.category-card-body p {
  margin: 0 0 14px;
  color: #57534e;
  line-height: 1.65;
}

.category-preview {
  display: grid;
  gap: 6px;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  color: #92400e;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #92400e;
  font-weight: 700;
}

.detail-hero {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 32px;
  background: linear-gradient(135deg, #92400e, #fdba74);
  box-shadow: 0 30px 70px rgba(120, 53, 15, .16);
}

.detail-info {
  min-width: 0;
}

.detail-info h1 {
  margin: 18px 0 14px;
  color: #431407;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.08;
}

.lead {
  margin: 0 0 22px;
  max-width: 820px;
  color: #57534e;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.player-section {
  max-width: 1180px;
  margin: 44px auto 0;
  padding: 0 22px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  aspect-ratio: 16 / 9;
  background: #111827;
  box-shadow: 0 32px 80px rgba(17, 24, 39, .24);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #111827;
}

.player-cta {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: 34px;
  box-shadow: 0 24px 50px rgba(234, 88, 12, .3);
  transition: transform .2s ease, opacity .2s ease;
}

.player-cta:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-wrap.is-playing .player-cta {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  max-width: 930px;
  margin: 44px auto 0;
  padding: 0 22px;
  display: grid;
  gap: 20px;
}

.detail-content article {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(120, 53, 15, .08);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: #431407;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: #57534e;
  font-size: 17px;
  line-height: 1.9;
}

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

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
  min-height: 44px;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 22px;
  color: #ffedd5;
  background: #431407;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
}

.footer-text {
  color: #fed7aa;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 60px rgba(120, 53, 15, .16);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-slide {
    padding-top: 110px;
  }

  .hero-content p {
    font-size: 17px;
  }

  .home-strip,
  .split-section,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input,
  .hero-search button {
    width: 100%;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .category-page-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 58px minmax(0, 1fr);
  }

  .rank-arrow {
    display: none;
  }

  .rank-row img {
    width: 58px;
    height: 74px;
  }

  .player-cta {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
