:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --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;
  --white: #ffffff;
  --black: #000000;
  --shadow-lg: 0 20px 45px rgba(28, 25, 23, 0.14);
  --shadow-md: 0 12px 30px rgba(28, 25, 23, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(135deg, var(--stone-100) 0%, var(--amber-50) 48%, var(--stone-200) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(41, 37, 36, 0.96);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.nav-bar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--amber-600);
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.42);
}

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

.nav-link,
.dropdown-trigger {
  border: 0;
  background: transparent;
  color: var(--stone-200);
  font-weight: 650;
  padding: 10px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-trigger:hover {
  color: var(--amber-400);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(28, 25, 23, 0.98);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s ease;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--stone-200);
}

.dropdown-panel a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search {
  display: flex;
  width: min(300px, 28vw);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  border: 0;
  outline: 0;
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
  color: var(--white);
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--stone-300);
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 0 16px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
}

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

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--stone-900);
}

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

.mobile-menu-inner {
  padding: 16px 0 20px;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  color: var(--stone-200);
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--amber-400);
}

.mobile-search {
  display: flex;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
  color: var(--white);
  background: transparent;
}

.hero-carousel {
  position: relative;
  height: 620px;
  min-height: 560px;
  overflow: hidden;
  background: var(--black);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.28));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber-500);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18);
}

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

.hero-copy p {
  max-width: 660px;
  margin: 0 0 24px;
  color: var(--stone-200);
  font-size: 20px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--stone-300);
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

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

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

.btn-primary {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.34);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-light:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  background: var(--amber-700);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.btn-light {
  color: var(--amber-800);
  background: var(--amber-100);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.22s ease;
}

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

.page-hero {
  padding: 72px 0 42px;
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
  color: var(--white);
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--stone-300);
  font-size: 18px;
  line-height: 1.8;
}

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

.section-block.white {
  background: var(--white);
}

.section-block.dark {
  background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
  color: var(--white);
}

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

.section-title {
  margin: 0;
  color: var(--stone-800);
  font-size: 30px;
  line-height: 1.2;
}

.dark .section-title {
  color: var(--white);
}

.section-heading p {
  max-width: 600px;
  margin: 8px 0 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.dark .section-heading p {
  color: var(--stone-300);
}

.card {
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-hover {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

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

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

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

.movie-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.movie-cover-wrap {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: var(--stone-800);
}

.movie-card.compact .movie-cover-wrap {
  height: 190px;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  padding: 6px 9px;
  text-align: center;
  background: var(--amber-600);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 750;
}

.movie-card h2,
.movie-card h3 {
  margin: 0 0 10px;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

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

.movie-card p {
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-size: 12px;
  font-weight: 700;
}

.tag-row.light span {
  color: var(--amber-100);
  background: rgba(217, 119, 6, 0.32);
}

.featured-card {
  position: relative;
  min-height: 470px;
}

.featured-link {
  position: absolute;
  inset: 0;
  color: var(--white);
}

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

.featured-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), transparent);
}

.featured-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px;
}

.featured-content h2 {
  margin: 0 0 12px;
  font-size: 34px;
}

.featured-content p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--stone-200);
  line-height: 1.8;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 22px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-800), var(--amber-800));
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-card p {
  margin: 0;
  color: var(--stone-200);
  line-height: 1.65;
}

.category-card span {
  margin-top: auto;
  color: var(--amber-100);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
  gap: 26px;
  align-items: center;
  margin-top: -22px;
  padding: 24px;
  position: relative;
  z-index: 3;
}

.filter-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.filter-panel p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  color: var(--stone-800);
  background: var(--stone-100);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 14px;
  color: var(--amber-800);
  background: var(--amber-50);
  font-weight: 700;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 56px 78px 1fr auto 62px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.rank-number {
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 78px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  color: var(--stone-800);
  font-size: 18px;
  font-weight: 800;
}

.rank-meta {
  color: var(--stone-500);
  font-size: 14px;
}

.rank-score {
  color: var(--amber-700);
  font-weight: 900;
  text-align: right;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 58px;
}

.player-card {
  background: var(--black);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--black);
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.38);
  font-size: 34px;
  transform: translateZ(0);
}

.play-overlay:hover .play-circle {
  background: var(--amber-700);
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  display: none;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  transform: translateX(-50%);
}

.player-message.show {
  display: block;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-50);
  font-weight: 800;
  font-size: 13px;
}

.detail-card h2,
.sidebar-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: var(--stone-700);
  line-height: 1.9;
}

.sidebar-card {
  padding: 22px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone-200);
  color: var(--stone-600);
}

.info-list strong {
  color: var(--stone-800);
}

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

.search-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.search-intro .btn-primary {
  white-space: nowrap;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pagination-links a {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--white);
  box-shadow: var(--shadow-md);
  font-weight: 800;
}

.pagination-links a:hover {
  color: var(--white);
  background: var(--amber-600);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 38px;
}

.footer-logo {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: var(--stone-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--stone-800);
  color: var(--stone-500);
}

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

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

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

  .menu-toggle {
    display: inline-block;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .filter-panel,
  .detail-layout,
  .footer-grid,
  .search-intro {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .movie-grid.three,
  .movie-grid.five,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row a {
    grid-template-columns: 42px 68px 1fr 52px;
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 620px) {
  .container-custom {
    width: min(100% - 24px, 1180px);
  }

  .site-logo {
    font-size: 19px;
  }

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

  .hero-copy p {
    font-size: 17px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 82px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost,
  .btn-light {
    min-height: 42px;
    padding: 0 16px;
  }

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

  .movie-grid,
  .movie-grid.three,
  .movie-grid.five,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-cover-wrap,
  .movie-card.compact .movie-cover-wrap {
    height: 220px;
  }

  .featured-content {
    padding: 24px;
  }

  .featured-content h2 {
    font-size: 28px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
