:root {
  --color-night: #0f172a;
  --color-night-soft: #1a1f35;
  --color-panel: rgba(15, 23, 42, 0.82);
  --color-panel-strong: rgba(30, 41, 59, 0.9);
  --color-moon: #6172f3;
  --color-moon-light: #a5bbfc;
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
  --color-line: rgba(148, 163, 184, 0.16);
  --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.32);
  --radius-large: 28px;
  --radius-medium: 20px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at 18% 8%, rgba(97, 114, 243, 0.35), transparent 32rem),
    radial-gradient(circle at 92% 16%, rgba(129, 150, 248, 0.22), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #6172f3, #a5bbfc);
  box-shadow: 0 12px 30px rgba(97, 114, 243, 0.4);
}

.brand-text {
  font-size: 1.2rem;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(97, 114, 243, 0.22);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.big-search input,
.search-filter-bar input,
.search-filter-bar select {
  width: 100%;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input {
  padding: 10px 14px;
}

.header-search button,
.big-search button,
.primary-button,
.ghost-button,
.text-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.big-search button,
.primary-button {
  color: white;
  background: linear-gradient(135deg, #6172f3, #8196f8);
  box-shadow: 0 14px 38px rgba(97, 114, 243, 0.34);
}

.header-search button {
  padding: 10px 16px;
}

.primary-button,
.ghost-button {
  padding: 13px 22px;
  font-weight: 700;
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.big-search button:hover,
.text-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--color-line);
  background: rgba(15, 23, 42, 0.7);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: white;
}

.mobile-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  border-top: 1px solid var(--color-line);
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1.4s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 38%, rgba(15, 23, 42, 0.15) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, transparent 36%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 140px;
  width: min(720px, calc(100vw - 48px));
  z-index: 3;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--color-moon-light);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.quick-links,
.pill-row,
.chip-row,
.tag-row,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-controls {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 88px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: white;
}

.hero-search-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 82px;
  z-index: 6;
  width: min(410px, calc(100vw - 48px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-large);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px);
}

.hero-search-panel strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.3rem;
}

.hero-search-panel form,
.big-search {
  display: flex;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  overflow: hidden;
}

.hero-search-panel input,
.big-search input {
  padding: 14px 18px;
}

.big-search button {
  min-width: 110px;
  border-radius: 0;
}

.quick-links {
  margin-top: 14px;
}

.quick-links a,
.pill,
.search-chip,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

.content-section:last-of-type {
  padding-bottom: 70px;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-more,
.text-button {
  color: var(--color-moon-light);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.story-card,
.filter-panel,
.player-shell {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.category-card {
  min-height: 150px;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  bottom: -36px;
  border-radius: 50%;
  background: rgba(97, 114, 243, 0.24);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card small {
  color: var(--color-muted);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(165, 187, 252, 0.45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

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

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

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

.movie-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.movie-meta span {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 0.72rem;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  min-height: 62px;
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.58;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: var(--color-moon-light);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 80px max(24px, calc((100vw - 1280px) / 2 + 24px));
  border-bottom: 1px solid var(--color-line);
  background:
    radial-gradient(circle at 20% 20%, rgba(97, 114, 243, 0.35), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.88));
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 0.9fr 2.1fr;
  gap: 22px;
  padding: 22px;
}

.category-overview-text {
  padding: 12px;
}

.category-overview-text h2 {
  margin: 10px 0;
  font-size: 2rem;
}

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

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

.mini-movie-grid .movie-card-body p,
.mini-movie-grid .tag-row,
.mini-movie-grid .movie-meta {
  display: none;
}

.filter-panel {
  padding: 22px;
}

.search-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-top: 18px;
}

.search-filter-bar input,
.search-filter-bar select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
}

.pill,
.search-chip {
  min-height: 38px;
  padding: 7px 13px;
  cursor: pointer;
}

.pill.is-active,
.search-chip:hover {
  color: white;
  background: rgba(97, 114, 243, 0.28);
  border-color: rgba(165, 187, 252, 0.35);
}

.detail-hero {
  min-height: 560px;
  padding-top: 92px;
  padding-bottom: 60px;
}

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.92)),
    linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 46%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-large);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-card);
  background: #1e293b;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--color-muted);
}

.detail-meta {
  margin: 18px 0;
}

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

.player-section {
  padding-top: 42px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: white;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.3), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6172f3, #a5bbfc);
  box-shadow: 0 18px 42px rgba(97, 114, 243, 0.42);
}

.story-card {
  padding: 30px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 1.6rem;
}

.story-card h2:not(:first-child) {
  margin-top: 28px;
}

.story-card p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 1.04rem;
}

.big-search {
  width: min(760px, 100%);
  margin-top: 24px;
}

.chip-row {
  margin-top: 16px;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--color-line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.footer-inner p,
.footer-copy {
  color: var(--color-muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 34px;
  font-size: 0.9rem;
}

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

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

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

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

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    bottom: 300px;
  }

  .hero-search-panel {
    left: 24px;
    right: 24px;
    bottom: 70px;
    width: auto;
  }

  .hero-controls {
    bottom: 32px;
  }

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

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

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

  .search-filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content {
    left: 16px;
    width: calc(100vw - 32px);
  }

  .hero-search-panel {
    left: 16px;
    right: 16px;
  }

  .movie-grid,
  .rank-grid,
  .mini-movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .movie-card p,
  .tag-row {
    display: none;
  }

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