:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f59e0b;
  --brand-deep: #ea580c;
  --brand-soft: rgba(245, 158, 11, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.30);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05) rotate(-3deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.92);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 92px max(32px, calc((100vw - 1180px) / 2)) 150px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(760px, 100%);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-panel h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-site-title {
  margin: 14px 0 8px;
  color: #fef3c7;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-movie-title {
  margin: 10px 0 18px;
  color: #fef3c7;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-content p,
.page-hero p {
  max-width: 740px;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span,
.card-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-strong);
}

.hero-tags span,
.detail-tags a {
  padding: 8px 13px;
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.28);
}

.ghost-btn,
.text-link,
.section-link {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.section-link:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.55);
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateY(-8deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: perspective(1000px) rotateY(0deg) translateY(-6px);
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 3;
  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.36);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  width: min(980px, calc(100% - 32px));
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-category-strip a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
}

.hero-category-strip a:hover {
  background: var(--brand-soft);
  color: #fff;
}

.content-section,
.page-hero,
.breadcrumb,
.detail-hero,
.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 72px 0 0;
}

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

.section-heading h2,
.filter-panel h2,
.detail-content h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.15;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  filter: saturate(1.1) brightness(1.04);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 11px;
  background: rgba(2, 6, 23, 0.78);
  color: #fff;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  padding: 7px 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  text-align: center;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.card-meta span {
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card h3 {
  min-height: 3.2em;
  margin: 0 0 9px;
  color: #fff;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

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

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr minmax(0, 760px);
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.70);
  backdrop-filter: blur(18px);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  padding: 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: #fbbf24;
}

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

.category-tile,
.category-overview-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(30, 41, 59, 0.62));
  padding: 22px;
}

.category-main h3,
.category-overview-card h2 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.category-main p,
.category-overview-card p {
  margin: 0;
  color: var(--muted-strong);
}

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

.mini-card {
  display: grid;
  gap: 8px;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.ranking-list span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: #fbbf24;
  font-weight: 900;
}

.ranking-list strong {
  display: block;
  color: #fff;
}

.ranking-list em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  margin-top: 40px;
  padding: 70px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.68)),
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.18), transparent 26rem);
  box-shadow: var(--shadow);
}

.page-hero.compact-hero {
  padding: 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  margin-top: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(234, 88, 12, 0.38);
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-panel h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.detail-one-line {
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.36);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
}

.detail-content p {
  margin: 14px 0 0;
  color: var(--muted-strong);
}

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

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: end;
}

.footer-links a:hover {
  color: #fff;
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

  .hero-slide,
  .detail-hero,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 28px;
    padding-top: 72px;
  }

  .hero-poster {
    width: min(280px, 70vw);
    transform: none;
  }

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

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

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .site-nav {
    height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    padding: 44px 18px 160px;
  }

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

  .hero-category-strip {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .content-section,
  .page-hero,
  .breadcrumb,
  .detail-hero,
  .detail-content {
    width: min(100% - 24px, 1180px);
  }

  .page-hero {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.wide-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .detail-content,
  .ranking-list.columns,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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

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

  .player-shell,
  .movie-video {
    min-height: 260px;
  }
}
