:root {
  --deep-950: #10161d;
  --deep-900: #1b222b;
  --deep-800: #29323c;
  --deep-700: #313a45;
  --night-900: #142565;
  --night-700: #273b81;
  --night-600: #2e448c;
  --glow-500: #ffcf33;
  --glow-600: #e9b817;
  --text-main: #ffffff;
  --text-muted: #d1d5db;
  --text-soft: #9ca3af;
  --line-soft: rgba(255, 255, 255, 0.08);
  --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(255, 207, 51, 0.28);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(46, 68, 140, 0.32), transparent 34rem),
    linear-gradient(180deg, #10161d 0%, #1b222b 45%, #10161d 100%);
  color: var(--text-main);
}

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

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

img.image-hidden {
  opacity: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 22, 29, 0.78);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--deep-900);
  background: var(--glow-500);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
}

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

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--glow-500);
  background: rgba(255, 207, 51, 0.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 22, 29, 0.96) 0%, rgba(27, 34, 43, 0.72) 43%, rgba(27, 34, 43, 0.18) 100%),
    linear-gradient(0deg, var(--deep-900) 0%, rgba(27, 34, 43, 0.42) 54%, rgba(27, 34, 43, 0.16) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 92px;
}

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

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

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-movie-title {
  font-size: clamp(26px, 4vw, 46px) !important;
  color: var(--glow-500);
}

.hero p,
.page-hero p,
.detail-hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.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, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

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

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

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

.btn-secondary {
  color: var(--text-main);
  background: rgba(46, 68, 140, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  background: rgba(41, 50, 60, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.carousel-controls {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-arrow,
.carousel-dot {
  border: 0;
  cursor: pointer;
}

.carousel-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 28px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.quick-search-inner,
.filter-bar,
.side-card,
.player-panel,
.detail-article,
.category-card,
.content-panel {
  background: rgba(41, 50, 60, 0.78);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(18px);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 26px;
}

.quick-search h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  color: var(--text-main);
  background: rgba(16, 22, 29, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  outline: none;
  padding: 0 16px;
}

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

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

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

.section-more,
.text-link {
  color: var(--glow-500);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(46, 68, 140, 0.5), rgba(41, 50, 60, 0.92));
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.07);
}

.category-tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 22, 29, 0.05), rgba(16, 22, 29, 0.94));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  right: 18px;
  left: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 56px;
  font-size: 22px;
}

.category-tile small {
  bottom: 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(41, 50, 60, 0.76);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(46, 68, 140, 0.7), rgba(16, 22, 29, 0.92));
}

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

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(16, 22, 29, 0.78));
}

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

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

.rank-badge {
  top: 12px;
  left: 12px;
  color: var(--text-main);
  background: rgba(46, 68, 140, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: var(--glow-500);
}

.card-meta {
  margin: 9px 0;
  font-size: 13px;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.28);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--text-soft);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span,
.tag-row a,
.detail-tags span {
  padding: 5px 9px;
  color: var(--text-muted);
  background: rgba(16, 22, 29, 0.55);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 12px;
}

.tag-row a {
  color: var(--glow-500);
}

.page-shell {
  padding-top: 0;
}

.page-hero {
  position: relative;
  padding: 86px 0 44px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 37, 101, 0.58), rgba(27, 34, 43, 0.28)),
    radial-gradient(circle at top right, rgba(255, 207, 51, 0.12), transparent 24rem);
  border-bottom: 1px solid var(--line-soft);
}

.compact-hero h1 {
  margin-bottom: 12px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 14px;
}

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

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

.category-card {
  overflow: hidden;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  height: 190px;
  overflow: hidden;
  background: rgba(16, 22, 29, 0.7);
}

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

.category-card-body {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.filter-bar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 16px;
}

.filter-search {
  flex: 1 1 320px;
}

.filter-controls {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-controls select {
  min-width: 140px;
}

.empty-state {
  margin: 24px 0;
  padding: 26px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(41, 50, 60, 0.62);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}

.detail-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: var(--deep-900);
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 22, 29, 0.98), rgba(16, 22, 29, 0.74), rgba(16, 22, 29, 0.28)),
    linear-gradient(0deg, var(--deep-900) 0%, rgba(27, 34, 43, 0.16) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 84px 0 56px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 40px;
}

.player-panel {
  overflow: hidden;
  padding: 0;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-main);
  background: radial-gradient(circle, rgba(16, 22, 29, 0.2), rgba(16, 22, 29, 0.55));
  border: 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: var(--deep-900);
  background: var(--glow-500);
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
  font-size: 28px;
}

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

.detail-article h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.9;
}

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

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.side-card {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.side-card + .side-card {
  position: static;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(16, 22, 29, 0.7);
}

.side-link strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-link:hover strong {
  color: var(--glow-500);
}

.side-link small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
}

.info-list {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  margin: 0;
  color: var(--text-muted);
}

.info-list dt {
  color: var(--text-soft);
}

.info-list dd {
  margin: 0;
}

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

.site-footer {
  margin-top: 70px;
  padding: 34px 0;
  color: var(--text-soft);
  background: rgba(16, 22, 29, 0.72);
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

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

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

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

  .side-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: rgba(16, 22, 29, 0.96);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-deep);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero {
    height: 78vh;
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

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

  .quick-search-inner,
  .detail-title-row,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .home-search,
  .filter-bar,
  .filter-controls {
    width: 100%;
    flex-direction: column;
  }

  .movie-grid,
  .category-strip,
  .category-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .category-tile {
    min-height: 220px;
  }

  .detail-hero {
    min-height: 560px;
  }

  .side-link {
    grid-template-columns: 96px 1fr;
  }
}

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .content-section {
    padding-top: 40px;
  }
}
