* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #f8fafc;
  background:
    radial-gradient(circle at top left, rgba(236, 72, 153, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.28), transparent 36rem),
    linear-gradient(135deg, #080816 0%, #111827 48%, #16091f 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(49, 46, 129, 0.96), rgba(88, 28, 135, 0.96), rgba(131, 24, 67, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(90deg, #fde047, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f472b6);
  box-shadow: 0 10px 30px rgba(244, 114, 182, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.86);
}

.desktop-nav a,
.nav-group > button,
.mobile-nav a {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.desktop-nav a:hover,
.nav-group > button:hover,
.mobile-nav a:hover {
  color: #fde047;
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 0;
  min-width: 12rem;
  padding: 0.55rem;
  display: grid;
  gap: 0.15rem;
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.6rem);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.nav-menu a {
  padding: 0.62rem 0.75rem;
  border-radius: 0.75rem;
}

.nav-menu a:hover {
  background: rgba(250, 204, 21, 0.1);
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 21rem;
  width: 28%;
  min-width: 16rem;
}

.nav-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(250, 204, 21, 0.8);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.nav-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-search button,
.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f472b6);
  box-shadow: 0 16px 34px rgba(244, 114, 182, 0.24);
}

.nav-search button {
  padding: 0.72rem 1rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1.2rem;
}

.ghost-button {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-search button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(244, 114, 182, 0.32);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.mobile-nav a {
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav.is-open {
  display: grid;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  isolation: isolate;
  background: #060716;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e1b4b, #831843);
  opacity: 0.56;
  z-index: -2;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 35%, rgba(244, 114, 182, 0.3), transparent 24rem),
    linear-gradient(90deg, rgba(6, 7, 22, 0.98), rgba(6, 7, 22, 0.65), rgba(6, 7, 22, 0.24)),
    linear-gradient(0deg, #080816 0%, rgba(8, 8, 22, 0.1) 40%, rgba(8, 8, 22, 0.2) 100%);
  z-index: -1;
}

.hero-content {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 7rem 0 6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fde047;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  max-width: 780px;
  margin: 0.85rem 0 0;
  font-size: clamp(2.6rem, 7vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-content h2 {
  margin: 1.2rem 0 0;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.28rem 0.62rem;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.45rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 2;
}

.hero-dots button {
  width: 2.2rem;
  height: 0.35rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 3.3rem;
  background: linear-gradient(90deg, #fde047, #f472b6);
}

.quick-strip {
  width: min(1180px, calc(100% - 2rem));
  margin: -2.4rem auto 3rem;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.quick-strip a,
.overview-card a,
.category-card,
.filter-panel,
.detail-copy article,
.watch-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.35rem;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.quick-strip a {
  padding: 1rem;
  text-align: center;
  font-weight: 900;
  color: #f8fafc;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.quick-strip a:hover,
.category-card:hover,
.overview-card a:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.45);
}

.section-block,
.filter-panel,
.page-hero,
.detail-top,
.watch-panel {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-block {
  padding: 3.5rem 0;
}

.tinted-block {
  width: 100%;
  padding: 4rem max(1rem, calc((100% - 1280px) / 2));
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.22), rgba(124, 45, 18, 0.22));
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-head h2,
.filter-panel h2,
.detail-copy h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head a {
  color: #fde047;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.15rem;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover {
  box-shadow: 0 25px 58px rgba(0, 0, 0, 0.3);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #312e81, #831843);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(8, 8, 22, 0.92), transparent);
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 0.72rem;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #111827;
  background: #fde047;
}

.poster-year {
  right: 0.72rem;
}

.rank-badge {
  left: 0.72rem;
  background: linear-gradient(135deg, #f97316, #fde047);
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 0.95rem;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card p {
  min-height: 3.9em;
  margin: 0.55rem 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 0.75rem;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
}

.movie-card-compact .poster-link {
  aspect-ratio: auto;
  min-height: 10.8rem;
}

.movie-card-compact .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.category-card,
.overview-card a {
  display: block;
  min-height: 12rem;
  padding: 1.25rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.category-card span,
.overview-card h2 {
  display: block;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p,
.overview-card p {
  color: #cbd5e1;
  margin: 0.8rem 0 0;
}

.overview-index {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #fde047;
  font-weight: 900;
}

.page-hero {
  margin-top: 2rem;
  min-height: 18rem;
  display: grid;
  align-items: center;
  padding: 3rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(244, 114, 182, 0.35), transparent 20rem),
    linear-gradient(135deg, rgba(49, 46, 129, 0.72), rgba(88, 28, 135, 0.6), rgba(17, 24, 39, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.slim-hero {
  min-height: 14rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

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

.filter-panel {
  margin-top: 2rem;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  align-items: end;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
  gap: 0.8rem;
}

.filter-controls select {
  appearance: none;
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.75rem;
  background: linear-gradient(135deg, #312e81, #831843);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

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

.detail-info h1 {
  margin: 0.7rem 0 0;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.detail-one-line {
  margin-top: 1rem;
}

.detail-tags {
  margin-top: 1.15rem;
}

.watch-panel {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  z-index: 1;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, 0.16), transparent 16rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.46));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f472b6);
  box-shadow: 0 22px 44px rgba(244, 114, 182, 0.3);
  font-size: 1.8rem;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-copy article {
  padding: 1.35rem;
}

.detail-copy p {
  color: #cbd5e1;
  margin-bottom: 0;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.45);
}

.footer-inner {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  display: grid;
  gap: 0.9rem;
  color: #cbd5e1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

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

  .menu-button {
    display: grid;
    place-items: center;
  }

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

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

  .filter-panel,
  .detail-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 600px;
  }

  .hero-content {
    padding: 5rem 0 5.5rem;
  }

  .quick-strip,
  .filter-controls,
  .detail-top {
    grid-template-columns: 1fr;
  }

  .quick-strip {
    margin-top: -1.3rem;
  }

  .movie-grid,
  .library-grid,
  .ranking-grid,
  .large-ranking,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card-compact {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 2rem 1.25rem;
    border-radius: 1.35rem;
  }

  .detail-info h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 460px) {
  .nav-shell {
    padding-inline: 0.9rem;
  }

  .site-logo,
  .footer-logo {
    font-size: 1.25rem;
  }

  .logo-mark {
    width: 1.8rem;
    height: 1.8rem;
  }

  .movie-grid,
  .library-grid,
  .ranking-grid,
  .large-ranking,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .player-icon {
    width: 4rem;
    height: 4rem;
  }
}
