:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-900: #1c1917;
  --shadow-soft: 0 20px 45px rgba(120, 53, 15, 0.12);
  --shadow-card: 0 10px 30px rgba(120, 53, 15, 0.14);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--stone-900);
  background: linear-gradient(180deg, var(--amber-50), var(--stone-100));
  line-height: 1.65;
}

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.96);
  border-bottom: 1px solid var(--amber-200);
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--amber-900);
  letter-spacing: 0.02em;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-600), var(--red-700));
  box-shadow: 0 10px 20px rgba(185, 28, 28, 0.2);
}

.brand-text {
  white-space: nowrap;
  font-size: 24px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  font-weight: 700;
  color: var(--amber-900);
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-search {
  width: 260px;
  display: flex;
  align-items: center;
  border: 2px solid var(--amber-300);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 18px;
  color: var(--stone-900);
}

.nav-search button {
  border: 0;
  width: 44px;
  height: 42px;
  color: var(--amber-900);
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--amber-900);
  background: var(--amber-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid var(--amber-200);
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.mobile-search input,
.search-page-form input,
.hero-search input,
.filter-search input {
  width: 100%;
  border: 2px solid var(--amber-300);
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
  background: white;
}

.mobile-search button,
.search-page-form button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: white;
  background: var(--amber-600);
  cursor: pointer;
  font-weight: 800;
}

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

.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--amber-900);
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
  background: var(--amber-100);
  color: var(--amber-700);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

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

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 72px;
  color: white;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber-300);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.04;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--amber-100);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags,
.footer-badges,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.footer-badges span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span,
.detail-meta span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

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

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

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 42px;
  line-height: 42px;
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--amber-300);
}

.section-shell,
.breadcrumb,
.detail-hero,
.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.intro-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin-top: 24px;
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: var(--amber-900);
  line-height: 1.16;
}

.intro-panel h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.intro-panel p {
  color: var(--stone-700);
  font-size: 18px;
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading a {
  color: var(--red-700);
  font-weight: 900;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.1);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--amber-100);
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.card-cover-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.card-cover-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 10px;
  color: var(--red-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-summary.is-compact {
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--red-600);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.card-tags span {
  color: var(--red-800);
  background: var(--red-100);
}

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

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 8;
  background: var(--amber-100);
}

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

.category-info {
  padding: 20px;
}

.category-info h2 {
  margin: 0 0 8px;
  color: var(--amber-900);
  font-size: 22px;
}

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

.category-info span {
  color: var(--red-700);
  font-weight: 900;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 90px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: white;
}

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

.rank-item img {
  width: 90px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-content strong,
.rank-content small {
  display: block;
}

.rank-content strong {
  color: var(--red-900);
  line-height: 1.35;
}

.rank-content small {
  color: var(--stone-600);
}

.page-hero {
  padding-top: 64px;
  padding-bottom: 58px;
}

.slim-hero,
.category-hero {
  margin-top: 28px;
  border-radius: 0 0 34px 34px;
}

.page-hero > div {
  padding: 42px;
  border-radius: var(--radius-lg);
  color: white;
  background: radial-gradient(circle at 18% 0%, rgba(252, 211, 77, 0.45), transparent 34%), linear-gradient(135deg, var(--red-900), var(--amber-900));
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  color: white;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 780px;
  color: var(--amber-100);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--amber-900);
  background: var(--amber-100);
  cursor: pointer;
  font-weight: 900;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: white;
  background: var(--amber-600);
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 32px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: var(--amber-100);
  box-shadow: var(--shadow-card);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info {
  padding: 34px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 54px);
}

.detail-one-line {
  color: var(--stone-700);
  font-size: 18px;
}

.detail-meta span,
.detail-tags span {
  color: var(--red-800);
  background: var(--red-100);
}

.player-section {
  padding-top: 30px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #050505;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.35);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 22px;
}

.detail-content article {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-soft);
}

.detail-content h2 {
  margin-top: 26px;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.detail-content p {
  color: var(--stone-700);
  font-size: 17px;
}

.movie-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.movie-facts div {
  padding: 14px;
  border-radius: 14px;
  background: var(--amber-50);
}

.movie-facts dt {
  color: var(--stone-600);
  font-size: 13px;
}

.movie-facts dd {
  margin: 4px 0 0;
  color: var(--amber-900);
  font-weight: 900;
}

.search-page-form {
  max-width: 720px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.site-footer {
  margin-top: 56px;
  color: var(--red-50);
  background: var(--red-900);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-about p,
.site-footer li,
.footer-bottom {
  color: var(--red-200);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.footer-badges span {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
  border-top: 1px solid rgba(254, 202, 202, 0.18);
  padding: 18px 24px;
  text-align: center;
}

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

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

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

  .compact-grid,
  .category-grid,
  .large-category-grid,
  .rank-list-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    height: 68px;
    padding: 0 16px;
  }

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

  .hero-carousel {
    height: 76vh;
    min-height: 520px;
  }

  .hero-content {
    padding: 0 18px 76px;
  }

  .hero-control {
    display: none;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .large-category-grid,
  .rank-list,
  .rank-list-wide,
  .movie-facts {
    grid-template-columns: 1fr;
  }

  .section-shell,
  .breadcrumb,
  .detail-hero,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero > div,
  .detail-info,
  .detail-content article {
    padding: 24px;
  }

  .detail-cover {
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-search,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search button,
  .search-page-form button {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .rank-item {
    grid-template-columns: 38px 74px 1fr;
  }

  .rank-item img {
    width: 74px;
    height: 52px;
  }

  .card-body {
    padding: 15px;
  }

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