:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --shadow-md: 0 12px 30px rgba(28, 25, 23, 0.12);
  --shadow-lg: 0 22px 60px rgba(28, 25, 23, 0.22);
}

* {
  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: var(--stone-900);
  background: var(--stone-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: rgba(28, 25, 23, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.38);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--stone-300);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700) 48%, #78350f);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.06);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.68) 46%, rgba(28, 25, 23, 0.28)), linear-gradient(0deg, rgba(28, 25, 23, 0.84), rgba(28, 25, 23, 0.05) 52%, rgba(28, 25, 23, 0.62));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 76px 0;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  color: var(--amber-400);
  background: rgba(146, 64, 14, 0.28);
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero p {
  width: min(650px, 100%);
  margin: 22px 0 0;
  color: var(--stone-200);
  font-size: clamp(18px, 2.5vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--amber-600);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--amber-700);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.42);
}

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-pills a,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--amber-700);
  background: #fffbeb;
}

.hero-pills a {
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  left: max(16px, calc((100% - 1280px) / 2));
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

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

.section {
  padding: 64px 0;
}

.section.alt {
  background: var(--stone-100);
}

.section.dark {
  color: #fff;
  background: var(--stone-900);
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--stone-600);
}

.dark .section-head p {
  color: var(--stone-400);
}

.more-link {
  color: var(--amber-700);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.4), transparent 34%), linear-gradient(135deg, var(--stone-700), var(--stone-900));
}

.movie-cover img,
.list-card-cover img,
.detail-poster img,
.classic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease;
}

img.is-missing {
  opacity: 0;
}

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

.movie-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.76));
}

.movie-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-meta,
.list-card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-card h3 {
  min-height: 54px;
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.list-card h3 a:hover {
  color: var(--amber-700);
}

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

.movie-card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.list-stack {
  display: grid;
  gap: 16px;
}

.list-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.list-card-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--stone-700), var(--stone-900));
}

.list-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-card h3 {
  margin: 0;
  font-size: 20px;
}

.rank-num,
.rank-dot {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  background: var(--amber-600);
}

.rank-num {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.rank-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.list-card p {
  margin: 8px 0 12px;
  color: var(--stone-600);
}

.search-panel {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px;
  gap: 12px;
}

.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--stone-900);
  background: var(--stone-50);
  outline: none;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.page-hero {
  color: #fff;
  padding: 72px 0;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700), #78350f);
}

.page-title h1 {
  color: inherit;
}

.page-title p {
  color: var(--stone-200);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--stone-200);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-400);
}

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

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

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  z-index: 2;
}

.play-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: rgba(217, 119, 6, 0.96);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.detail-card,
.content-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.detail-card {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--stone-700), var(--stone-900));
}

.detail-card-body,
.content-card {
  padding: 22px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.24;
}

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

.content-card p {
  color: var(--stone-700);
}

.content-flow {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

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

.classic-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-800);
}

.classic-card img {
  position: absolute;
  inset: 0;
}

.classic-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
}

.classic-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
}

.classic-card h3 {
  margin: 8px 0;
  font-size: 26px;
}

.classic-card p {
  display: -webkit-box;
  color: var(--stone-300);
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-900);
  padding: 42px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-grid p {
  max-width: 760px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--stone-300);
}

.footer-links a:hover {
  color: var(--amber-400);
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  border-radius: 20px;
  color: var(--stone-600);
  background: #fff;
  box-shadow: var(--shadow-md);
}

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

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

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

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

  .nav-toggle {
    display: flex;
  }

  .hero,
  .hero-inner {
    min-height: 560px;
  }

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

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

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

  .detail-card {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

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

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

  .section {
    padding: 44px 0;
  }

  .section-head {
    display: block;
  }

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

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

  .list-card {
    grid-template-columns: 120px 1fr;
  }

  .list-card-cover {
    aspect-ratio: 2 / 3;
  }

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

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 18px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .btn {
    width: 100%;
  }
}
