:root {
  --amber: #d97706;
  --amber-strong: #b45309;
  --amber-soft: #fef3c7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --bg: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

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

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.header-search input,
.filter-input,
.filter-select {
  width: 230px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.header-search button,
.primary-btn,
.secondary-btn,
.play-button,
.filter-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.primary-btn,
.play-button,
.filter-button {
  color: #fff;
  background: var(--amber);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.22);
}

.header-search button {
  height: 42px;
  padding: 0 18px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.header-search button:hover,
.primary-btn:hover,
.play-button:hover,
.filter-button:hover {
  background: var(--amber-strong);
  transform: translateY(-1px);
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  width: 42px;
  height: 42px;
  font-size: 23px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 22px 18px;
}

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

.mobile-panel nav {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  color: #374151;
  font-weight: 700;
  padding: 8px 0;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.88), rgba(17, 24, 39, 0.66), rgba(17, 24, 39, 0.06));
}

.hero-content {
  position: relative;
  max-width: 1180px;
  min-height: 600px;
  margin: 0 auto;
  padding: 90px 22px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 58px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(217, 119, 6, 0.92);
}

.section-kicker {
  color: var(--amber-strong);
  background: var(--amber-soft);
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 30px;
  color: #d1d5db;
  font-weight: 700;
}

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

.hero-poster {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 2.9;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
  background: #f59e0b;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 22px;
}

.section.compact {
  padding-top: 34px;
}

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

.section-title h2,
.page-title h1,
.detail-copy h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-title p,
.page-title p,
.detail-copy p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(217, 119, 6, 0.94);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

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

.meta-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.meta-row a {
  color: var(--amber-strong);
}

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

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

.movie-card p {
  margin: 0;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.info-pill {
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card strong {
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
}

.category-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.86);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.75fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: #e5e7eb;
}

.rank-copy {
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  font-size: 18px;
}

.rank-copy small {
  color: var(--muted);
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.35), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 58%, #92400e);
}

.page-title {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 22px 60px;
}

.page-title p {
  max-width: 760px;
  color: #d1d5db;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.filter-select {
  width: 170px;
}

.filter-button {
  min-height: 42px;
  padding: 0 18px;
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d1d5db;
  border-radius: 22px;
  background: #fff;
}

.detail-hero {
  background:
    radial-gradient(circle at 80% 15%, rgba(245, 158, 11, 0.24), transparent 30%),
    linear-gradient(135deg, #020617, #111827 54%, #1f2937);
  color: #fff;
}

.detail-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 22px 46px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  background: #e5e7eb;
}

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

.detail-copy h1 {
  color: #fff;
}

.detail-copy p {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 17px;
}

.detail-meta {
  margin: 18px 0 22px;
}

.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  background: #000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.play-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.play-layer.hidden {
  display: none;
}

.play-button {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-size: 34px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
}

.content-card + .content-card {
  margin-top: 18px;
}

.site-footer {
  margin-top: 30px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 22px;
  display: flex;
  justify-content: space-between;
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
}

.footer-nav {
  display: grid;
  gap: 9px;
  min-width: 150px;
}

.footer-nav a:hover {
  color: #fbbf24;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-top,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

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

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

  .hero-content {
    padding: 72px 18px 72px;
  }

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

  .section,
  .page-title,
  .detail-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .detail-top {
    gap: 26px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .footer-nav {
    margin-top: 24px;
  }
}

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

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

  .rank-item img {
    width: 62px;
    height: 82px;
  }

  .filters {
    display: grid;
  }

  .filter-input,
  .filter-select,
  .filter-button {
    width: 100%;
  }
}
