:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --yellow-500: #eab308;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 14px 35px rgba(17, 24, 39, 0.12);
  --shadow-strong: 0 24px 65px rgba(17, 24, 39, 0.24);
  --radius-xl: 18px;
  --radius-2xl: 26px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--amber-50), var(--white) 42%, var(--gray-50));
  line-height: 1.7;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500), var(--amber-600));
  color: var(--white);
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--white);
  color: var(--amber-600);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.logo-text {
  font-size: 1.18rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

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

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(180, 83, 9, 0.42);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: var(--white);
  background: linear-gradient(120deg, var(--amber-500), var(--orange-500), var(--yellow-500));
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}

.hero::before {
  width: 440px;
  height: 440px;
  left: -140px;
  top: -120px;
  background: rgba(255, 255, 255, 0.18);
}

.hero::after {
  width: 560px;
  height: 560px;
  right: -160px;
  bottom: -220px;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.2);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.18)),
    linear-gradient(180deg, rgba(17, 24, 39, 0.24), rgba(17, 24, 39, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 360px);
  align-items: center;
  gap: 42px;
  min-height: 620px;
  padding: 70px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--amber-100);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

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

.button-primary,
.button-ghost,
.section-more,
.reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  background: var(--white);
  color: var(--amber-600);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.button-primary:hover,
.button-ghost:hover,
.section-more:hover,
.reset-button:hover {
  transform: translateY(-2px);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-strong);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
}

.hero-poster-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(12px);
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

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

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -38px;
}

.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.quick-search input {
  min-height: 50px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
}

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

main {
  display: block;
}

.page-hero {
  padding: 72px 0 54px;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500), var(--yellow-500));
}

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

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

.section {
  padding: 56px 0;
}

.section.alt {
  background: linear-gradient(135deg, var(--orange-50, #fff7ed), var(--amber-50));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.15;
}

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

.section-more {
  color: var(--amber-700, #b45309);
  background: var(--amber-100);
  white-space: nowrap;
}

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

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

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

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #fff7ed);
}

.card-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 2.5rem;
  opacity: 0;
  background: rgba(0, 0, 0, 0.26);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
}

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

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.78);
  font-size: 0.8rem;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--amber-700, #b45309);
  background: var(--white);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--amber-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.25em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 0.82rem;
}

.meta-line span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gray-100);
}

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

.tag-list span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #92400e;
  background: var(--amber-100);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 28px;
  border-radius: var(--radius-2xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3,
.category-card p {
  position: relative;
  z-index: 1;
}

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

.category-card p {
  max-width: 500px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
}

.category-meta {
  display: inline-flex;
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

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

.hot-panel,
.side-panel,
.detail-panel,
.filter-panel {
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.hot-panel {
  padding: 26px;
}

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

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

.mini-card:hover {
  background: var(--amber-50);
  transform: translateX(3px);
}

.mini-card img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--amber-100);
}

.mini-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  display: block;
  color: var(--gray-500);
  font-style: normal;
  font-size: 0.88rem;
}

.mini-rank {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  font-weight: 800;
  font-size: 0.82rem;
}

.filter-panel {
  margin: 34px 0;
  padding: 20px;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--gray-600);
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 12px;
  background: var(--white);
  outline: none;
}

.reset-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
}

.empty-result {
  display: none;
  padding: 40px;
  border-radius: var(--radius-2xl);
  background: var(--white);
  text-align: center;
  color: var(--gray-500);
  box-shadow: var(--shadow-soft);
}

.breadcrumb {
  padding: 22px 0 0;
  color: var(--gray-600);
  font-size: 0.92rem;
}

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

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

.detail-main,
.side-panel {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: var(--black);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--amber-600);
  background: var(--white);
  font-size: 2.2rem;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.18;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  min-width: 74px;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  font-weight: 900;
  white-space: nowrap;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--gray-100);
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 1.32rem;
}

.detail-copy p {
  margin: 0 0 14px;
  color: var(--gray-700);
}

.review-box {
  padding: 20px;
  border-left: 5px solid var(--amber-500);
  border-radius: 16px;
  background: linear-gradient(90deg, var(--amber-50), #fff7ed);
}

.side-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.info-list span {
  color: var(--gray-500);
}

.info-list strong {
  text-align: right;
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 34px 0 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.pagination span {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
}

.site-footer {
  color: var(--white);
  background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 34px;
  padding: 48px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--amber-400);
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.68);
}

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

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

.footer-logo {
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.92rem;
}

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

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

  .side-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 48px 0 90px;
  }

  .hero-poster {
    max-width: 270px;
    margin: 0 auto;
  }

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

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

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

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body p,
  .meta-line {
    font-size: 0.78rem;
  }

  .section {
    padding: 38px 0;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

  .detail-title-row {
    display: block;
  }

  .rating-pill {
    margin-top: 12px;
  }

  .detail-content {
    padding: 20px;
  }

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