* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-900: #7c2d12;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.15);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--amber-50), var(--white));
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.nav-shell {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-900));
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.25);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  color: var(--amber-800);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.nav-search input,
.mobile-search input,
.filter-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 14px;
  min-width: 210px;
  color: var(--gray-800);
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  background: var(--amber-900);
}

.mobile-panel {
  display: none;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--amber-100);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px 4px;
  color: var(--amber-900);
  font-weight: 700;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
  margin-top: 8px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-300);
  font-weight: 800;
  margin-bottom: 14px;
}

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

.hero-copy p {
  margin: 0 0 24px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-chips span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(254, 243, 199, 0.95);
  color: var(--amber-900);
  font-weight: 700;
  font-size: 14px;
}

.hero-cta,
.primary-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--amber-600);
  color: var(--white);
  font-weight: 800;
  padding: 14px 24px;
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-cta:hover,
.primary-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: var(--amber-700);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 28px;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.page-main,
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px 70px;
}

.section-block {
  margin-bottom: 64px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

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

.movie-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(120, 53, 15, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.poster-year,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
}

.poster-year {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  color: var(--amber-900);
  background: var(--amber-100);
  font-size: 13px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--amber-600);
}

.play-chip {
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(217, 119, 6, 0.9);
}

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

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

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

.card-meta,
.card-line {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.65;
}

.card-line {
  margin-top: 8px;
  color: var(--gray-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 9px;
  font-size: 12px;
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
}

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

.category-tile {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.65;
}

.dark-section {
  border-radius: 26px;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
  padding: 34px;
  box-shadow: var(--shadow);
}

.dark-section .section-head h2,
.dark-section .section-head p {
  color: var(--white);
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.16);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--amber-600);
  color: var(--white);
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
}

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

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 4px;
  color: var(--gray-600);
  line-height: 1.6;
}

.rank-score {
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 900;
}

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

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

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

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

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
  font-size: 18px;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.filter-box input {
  width: 100%;
  border: 1px solid var(--amber-200);
  border-radius: 14px;
  background: var(--amber-50);
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
  border-radius: var(--radius);
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--black);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.player-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(217, 119, 6, 0.18), rgba(0, 0, 0, 0.48));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-large {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.4);
  font-size: 34px;
  padding-left: 5px;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-card h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--gray-700);
  line-height: 1.85;
}

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

.side-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-900), var(--orange-900));
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  background: var(--amber-900);
  color: var(--amber-50);
  padding: 48px 22px 24px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 38px;
}

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

.site-footer p {
  margin: 14px 0 0;
  color: rgba(255, 251, 235, 0.72);
  line-height: 1.75;
}

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

.footer-links a {
  color: rgba(255, 251, 235, 0.78);
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(254, 243, 199, 0.16);
  color: rgba(255, 251, 235, 0.64);
  text-align: center;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .rank-number,
  .rank-score {
    display: none;
  }

  .rank-poster {
    width: 76px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    min-height: 64px;
    padding: 0 16px;
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

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

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

  .dark-section {
    padding: 22px;
  }

  .page-main,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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