:root {
  --primary-50: #fef7ee;
  --primary-100: #fdecd3;
  --primary-400: #f38d33;
  --primary-500: #f07315;
  --primary-600: #e1590b;
  --primary-700: #bb420b;
  --accent-500: #d9804f;
  --secondary-500: #0fcaaa;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 24px 60px rgba(28, 25, 23, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--neutral-50);
  color: var(--neutral-800);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(231, 229, 228, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, var(--container));
  height: 68px;
  margin: 0 auto;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: var(--white);
  box-shadow: 0 10px 28px rgba(240, 115, 21, 0.3);
}

.brand-text {
  color: var(--neutral-800);
  font-size: 22px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: var(--neutral-600);
  font-size: 15px;
  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 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--neutral-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button {
  border: 0;
  border-radius: 12px;
  background: var(--primary-600);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
}

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

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(240, 115, 21, 0.14);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--neutral-700);
  border-radius: 3px;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--neutral-200);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.mobile-search input,
.mobile-search button {
  padding: 11px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
  color: var(--white);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-track {
  position: relative;
  width: min(100% - 32px, var(--container));
  min-height: 560px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  filter: blur(22px);
  transform: scale(1.08);
}

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

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 56px;
  z-index: 2;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 12px 0 10px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: var(--primary-100);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-100);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
  color: var(--white);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 13px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  background: var(--white);
  color: var(--primary-600);
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.btn-plain {
  color: var(--white);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.14);
}

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

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

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

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(220px, 520px) auto;
  width: min(100% - 32px, 680px);
  gap: 10px;
  transform: translateX(-50%);
}

.hero-search input,
.hero-search button {
  min-height: 52px;
  padding: 0 18px;
}

.hero-categories {
  position: absolute;
  right: max(16px, calc((100% - var(--container)) / 2));
  bottom: 48px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 360px;
  gap: 8px;
}

.hero-categories a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.content-section {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 72px 0;
}

.section-white {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - var(--container)) / 2));
  padding-left: max(16px, calc((100% - var(--container)) / 2));
  background: var(--white);
}

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

.section-heading h2,
.ranking-head h2,
.site-footer h2,
.detail-text h2 {
  margin: 0;
  color: var(--neutral-800);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.18;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--neutral-500);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.92);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-50), var(--neutral-100));
}

.movie-card-large .movie-cover {
  aspect-ratio: 21 / 9;
}

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

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

.movie-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 56%);
  opacity: 0;
  content: "";
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 28px;
}

.play-hover {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(240, 115, 21, 0.9);
  color: var(--white);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 18px;
}

.movie-info h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h2 a:hover {
  color: var(--primary-600);
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--neutral-500);
  font-size: 12px;
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  background: var(--primary-50);
  padding: 5px 9px;
  color: var(--primary-700);
}

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

.category-card,
.category-overview-card {
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--neutral-800);
  font-size: 22px;
}

.category-card span,
.category-overview-card p {
  color: var(--neutral-500);
  font-size: 14px;
}

.category-sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-sample-links a {
  border-radius: 999px;
  background: var(--neutral-100);
  padding: 6px 10px;
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  border: 1px solid rgba(231, 229, 228, 0.92);
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 36px 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: var(--primary-50);
}

.ranking-number {
  display: grid;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 900;
}

.ranking-item img {
  width: 76px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-text {
  min-width: 0;
}

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

.ranking-text strong {
  color: var(--neutral-800);
  font-size: 15px;
}

.ranking-text em {
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
  color: var(--white);
}

.small-hero {
  padding: 74px max(16px, calc((100% - var(--container)) / 2));
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select {
  min-height: 50px;
  padding: 0 16px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--neutral-900);
  color: var(--white);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(22px);
  transform: scale(1.08);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.72));
  content: "";
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 800;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
}

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

.detail-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.12);
  padding: 7px 12px;
  color: var(--white);
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--primary-100);
}

.detail-copy .btn-primary {
  margin-top: 26px;
}

.player-section {
  padding-top: 52px;
  padding-bottom: 48px;
}

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

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  color: var(--white);
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-600);
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(225, 89, 11, 0.36);
}

.player-start strong {
  margin-top: 16px;
  font-size: 18px;
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-text {
  padding-top: 24px;
}

.detail-text p {
  margin: 14px 0 28px;
  color: var(--neutral-600);
  font-size: 17px;
}

.site-footer {
  background: var(--neutral-800);
  color: var(--neutral-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  gap: 42px;
  padding: 52px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--neutral-400);
  font-size: 14px;
}

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  color: var(--neutral-400);
  font-size: 14px;
}

.movie-item.is-hidden {
  display: none;
}

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

  .featured-grid,
  .compact-grid,
  .ranking-page .ranking-list-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .hero-categories {
    display: none;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-track {
    min-height: 610px;
  }

  .hero-content {
    gap: 24px;
  }

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

  .hero-control {
    bottom: 150px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-page .ranking-list-full,
  .footer-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    gap: 28px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .content-section,
  .detail-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, var(--container));
  }

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

  .hero-carousel {
    min-height: 760px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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