* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-2: #fb923c;
  --accent-3: #facc15;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.2), transparent 32rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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;
  background: rgba(2, 6, 23, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.36);
}

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

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 13px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(251, 146, 60, 0.16);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  border-radius: 14px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.1) contrast(1.08);
}

.hero-bg.is-missing {
  display: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(245, 158, 11, 0.38), transparent 24rem),
    radial-gradient(circle at 20% 72%, rgba(251, 146, 60, 0.24), transparent 26rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 42%, rgba(2, 6, 23, 0.35) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.66fr);
  gap: 34px;
  align-items: center;
  padding: 64px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(251, 146, 60, 0.18);
  border-color: rgba(251, 191, 36, 0.72);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border-color: transparent;
  font-weight: 900;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fde68a, #fb923c);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel .poster {
  height: 440px;
  border-radius: 24px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hero-meta span {
  padding: 12px 10px;
  color: var(--muted);
  text-align: center;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-shell input,
.search-shell select,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
}

.search-shell button,
.filter-panel button {
  border: 0;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  font-weight: 900;
  cursor: pointer;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.34);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-title p {
  color: var(--muted);
  line-height: 1.85;
}

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

.movie-card,
.category-card,
.info-card,
.rank-item,
.related-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.movie-card {
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(15, 23, 42, 0.88);
}

.poster {
  position: relative;
  display: block;
  height: 310px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.46), transparent 12rem),
    linear-gradient(135deg, #1e293b, #020617 68%);
}

.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster img.is-missing {
  display: none;
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.72) 100%);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.16);
  font-size: 46px;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.poster-year {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  padding: 7px 10px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

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

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--subtle);
  font-size: 13px;
}

.meta-row span,
.chip-link,
.tag-list span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
}

.chip-link:hover,
.breadcrumb a:hover {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.46);
}

.movie-card h3,
.rank-item h3,
.related-card h3,
.category-card h2 {
  margin: 0 0 10px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.related-card h3 a:hover {
  color: #fde68a;
}

.movie-card p,
.rank-item p,
.category-card p,
.info-card p,
.related-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  color: var(--subtle);
  font-size: 12px;
}

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

.category-card {
  padding: 24px;
  min-height: 220px;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
}

.category-card h2 {
  font-size: 26px;
}

.category-card .btn {
  margin-top: 22px;
}

.page-hero {
  padding: 72px 0 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2), transparent 22rem),
    rgba(15, 23, 42, 0.18);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--subtle);
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px auto;
  gap: 12px;
  margin: 30px 0;
  padding: 14px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(14px);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-item .poster {
  height: 160px;
  border-radius: 18px;
}

.rank-num {
  font-size: 30px;
  font-weight: 1000;
  color: #fde68a;
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-side,
.detail-text {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78)),
    radial-gradient(circle at center, rgba(245, 158, 11, 0.3), transparent 22rem);
  z-index: 3;
}

.player-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.player-poster img.is-missing {
  display: none;
}

.player-poster.is-hidden {
  display: none;
}

.player-start {
  position: relative;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.4);
  cursor: pointer;
}

.player-start::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid #111827;
}

.player-info {
  padding: 24px;
}

.detail-title {
  padding: 54px 0 34px;
}

.detail-side {
  padding: 18px;
}

.detail-side .poster {
  height: 520px;
  border-radius: 22px;
}

.detail-text {
  padding: 28px;
  margin-top: 24px;
}

.detail-text p {
  color: var(--muted);
  line-height: 1.95;
  font-size: 16px;
}

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

.related-card .poster {
  height: 230px;
}

.related-card-body {
  padding: 16px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  min-height: 280px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 46px;
  text-align: center;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: 24px;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 420px;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    justify-content: flex-start;
    padding: 14px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid var(--line);
    border-radius: 22px;
  }

  .site-nav.is-open {
    display: flex;
  }

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

  .hero-content {
    padding: 36px 0 86px;
  }

  .hero-panel .poster {
    height: 360px;
  }

  .search-shell,
  .filter-panel,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .related-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .poster {
    height: 390px;
  }

  .section {
    padding: 52px 0;
  }
}
