* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-500: #64748b;
  --gray-700: #334155;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-50: #fff7ed;
  --white: #ffffff;
  --black: #000000;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body {
  margin: 0;
  color: #1f2937;
  background: var(--gray-50);
  min-height: 100vh;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.28);
}

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

.brand,
.nav-links,
.top-search,
.mobile-links,
.mobile-search,
.hero-actions,
.detail-actions,
.card-meta,
.hero-kicker,
.detail-meta,
.filter-panel,
.sibling-links,
.inline-links,
.footer-links,
.hero-tags,
.detail-tags,
.card-tags,
.category-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--slate-900);
  background: var(--amber-500);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.nav-links {
  gap: 24px;
  justify-content: center;
  flex: 1;
}

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

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

.top-search,
.mobile-search {
  position: relative;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.92);
}

.top-search input {
  width: 190px;
}

.top-search button,
.mobile-search button,
.search-page-form button,
.btn-primary,
.rank-action {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--white);
  background: var(--amber-500);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.btn-primary:hover,
.rank-action:hover {
  background: var(--amber-600);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.menu-toggle {
  display: none;
  color: var(--white);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-links {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px 0 18px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.06));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(690px, 100%);
  padding: 86px 0;
}

.hero-kicker,
.detail-meta,
.card-meta {
  gap: 12px;
  flex-wrap: wrap;
}

.hero-kicker {
  color: var(--amber-300);
  font-weight: 800;
}

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

.hero-copy p,
.page-hero p,
.detail-one {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.btn-ghost {
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-arrow,
.rail-arrow {
  position: absolute;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

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

.home-categories {
  background: linear-gradient(180deg, var(--slate-900), var(--gray-50));
  padding: 26px 0;
}

.category-strip {
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-strip a,
.sibling-links a,
.inline-links a {
  flex: none;
  border-radius: 999px;
  padding: 10px 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.category-strip span {
  margin-left: 6px;
  color: var(--amber-400);
}

.section {
  padding: 70px 0;
}

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

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

.warm-section {
  background: linear-gradient(90deg, #fffbeb, var(--orange-50));
}

.section-head {
  margin-bottom: 28px;
}

.split-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber-500);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-head h2,
.movie-article h2,
.side-panel h2,
.player-title h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--slate-900);
}

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

.section-head p {
  color: var(--gray-500);
  line-height: 1.7;
}

.section-more {
  color: var(--amber-400);
  font-weight: 800;
}

.horizontal-rail {
  position: relative;
}

.rail-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 20px;
  scrollbar-width: none;
}

.rail-track::-webkit-scrollbar,
.category-strip::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 280px;
}

.rail-arrow {
  top: 46%;
  width: 42px;
  height: 42px;
  font-size: 28px;
}

.rail-left {
  left: -10px;
}

.rail-right {
  right: -10px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.movie-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-800);
}

.movie-card-large .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img,
.list-cover img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.movie-list-item:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.card-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--slate-900);
  background: var(--amber-400);
  font-weight: 900;
  font-size: 12px;
}

.card-info {
  padding: 15px;
}

.card-title,
.list-title,
.rank-title,
.overview-link,
.category-title {
  display: block;
  font-weight: 900;
  color: var(--slate-900);
  transition: color 0.2s ease;
}

.card-title:hover,
.list-title:hover,
.rank-title:hover,
.overview-link:hover,
.category-title:hover {
  color: var(--amber-600);
}

.card-info p,
.list-body p,
.rank-info p,
.category-tile p,
.category-overview-card p,
.movie-article p,
.player-title p {
  color: var(--gray-500);
  line-height: 1.7;
}

.card-info p {
  min-height: 54px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.card-meta {
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span {
  border-radius: 8px;
  padding: 3px 8px;
  background: var(--gray-100);
}

.card-tags {
  margin-top: 10px;
}

.card-tags span {
  color: #92400e;
  background: #fffbeb;
}

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

.category-tile,
.category-overview-card {
  border-radius: 22px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.category-title,
.overview-link {
  font-size: 24px;
}

.category-sample,
.category-overview-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.category-sample a,
.category-overview-card div a {
  border-radius: 999px;
  padding: 7px 12px;
  color: #92400e;
  background: #fffbeb;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero {
  padding: 78px 0;
}

.small-hero {
  padding: 72px 0 86px;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

.sibling-links {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.filter-panel {
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filter-panel input {
  flex: 1;
  min-width: 240px;
  color: var(--slate-900);
  background: var(--gray-100);
}

.filter-panel select {
  color: var(--slate-900);
  background: var(--gray-100);
}

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

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

.rank-row,
.movie-list-item {
  display: grid;
  grid-template-columns: auto 150px 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: 18px;
  padding: 14px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  font-weight: 900;
  font-size: 20px;
}

.rank-cover,
.list-cover {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--slate-800);
}

.rank-title {
  font-size: 20px;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  color: var(--slate-900);
  background: var(--white);
}

#searchStats {
  margin-bottom: 20px;
  color: var(--gray-500);
}

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 54px 0 62px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: var(--slate-800);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
}

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

.detail-tags {
  margin-top: 18px;
}

.player-section {
  color: var(--white);
  background: var(--slate-950);
}

.player-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: center;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000000;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: var(--amber-400);
  font-size: 34px;
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.34);
}

.play-overlay.is-hidden {
  display: none;
}

.player-title h2 {
  color: var(--white);
}

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

.movie-article,
.side-panel {
  border-radius: 22px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.movie-article p {
  font-size: 16px;
}

.inline-links {
  flex-wrap: wrap;
  gap: 8px;
}

.inline-links a {
  color: var(--slate-900);
  background: var(--gray-100);
}

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

.movie-list-item {
  grid-template-columns: 118px 1fr;
  padding: 10px;
}

.movie-list-item .list-cover {
  width: 118px;
}

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

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer h3 {
  color: var(--white);
  margin: 0 0 12px;
}

.footer-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

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

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1060px) {
  .top-search,
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .player-wrap,
  .article-layout {
    grid-template-columns: 1fr;
  }
}

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

  .hero-carousel,
  .hero-content {
    min-height: 74vh;
  }

  .hero-copy {
    padding: 72px 0;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-card-large {
    grid-column: span 2;
    grid-row: span 1;
  }

  .card-info {
    padding: 12px;
  }

  .card-info p,
  .card-tags {
    display: none;
  }

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

  .detail-poster {
    width: min(240px, 70vw);
  }

  .rank-row {
    grid-template-columns: auto 96px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
    text-align: center;
  }

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

  .filter-panel,
  .split-head,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  .movie-card-large {
    grid-column: span 1;
  }

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

  .rank-row {
    grid-template-columns: 64px 1fr;
  }

  .rank-cover {
    display: none;
  }

  .rank-num {
    width: 48px;
    height: 48px;
  }
}
