:root {
  --deepblue-950: #061126;
  --deepblue-900: #0a1a35;
  --deepblue-850: #0d2348;
  --deepblue-800: #12305f;
  --deepblue-700: #1b4379;
  --ocean-500: #0ea5e9;
  --ocean-400: #38bdf8;
  --ocean-300: #7dd3fc;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --text-main: #f4fbff;
  --text-soft: #c7e9ff;
  --text-muted: #89b9d6;
  --line: rgba(125, 211, 252, 0.18);
  --card: rgba(10, 26, 53, 0.82);
  --card-strong: rgba(18, 48, 95, 0.86);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 42%, var(--deepblue-950));
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(6, 17, 38, 0.94), rgba(13, 35, 72, 0.92), rgba(12, 89, 103, 0.9));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
}

.nav-bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  color: white;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 1.22rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(125, 211, 252, 0.14);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(6, 17, 38, 0.42);
}

.nav-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 12px 14px;
}

.nav-search input::placeholder {
  color: rgba(199, 233, 255, 0.62);
}

.nav-search button {
  height: 100%;
  border: 0;
  color: white;
  cursor: pointer;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 2px;
}

main {
  padding-top: 76px;
}

.hero {
  position: relative;
  height: min(760px, calc(100vh - 76px));
  min-height: 560px;
  overflow: hidden;
  background: var(--deepblue-950);
}

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

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

.hero-bg-image,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 36%, rgba(56, 189, 248, 0.28), transparent 26rem),
    linear-gradient(90deg, rgba(6, 17, 38, 0.94) 0%, rgba(6, 17, 38, 0.72) 42%, rgba(6, 17, 38, 0.36) 100%),
    linear-gradient(180deg, transparent 0%, rgba(6, 17, 38, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ocean-300);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.05;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid var(--line);
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 750;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 16px 38px rgba(14, 165, 233, 0.28);
}

.btn.ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.btn.text {
  color: var(--ocean-300);
  padding-inline: 4px;
}

.hero-poster {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
  aspect-ratio: 2 / 3;
  background: var(--card-strong);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 17, 38, 0.75));
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 50%;
  bottom: 28px;
  transform: translateX(50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 17, 38, 0.52);
  backdrop-filter: blur(12px);
}

.hero-controls button,
.hero-dot {
  cursor: pointer;
}

.hero-controls > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 1.7rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-dot.active {
  width: 30px;
  background: var(--ocean-300);
}

.section {
  padding: 70px 0;
}

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

.section-head h2,
.detail-text h2,
.filter-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-more {
  color: var(--ocean-300);
  font-weight: 700;
}

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

.category-chip {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(18, 48, 95, 0.9), rgba(10, 26, 53, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.24), transparent 10rem);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover,
.category-overview-card:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.42);
}

.category-chip strong {
  font-size: 1.25rem;
}

.category-chip span,
.category-chip small {
  color: var(--text-muted);
  line-height: 1.7;
}

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

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--deepblue-800);
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

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

.movie-card-body h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card-body p {
  min-height: 50px;
  margin: 10px 0 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.card-meta span {
  padding: 5px 8px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.75rem;
}

.rank-strip {
  background:
    linear-gradient(90deg, rgba(10, 26, 53, 0.86), rgba(13, 83, 98, 0.68)),
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.14), transparent 18rem);
  border-block: 1px solid var(--line);
}

.mini-rank-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 178px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--ocean-500) transparent;
}

.mini-rank-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(6, 17, 38, 0.5);
}

.mini-rank-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.mini-rank-card span {
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-rank-card small {
  color: var(--text-muted);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(10, 26, 53, 0.96), rgba(6, 17, 38, 0.98));
}

.small-hero {
  min-height: 330px;
}

.ranking-hero {
  background:
    radial-gradient(circle at 22% 0%, rgba(56, 189, 248, 0.24), transparent 25rem),
    linear-gradient(135deg, rgba(8, 30, 58, 0.97), rgba(8, 73, 80, 0.86));
}

.page-hero-inner {
  padding: 60px 0;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.category-links-inline a {
  padding: 8px 12px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-copy h2 {
  margin: 0;
  font-size: 1.8rem;
}

.category-overview-copy p {
  color: var(--text-muted);
  line-height: 1.8;
}

.inside-card {
  grid-auto-columns: 150px;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(10, 26, 53, 0.76);
}

.filter-title {
  margin-bottom: 16px;
  font-size: 1.2rem;
  font-weight: 800;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 0.8fr));
  gap: 12px;
}

.filter-row label {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: white;
  background: rgba(6, 17, 38, 0.7);
  padding: 0 12px;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 74px 128px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.rank-cover img {
  width: 128px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy h2 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.rank-copy p {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.65;
}

.rank-btn {
  min-width: 90px;
}

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

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: var(--deepblue-800);
  aspect-ratio: 2 / 3;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--ocean-300);
}

.large-meta {
  margin-top: 18px;
  font-size: 0.92rem;
}

.detail-tags {
  margin-top: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: white;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(6, 17, 38, 0.12), rgba(6, 17, 38, 0.68));
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: white;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.35);
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-columns article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.detail-columns p {
  color: var(--text-soft);
  line-height: 1.95;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
  background: rgba(6, 17, 38, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.footer-brand {
  font-size: 1.28rem;
}

.site-footer p {
  color: var(--text-muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

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

.footer-links a {
  padding: 8px 12px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

[data-movie-card].hidden-by-filter {
  display: none;
}

.empty-filter-note {
  padding: 22px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

@media (max-width: 1060px) {
  .category-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(6, 17, 38, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-panel.open {
    display: grid;
    gap: 16px;
  }

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

  .nav-search input {
    width: 100%;
  }

  .hero {
    height: auto;
    min-height: 720px;
  }

  .hero-content,
  .detail-hero-inner,
  .category-overview-card,
  .detail-columns,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    align-content: center;
    padding: 56px 0 92px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: start;
  }

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

  .rank-item {
    grid-template-columns: 54px 92px minmax(0, 1fr);
  }

  .rank-btn {
    grid-column: 1 / -1;
  }

  .rank-number {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .rank-cover img {
    width: 92px;
  }
}

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

  .section {
    padding: 46px 0;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 2.25rem;
  }

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 0.98rem;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .movie-card-body p {
    min-height: auto;
  }

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

  .detail-hero-inner {
    padding: 42px 0;
  }

  .detail-poster {
    width: min(240px, 75vw);
  }

  .player-shell {
    border-radius: var(--radius-md);
  }
}
