:root {
  --primary-50: #fef6ee;
  --primary-100: #fdecd8;
  --primary-600: #e0561b;
  --primary-700: #ba4118;
  --accent-50: #f0fdf4;
  --accent-600: #16a34a;
  --secondary-50: #f7f7f5;
  --secondary-100: #e8e6df;
  --secondary-200: #d1cec0;
  --secondary-300: #b4af9b;
  --secondary-600: #6f6753;
  --secondary-800: #4c463c;
  --secondary-900: #413d35;
  --shadow-soft: 0 12px 35px rgba(65, 61, 53, 0.12);
  --shadow-card: 0 20px 40px rgba(65, 61, 53, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--secondary-50);
  color: var(--secondary-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 18px rgba(65, 61, 53, 0.08);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary-900);
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 10px 20px rgba(224, 86, 27, 0.24);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-600);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-600);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--secondary-900);
  background: var(--secondary-100);
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #111;
}

.hero-track {
  position: relative;
  min-height: 650px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(22, 163, 74, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(18, 17, 14, 0.92), rgba(18, 17, 14, 0.72) 42%, rgba(18, 17, 14, 0.24)),
    linear-gradient(0deg, rgba(18, 17, 14, 0.95), rgba(18, 17, 14, 0.08) 45%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 650px;
  margin: 0 auto;
  padding: 78px 22px 82px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 52px;
  color: #fff;
}

.eyebrow,
.section-heading p,
.page-hero p {
  margin: 0 0 12px;
  color: var(--primary-100);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-movie-title {
  display: block;
  margin-top: 16px;
  color: var(--primary-100);
  font-size: clamp(24px, 3vw, 42px);
}

.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 16px 30px rgba(224, 86, 27, 0.32);
}

.btn-light {
  color: var(--secondary-900);
  background: rgba(255, 255, 255, 0.92);
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: inherit;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 28px;
  background: var(--primary-600);
}

.search-band,
.filter-panel,
.section-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
}

.search-band {
  margin-top: -46px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

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

.search-band h2 {
  font-size: 26px;
  line-height: 1.2;
}

.search-band p {
  margin-top: 6px;
  color: var(--secondary-600);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--secondary-200);
  border-radius: 18px;
  background: #fff;
}

.search-box.wide {
  width: 100%;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--secondary-900);
  background: transparent;
}

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

.section-heading p {
  color: var(--primary-600);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--secondary-100);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(65, 61, 53, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(224, 86, 27, 0.45);
  box-shadow: var(--shadow-card);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--secondary-100);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 56%);
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(224, 86, 27, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--secondary-600);
  font-size: 12px;
}

.card-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--secondary-50);
}

.card-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.card-body p {
  min-height: 48px;
  margin: 10px 0 12px;
  color: var(--secondary-600);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

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

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 20px;
}

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

.category-tile em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--secondary-100);
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.rank-text em {
  color: var(--secondary-600);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(22, 163, 74, 0.42), transparent 32%),
    linear-gradient(135deg, var(--primary-600), var(--primary-700) 55%, var(--secondary-900));
}

.small-hero {
  padding: 72px 22px;
}

.page-hero > div {
  max-width: 1240px;
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.category-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-stack img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 18px;
}

.category-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-panel p {
  margin: 0 0 18px;
  color: var(--secondary-600);
}

.filter-panel {
  padding-bottom: 12px;
}

.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip-nav a,
.filter-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  color: var(--secondary-600);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.chip-nav a.active,
.filter-chip.active,
.chip-nav a:hover,
.filter-chip:hover {
  color: #fff;
  border-color: var(--primary-600);
  background: var(--primary-600);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--secondary-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.36;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.12);
  transform: scale(1.05);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(224, 86, 27, 0.42), transparent 34%),
    linear-gradient(90deg, rgba(18, 17, 14, 0.96), rgba(18, 17, 14, 0.62));
}

.detail-layout {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 22px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--primary-100);
  font-weight: 800;
}

.detail-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 860px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin-top: 18px;
  margin-bottom: 28px;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px 8px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-card);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(224, 86, 27, 0.24), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 18px 48px rgba(224, 86, 27, 0.34);
  font-size: 28px;
}

.play-layer strong {
  font-size: 20px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-card {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--secondary-600);
}

.detail-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-switch a {
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 18px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  margin-top: 44px;
  color: var(--secondary-100);
  background: var(--secondary-900);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px 30px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: var(--secondary-300);
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: var(--secondary-300);
}

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

.copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px;
  border-top: 1px solid var(--secondary-800);
  text-align: center;
  font-size: 13px;
}

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

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

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-shell {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--primary-50);
  }

  .hero-inner,
  .detail-layout,
  .search-band,
  .detail-content,
  .detail-switch,
  .footer-grid,
  .category-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

  .search-band {
    margin-top: 0;
    border-radius: 0;
  }

  .detail-layout {
    padding-top: 46px;
  }

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

@media (max-width: 640px) {
  .brand {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-track,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    padding-top: 58px;
    gap: 28px;
  }

  .hero-control {
    display: none;
  }

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

  .category-stack img {
    height: 140px;
  }

  .rank-item {
    grid-template-columns: 38px 68px minmax(0, 1fr);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
