:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.13), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 11px 15px;
  color: var(--soft);
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

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

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

.hero-carousel {
  position: relative;
  height: min(78vh, 780px);
  min-height: 560px;
  overflow: hidden;
  background: #050816;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.08);
}

.hero-slide img.is-missing,
.poster img.is-missing,
.detail-poster img.is-missing,
.cover-tile img.is-missing {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-summary,
.page-hero p,
.detail-line {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
}

.btn.ghost:hover {
  border-color: var(--gold);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  color: #ffffff;
  font-size: 35px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.45);
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.9);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 38px;
  background: var(--gold);
}

.search-panel,
.filter-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-grid,
.category-block {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin-top: -44px;
  padding: 24px;
  border-radius: var(--radius);
}

.search-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--soft);
  font-weight: 800;
}

.search-line {
  display: flex;
  gap: 10px;
}

.search-line input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.8);
  border-radius: 15px;
  padding: 14px 16px;
  outline: none;
}

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

.search-line button,
.filter-button {
  color: #111827;
  border: 0;
  background: var(--gold);
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.quick-links,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-link,
.filter-button {
  color: var(--soft);
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.58);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.pill-link:hover,
.filter-button:hover,
.filter-button.is-active {
  color: #111827;
  background: var(--gold);
  border-color: var(--gold);
}

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

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

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

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--gold-2);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(245, 158, 11, 0.35), transparent 48%),
    linear-gradient(160deg, #172033, #0f172a 58%, #020617);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.9) 100%);
}

.play-dot {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.34);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  padding: 8px 10px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: 12px;
  text-align: center;
}

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

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

.compact-card h3 {
  font-size: 16px;
}

.movie-card h3 a:hover {
  color: var(--gold-2);
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span,
.inline-links a {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.cover-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.2), transparent 56%),
    #0f172a;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.cover-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
  transition: transform 0.3s ease;
}

.cover-tile:hover img {
  transform: scale(1.08);
}

.cover-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.cover-tile span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-size: 22px;
  font-weight: 900;
}

.page-main {
  padding-bottom: 70px;
}

.page-hero {
  margin-top: 32px;
  padding: 42px;
  border-radius: var(--radius);
}

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

.filter-panel {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius);
}

.library-search {
  margin-bottom: 16px;
}

.empty-state {
  padding: 40px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.category-layout {
  display: grid;
  gap: 26px;
  margin-top: 32px;
}

.category-block {
  padding: 28px;
  border-radius: var(--radius);
}

.category-block h2 {
  margin: 0 0 20px;
  font-size: 26px;
}

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

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.42);
  border-radius: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-link:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-2px);
}

.category-link b {
  color: var(--gold-2);
}

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

.breadcrumb a:hover {
  color: var(--gold-2);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 330px) 1fr;
  gap: 36px;
  margin-top: 22px;
  padding: 34px;
  border-radius: var(--radius);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.2), transparent 56%),
    #0f172a;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-copy {
  align-self: center;
}

.player-section {
  margin-top: 32px;
  padding: 28px;
  border-radius: var(--radius);
}

.player-section h2 {
  margin: 0 0 18px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.movie-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(2, 6, 23, 0.72) 52%, rgba(2, 6, 23, 0.9));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.movie-player.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-pulse {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  font-size: 26px;
  box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.14), 0 18px 44px rgba(0, 0, 0, 0.32);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  margin-top: 32px;
  padding: 30px;
  border-radius: var(--radius);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.95;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: var(--soft);
}

.detail-side a:hover,
.inline-links a:hover {
  color: var(--gold-2);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 34px 0;
}

.footer-grid p,
.footer-grid a {
  display: block;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: var(--gold-2);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-brand {
  margin-bottom: 14px;
}

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

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

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

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .hero-carousel {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .search-line {
    flex-direction: column;
  }

  .search-line button {
    min-height: 46px;
  }

  .six-grid,
  .four-grid,
  .tile-grid,
  .category-link-grid,
  .footer-grid,
  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .page-hero,
  .detail-hero,
  .player-section,
  .detail-grid,
  .category-block {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .six-grid,
  .four-grid,
  .tile-grid,
  .category-link-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 16px;
  }

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