* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #292524;
  background: linear-gradient(135deg, #f5f5f4 0%, #fffbeb 52%, #e7e5e4 100%);
}

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

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

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: #292524;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.nav-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #292524;
  background: #f59e0b;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, .34);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 600;
}

.nav-link {
  color: #fafaf9;
  transition: color .25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  background: #1c1917;
  border-top: 1px solid #44403c;
  padding: 10px 16px 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #f5f5f4;
  font-weight: 600;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0c0a09;
}

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

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

.hero-slide > img,
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .96), rgba(0, 0, 0, .62), rgba(0, 0, 0, .34));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.hero-kicker,
.card-meta,
.breadcrumb,
.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.hero-tags span,
.tag-list span,
.card-meta span {
  border-radius: 999px;
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: .98;
  letter-spacing: -1.8px;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e7e5e4;
  font-size: 19px;
  line-height: 1.75;
}

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

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: #d97706;
  box-shadow: 0 10px 22px rgba(217, 119, 6, .34);
}

.btn.primary:hover {
  background: #b45309;
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
}

.btn.clear {
  color: #fbbf24;
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  transition: background .25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, .72);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
}

.hero-dot.active {
  width: 30px;
  background: #f59e0b;
}

.search-band {
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
}

.search-wrap {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-wrap h2,
.search-wrap p {
  margin: 0;
}

.search-wrap h2 {
  font-size: 30px;
}

.search-wrap p {
  color: #78716c;
  margin-top: 8px;
}

.search-box {
  min-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d6d3d1;
  border-radius: 14px;
  background: #fafaf9;
  padding: 12px 14px;
}

.search-box span {
  color: #d97706;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #292524;
  font-size: 15px;
}

.section-block {
  padding: 48px 0;
}

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

.section-head h2 {
  margin: 0;
  color: #292524;
  font-size: clamp(28px, 4vw, 42px);
}

.section-head a {
  color: #b45309;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(41, 37, 36, .1);
  transition: transform .28s ease, box-shadow .28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 35px rgba(41, 37, 36, .16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1c1917;
}

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

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

.poster-mask {
  position: absolute;
  inset: auto 12px 12px 12px;
  border-radius: 999px;
  padding: 10px 12px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, .68);
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d97706;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 6px;
  margin-bottom: 9px;
}

.card-meta span {
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  padding: 4px 8px;
}

.movie-card h2 {
  margin: 0 0 8px;
  color: #292524;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #57534e;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list span {
  color: #57534e;
  background: #f5f5f4;
  font-size: 12px;
}

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

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

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #44403c, #78350f 52%, #d97706);
  padding: 22px;
  box-shadow: 0 18px 28px rgba(41, 37, 36, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 34px rgba(41, 37, 36, .2);
}

.category-tile strong {
  font-size: 24px;
}

.category-tile span {
  color: #fef3c7;
  line-height: 1.7;
}

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

.mini-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 16px;
  background: #1c1917;
  box-shadow: 0 14px 26px rgba(0, 0, 0, .18);
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: .78;
  transition: transform .3s ease;
}

.mini-card:hover img {
  transform: scale(1.05);
}

.mini-card span {
  position: absolute;
  inset: auto 12px 12px 12px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .85);
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 36px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #292524, #78350f 60%, #d97706);
  padding: 50px;
  box-shadow: 0 18px 36px rgba(41, 37, 36, .18);
}

.page-hero.small {
  margin-bottom: 10px;
}

.page-hero p,
.page-hero h1,
.page-hero span {
  margin: 0;
}

.page-hero p {
  color: #fbbf24;
  font-weight: 900;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  margin-bottom: 18px;
}

.page-hero > span {
  display: block;
  max-width: 760px;
  color: #f5f5f4;
  line-height: 1.8;
  font-size: 18px;
}

.page-search {
  max-width: 520px;
  margin-top: 28px;
  background: #fff;
}

.detail-main {
  background: linear-gradient(135deg, #f5f5f4, #fffbeb, #e7e5e4);
}

.detail-hero {
  position: relative;
  height: 440px;
  overflow: hidden;
  background: #0c0a09;
}

.detail-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding-bottom: 54px;
  color: #fff;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #d6d3d1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-copy h1 {
  max-width: 900px;
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.detail-copy p {
  max-width: 880px;
  margin: 0 0 18px;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.75;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 36px;
}

.player-shell,
.story-card,
.info-panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(41, 37, 36, .1);
}

.player-shell {
  overflow: hidden;
  padding: 12px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #000;
}

.movie-player,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-player {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  object-fit: cover;
  opacity: .72;
}

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #fff;
  background: #d97706;
  font-size: 32px;
  box-shadow: 0 14px 32px rgba(217, 119, 6, .42);
}

.story-card,
.info-panel {
  margin-top: 22px;
  padding: 26px;
}

.story-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  color: #292524;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #57534e;
  line-height: 1.9;
  font-size: 16px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.info-panel dt {
  color: #a8a29e;
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: #44403c;
}

.info-panel a {
  color: #b45309;
  font-weight: 800;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  border-radius: 12px;
  color: #78350f;
  background: #fef3c7;
  padding: 12px 14px;
}

.related-block {
  padding-top: 34px;
}

.site-footer {
  margin-top: 56px;
  color: #d6d3d1;
  background: #1c1917;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 420px;
  color: #a8a29e;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

.footer-bottom {
  border-top: 1px solid #44403c;
  padding: 18px 16px;
  text-align: center;
  color: #a8a29e;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-control {
    display: none;
  }

  .search-wrap,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
    min-width: 0;
  }

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

  .page-hero {
    padding: 34px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 540px;
  }

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

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

  .detail-hero {
    height: 520px;
  }

  .play-ring {
    width: 72px;
    height: 72px;
  }
}
