* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-200: #fde68a;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber-200), var(--amber-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 9px 14px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  background: var(--slate-900);
}

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

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

.hero-stage {
  position: relative;
  min-height: 70vh;
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.34));
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 48px;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 96px 24px 120px;
  color: var(--white);
}

.hero-copy {
  max-width: 760px;
}

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

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 780px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.search-panel button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn,
.search-panel button,
.hero-search button {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  right: 24px;
  bottom: 34px;
  left: 24px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

.hero-dot.active {
  background: var(--amber-400);
}

.hero-search {
  position: absolute;
  right: 24px;
  bottom: 62px;
  left: 24px;
  z-index: 4;
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-panel input,
.inline-filter input {
  width: 100%;
  min-width: 0;
  color: var(--slate-900);
  background: var(--white);
  border: 0;
  outline: 0;
}

.hero-search input {
  padding: 0 18px;
  color: var(--white);
  background: transparent;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.content-section,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-500);
  font-weight: 900;
}

.section-head h2,
.detail-content h2,
.player-section h2,
.category-panel h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 28px;
  line-height: 1.2;
}

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

.section-more,
.text-link {
  color: #b45309;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

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

.poster-tag {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

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

.card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
}

.card-body .tag-list span {
  min-height: 26px;
  color: var(--slate-700);
  background: #f8fafc;
  border-color: #e2e8f0;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 20px;
  color: var(--white);
  background: var(--slate-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.22));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 100px;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  display: grid;
  gap: 24px;
  padding: 58px;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.3), transparent 36%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.compact-hero,
.rank-hero,
.search-hero,
.category-hero {
  min-height: 280px;
  align-items: center;
}

.inline-filter,
.search-panel {
  display: flex;
  width: min(680px, 100%);
  padding: 8px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.inline-filter input,
.search-panel input {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
}

.search-panel button {
  border: 0;
}

.category-panels {
  display: grid;
  gap: 24px;
  margin-top: 34px;
}

.category-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.category-panel-media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-panel-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.category-panel-body p {
  color: var(--slate-600);
  line-height: 1.75;
}

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

.breadcrumb a {
  color: #b45309;
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 24px;
  padding: 34px;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.lead {
  max-width: 780px;
  margin: 18px 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 18px;
}

.player-section,
.detail-content,
.related-section {
  margin-top: 42px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.24);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.12));
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  clip-path: polygon(30% 20%, 30% 80%, 82% 50%);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
  filter: drop-shadow(0 10px 28px rgba(245, 158, 11, 0.46));
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.detail-content p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
}

.search-status {
  margin-bottom: 18px;
  color: var(--slate-600);
  font-weight: 800;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: var(--slate-950);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: var(--amber-300, #fcd34d);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

  .hero-inner,
  .detail-hero,
  .category-panel,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .nav-shell {
    padding: 0 16px;
  }

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

  .hero,
  .hero-stage,
  .hero-inner {
    min-height: 760px;
  }

  .hero-inner {
    padding: 64px 18px 150px;
  }

  .hero-poster {
    display: none;
  }

  .hero-search {
    border-radius: 22px;
  }

  .hero-search input {
    min-height: 44px;
  }

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

  .content-section,
  .page-main,
  .detail-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .inline-filter,
  .search-panel {
    flex-direction: column;
    border-radius: 24px;
  }

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