:root {
  --deep-950: #111821;
  --deep-900: #1b222b;
  --deep-850: #202a35;
  --deep-800: #29323c;
  --deep-700: #313a45;
  --night-900: #142565;
  --night-700: #273b81;
  --night-600: #2e448c;
  --glow-500: #ffcf33;
  --glow-600: #ffca2e;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --white: #ffffff;
  --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 207, 51, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(39, 59, 129, 0.28), transparent 34rem),
    linear-gradient(180deg, #111821 0%, #1b222b 48%, #111821 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid var(--deep-700);
  background: rgba(27, 34, 43, 0.95);
  backdrop-filter: blur(8px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--glow-500);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--deep-950);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
  font-size: 16px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text-soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--glow-500);
  background: rgba(41, 50, 60, 0.9);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 16px;
  border-top: 1px solid rgba(49, 58, 69, 0.7);
  background: var(--deep-900);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-overlay,
.detail-backdrop::before,
.page-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 24, 33, 0.96) 0%, rgba(17, 24, 33, 0.76) 42%, rgba(17, 24, 33, 0.32) 100%),
    linear-gradient(0deg, var(--deep-950) 0%, rgba(17, 24, 33, 0.08) 55%, rgba(17, 24, 33, 0.4) 100%);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 70vh;
  padding: 120px 0 115px;
}

.hero-copy {
  width: min(720px, 100%);
}

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

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.08;
}

.hero p,
.page-hero p,
.detail-title p {
  max-width: 740px;
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  color: var(--deep-950);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
}

.btn.primary:hover {
  background: var(--glow-600);
}

.btn.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(41, 50, 60, 0.72);
  backdrop-filter: blur(8px);
}

.btn.full {
  width: 100%;
}

.hero-meta {
  margin-top: 18px;
}

.hero-meta span,
.movie-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(41, 50, 60, 0.72);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(17, 24, 33, 0.74);
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-size: 36px;
}

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

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

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

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

.hero-dot.active {
  width: 34px;
  background: var(--glow-500);
}

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 82px;
  z-index: 5;
  display: grid;
  width: 320px;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(17, 24, 33, 0.62);
  backdrop-filter: blur(8px);
}

.hero-mini img {
  width: 76px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.section {
  padding: 62px 0 0;
}

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

.section-head.inline {
  margin-bottom: 18px;
}

.section-head h2,
.content-card h2,
.side-card h2,
.category-card h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-head a {
  color: var(--glow-500);
  font-weight: 700;
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  padding: 28px;
  border: 1px solid rgba(49, 58, 69, 0.86);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(41, 50, 60, 0.94), rgba(20, 37, 101, 0.52));
  box-shadow: var(--shadow-deep);
}

.search-strip h2 {
  margin: 0 0 6px;
}

.search-strip p {
  margin: 0;
  color: var(--text-muted);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-box input,
.filter-panel input,
.filter-panel select,
.filter-panel button {
  min-height: 46px;
  border: 1px solid var(--deep-700);
  border-radius: 12px;
  color: var(--white);
  background: rgba(17, 24, 33, 0.76);
  outline: none;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  padding: 0 14px;
}

.search-box button,
.filter-panel button,
.tag-filter button {
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: var(--deep-950);
  background: var(--glow-500);
  cursor: pointer;
  font-weight: 800;
}

.card-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(49, 58, 69, 0.72);
  border-radius: 18px;
  background: var(--deep-800);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(255, 207, 51, 0.55);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--deep-950);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(17, 24, 33, 0.88), transparent);
}

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

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: var(--deep-950);
  background: var(--glow-500);
}

.rank-badge {
  left: 12px;
  top: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--deep-950);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
}

.movie-info {
  padding: 16px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
}

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

.movie-info h3 a:hover,
.media-row h3 a:hover,
.category-card h2 a:hover {
  color: var(--glow-500);
}

.movie-info p,
.media-row p,
.content-card p,
.side-card p,
.category-card p {
  margin: 0;
  color: var(--text-muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.editor-panel,
.rank-panel,
.content-card,
.side-card,
.filter-panel,
.rank-hero-card {
  border: 1px solid rgba(49, 58, 69, 0.75);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(41, 50, 60, 0.9), rgba(27, 34, 43, 0.92));
  box-shadow: var(--shadow-deep);
}

.editor-panel,
.rank-panel {
  padding: 24px;
}

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

.media-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(17, 24, 33, 0.45);
}

.row-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
}

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

.row-cover strong {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--deep-950);
  background: var(--glow-500);
}

.media-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.row-meta {
  margin-bottom: 6px !important;
  font-size: 13px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(17, 24, 33, 0.5);
}

.ranking-list a:hover {
  color: var(--glow-500);
}

.ranking-list strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--deep-950);
  background: var(--glow-500);
}

.ranking-list em {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.category-tile::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(0deg, rgba(17, 24, 33, 0.94), rgba(17, 24, 33, 0.32));
}

.category-tile span {
  color: var(--glow-500);
  font-weight: 800;
}

.category-tile strong {
  margin: 4px 0;
  font-size: 22px;
}

.category-tile em {
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero,
.detail-backdrop {
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.page-hero.compact {
  min-height: 360px;
  padding: 128px 0 72px;
}

.page-hero .container,
.detail-head {
  position: relative;
  z-index: 1;
}

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

.breadcrumb a:hover {
  color: var(--glow-500);
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(49, 58, 69, 0.72);
  border-radius: 22px;
  background: rgba(41, 50, 60, 0.76);
}

.category-cover {
  display: flex;
  min-height: 160px;
  align-items: end;
  padding: 14px;
  border-radius: 16px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -70px 70px rgba(0, 0, 0, 0.58);
}

.category-cover span {
  color: var(--deep-950);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--glow-500);
  font-weight: 900;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(17, 24, 33, 0.5);
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
  gap: 12px;
  padding: 18px;
  margin-bottom: 14px;
}

.filter-panel.search-wide {
  grid-template-columns: minmax(280px, 1fr) 180px 180px auto;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.tag-filter button {
  min-height: 38px;
  color: var(--text-soft);
  border: 1px solid rgba(49, 58, 69, 0.85);
  background: rgba(41, 50, 60, 0.86);
}

.tag-filter button.active,
.tag-filter button:hover {
  color: var(--deep-950);
  background: var(--glow-500);
}

.hidden-by-filter {
  display: none !important;
}

.rank-hero-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  margin-bottom: 28px;
}

.rank-hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.rank-hero-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 5vw, 46px);
}

.rank-hero-card p {
  margin: 0 0 22px;
  color: var(--text-soft);
}

.detail-backdrop {
  min-height: 460px;
  padding: 126px 0 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding-top: 34px;
}

.detail-main,
.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(49, 58, 69, 0.82);
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-deep);
}

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

.movie-player video,
.player-cover,
.player-cover img,
.player-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player video {
  z-index: 1;
  object-fit: contain;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.66);
}

.player-gradient {
  background: radial-gradient(circle at center, rgba(255, 207, 51, 0.18), transparent 28%), linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.15));
}

.big-play {
  position: relative;
  z-index: 4;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: var(--deep-950);
  background: var(--glow-500);
  box-shadow: var(--shadow-glow);
  font-size: 34px;
}

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

.content-card,
.side-card {
  padding: 22px;
}

.content-card p {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 16px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 16px;
}

.meta-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 14px 0 18px;
}

.meta-list dt {
  color: var(--text-muted);
}

.meta-list dd {
  margin: 0;
  color: var(--text-soft);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.side-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(49, 58, 69, 0.7);
  color: var(--text-soft);
}

.side-links a:hover {
  color: var(--glow-500);
}

.side-links span {
  color: var(--text-muted);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--deep-700);
  background: var(--deep-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p,
.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--glow-500);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(49, 58, 69, 0.7);
  color: var(--text-muted);
  text-align: center;
}

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

  .featured-grid,
  .compact-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 110px 0 92px;
  }

  .hero-arrow {
    display: none;
  }

  .search-strip,
  .search-box,
  .filter-panel,
  .filter-panel.search-wide,
  .rank-hero-card,
  .category-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-card-grid,
  .detail-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-row {
    grid-template-columns: 92px 1fr;
  }

  .detail-title h1,
  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .featured-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-card-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .hero-meta span {
    font-size: 13px;
  }

  .section {
    padding-top: 42px;
  }

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