:root {
  --primary-50: #fef7ed;
  --primary-100: #fdecd0;
  --primary-500: #f17925;
  --primary-600: #e2591b;
  --primary-700: #bc3e18;
  --accent-500: #f04f1f;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(28, 25, 23, 0.12);
  --shadow-card: 0 16px 35px rgba(28, 25, 23, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(231, 229, 228, 0.88);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(var(--container), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  white-space: nowrap;
}

.site-logo__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 12px 24px rgba(226, 89, 27, 0.32);
}

.site-logo__text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--neutral-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary-600);
}

.header-search {
  width: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  background: var(--white);
}

.header-search input,
.mobile-search input,
.wide-search input,
.page-hero__search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--neutral-800);
  background: transparent;
}

.header-search input {
  padding: 10px 4px 10px 16px;
}

.header-search button,
.mobile-search button,
.wide-search button,
.page-hero__search button {
  border: 0;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  cursor: pointer;
}

.header-search button {
  padding: 10px 18px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--neutral-800);
}

.mobile-panel {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
}

.mobile-search input {
  padding: 12px 16px;
}

.mobile-search button {
  padding: 12px 18px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--neutral-900);
}

.hero-track,
.hero-slide {
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.94) 0%, rgba(28, 25, 23, 0.72) 42%, rgba(28, 25, 23, 0.20) 100%),
    linear-gradient(0deg, rgba(28, 25, 23, 0.82), rgba(28, 25, 23, 0.08) 45%, rgba(28, 25, 23, 0.28));
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 88px 0 98px;
  color: var(--white);
}

.hero-kicker,
.page-kicker,
.detail-kicker {
  color: var(--primary-100);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-slide h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-slide p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-chips,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-slide .chip,
.detail-chips .chip {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 14px 30px rgba(226, 89, 27, 0.32);
}

.button-soft {
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.button-block {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.44);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.70);
}

.hero-arrow--prev {
  left: 28px;
}

.hero-arrow--next {
  right: 28px;
}

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

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

.hero-dot.is-active {
  background: var(--primary-500);
}

.home-search-band {
  width: min(var(--container), calc(100% - 32px));
  margin: -48px auto 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.home-search-band h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.home-search-band p {
  margin: 0;
  color: var(--neutral-600);
}

.wide-search,
.page-hero__search {
  display: flex;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  background: var(--neutral-50);
}

.wide-search input,
.page-hero__search input {
  padding: 0 20px;
}

.wide-search button,
.page-hero__search button {
  padding: 0 28px;
}

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

.page-container--top {
  padding-top: 42px;
}

.content-section {
  margin: 56px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.section-link,
.text-link {
  color: var(--primary-600);
  font-weight: 900;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

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

.movie-grid--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(231, 229, 228, 0.84);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neutral-900), var(--primary-700));
}

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

.movie-card:hover .poster-frame img,
.category-tile:hover img,
.detail-poster:hover img {
  transform: scale(1.06);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.74), transparent);
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.poster-type {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 10px 20px rgba(226, 89, 27, 0.32);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__meta {
  color: var(--neutral-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--primary-600);
}

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

.movie-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.movie-card--wide {
  grid-row: span 2;
}

.movie-card--wide .poster-frame {
  aspect-ratio: 16 / 9;
}

.movie-card--wide h3 {
  font-size: 28px;
}

.category-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.category-tile {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--neutral-900);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  opacity: 0.76;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.92;
}

.category-tile span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

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

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

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: center;
  padding: 36px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(241, 121, 37, 0.38), transparent 36%),
    linear-gradient(135deg, var(--neutral-900), #3b2117 70%, var(--primary-700));
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero__search {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

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

.page-hero__search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 34px 0 60px;
}

.category-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(231, 229, 228, 0.84);
}

.category-card__media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 180px;
  overflow: hidden;
  background: var(--neutral-900);
}

.category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__body {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--neutral-600);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--primary-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.74)),
    rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 18px 42px rgba(226, 89, 27, 0.44);
  font-size: 30px;
}

.play-title {
  max-width: min(600px, 90%);
  font-size: clamp(18px, 3vw, 30px);
  font-weight: 900;
  text-align: center;
}

.detail-content {
  margin-top: 28px;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(231, 229, 228, 0.84);
}

.detail-content h1 {
  margin: 10px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-kicker {
  color: var(--primary-600);
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--neutral-700);
  font-size: 19px;
}

.detail-text-block {
  margin-top: 28px;
}

.detail-text-block h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-text-block p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 17px;
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--neutral-900), var(--primary-700));
  box-shadow: var(--shadow-card);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.info-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(231, 229, 228, 0.84);
}

.info-panel dl {
  margin: 0 0 20px;
}

.info-panel div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.info-panel dt {
  color: var(--neutral-500);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: var(--neutral-800);
  font-weight: 700;
}

.site-footer {
  margin-top: 70px;
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.site-footer__inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0;
}

.site-footer strong {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  margin: 8px 0 0;
  max-width: 640px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.site-footer a:hover {
  color: var(--white);
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .featured-grid,
  .detail-layout,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .site-header__inner {
    gap: 12px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-slide__shade {
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.42));
  }

  .home-search-band,
  .page-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-search-band {
    margin-top: -26px;
  }

  .wide-search,
  .page-hero__search {
    border-radius: 18px;
    flex-direction: column;
  }

  .wide-search input,
  .page-hero__search input {
    min-height: 52px;
  }

  .wide-search button,
  .page-hero__search button {
    min-height: 48px;
  }

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

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

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

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

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-logo__text {
    font-size: 18px;
  }

  .hero-slide__content {
    padding-top: 70px;
  }

  .hero-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .movie-grid,
  .movie-grid--six,
  .ranking-list,
  .ranking-list--page,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-row {
    grid-auto-columns: 78%;
  }

  .category-card__media {
    height: 150px;
  }

  .detail-content,
  .info-panel {
    padding: 20px;
  }
}
