:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --dark: #020617;
  --dark-soft: #0f172a;
  --accent: #06b6d4;
  --accent-strong: #0891b2;
  --pink: #ec4899;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #020617 0%, #0f172a 50%, #020617 100%);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.top-nav {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 66px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.35);
}

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

.nav-links a {
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  transition: 0.2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

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

.nav-search input,
.filter-bar input,
.filter-bar select,
.large-search input,
.search-page-form input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.nav-search input {
  width: 210px;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.11);
}

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

button,
.btn,
.nav-search button,
.large-search button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-search button,
.large-search button,
.search-page-form button,
.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.26);
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 9px 12px;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 20%, rgba(236, 72, 153, 0.24), transparent 36%),
    radial-gradient(circle at 20% 70%, rgba(6, 182, 212, 0.26), transparent 34%),
    linear-gradient(120deg, #020617, #111827 48%, #0f172a);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.08) contrast(1.06);
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 108px 24px 80px;
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.btn:hover,
.nav-search button:hover,
.large-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  width: 34px;
  background: #67e8f9;
}

.quick-search-panel,
.section-wrap,
.footer-grid,
.page-hero,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -44px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.large-search,
.search-page-form {
  display: flex;
  gap: 12px;
}

.large-search input,
.search-page-form input {
  flex: 1;
  font-size: 16px;
}

.large-search button,
.search-page-form button {
  padding: 0 24px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 13px;
  border-radius: 999px;
  color: #0f172a;
  background: #e0f2fe;
  font-size: 14px;
  font-weight: 700;
}

.section-wrap {
  padding: 56px 24px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head a,
.rank-panel-head a {
  color: var(--accent-strong);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-shell,
.detail-cover,
.ranking-poster,
.rank-cover,
.tile-bg {
  background:
    radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.32), transparent 34%),
    linear-gradient(145deg, #111827, #334155);
}

.poster-shell {
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
}

.poster-shell img,
.detail-cover img,
.ranking-poster img,
.rank-cover img,
.tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  min-height: 48px;
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.38;
}

.movie-card h3 a:hover {
  color: var(--accent-strong);
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tag-row span {
  color: #075985;
  background: #e0f2fe;
}

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

.category-tile {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  display: flex;
  align-items: end;
  border-radius: 24px;
  background: var(--dark-soft);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

.tile-bg {
  position: absolute;
  inset: 0;
}

.tile-bg img {
  opacity: 0.45;
}

.tile-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.tile-content {
  position: relative;
  z-index: 2;
  padding: 22px;
  color: #ffffff;
}

.tile-content strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.tile-content em {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  border-radius: 24px;
  padding: 18px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 900;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-cover {
  height: 84px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  margin-bottom: 6px;
  line-height: 1.35;
}

.rank-text em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.page-main {
  padding-bottom: 56px;
}

.page-hero {
  margin-top: 34px;
  border-radius: 28px;
  padding: 52px;
  color: #ffffff;
  background:
    radial-gradient(circle at 76% 20%, rgba(6, 182, 212, 0.36), transparent 30%),
    radial-gradient(circle at 18% 70%, rgba(236, 72, 153, 0.28), transparent 32%),
    linear-gradient(135deg, #020617, #111827);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border-radius: 16px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 86px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ranking-number {
  color: var(--accent-strong);
  font-size: 30px;
  font-weight: 900;
}

.ranking-poster {
  width: 86px;
  height: 114px;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-info strong,
.ranking-info em,
.ranking-info small {
  display: block;
}

.ranking-info strong {
  font-size: 20px;
  margin-bottom: 8px;
}

.ranking-info em {
  color: var(--muted);
  font-style: normal;
  margin-bottom: 8px;
}

.ranking-info small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: var(--dark);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.detail-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  padding: 74px 24px 52px;
  color: #ffffff;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  aspect-ratio: 3 / 4.1;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

.detail-line {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.video-player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.74));
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.35);
  font-size: 28px;
}

.play-layer strong {
  max-width: 80%;
  text-align: center;
  font-size: 20px;
}

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

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  padding: 46px 24px;
  color: #cbd5e1;
  background: #020617;
}

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

.footer-grid p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

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

.is-filtered-out {
  display: none;
}

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

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

  .rank-panel {
    position: static;
  }

  .nav-search {
    display: none;
  }
}

@media (max-width: 760px) {
  .top-nav {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .hero-content {
    padding: 88px 20px 100px;
    margin-left: 0;
  }

  .quick-search-panel {
    margin: -36px 14px 0;
  }

  .large-search,
  .search-page-form,
  .filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section-wrap {
    padding: 42px 14px 0;
  }

  .page-hero {
    margin: 18px 14px 0;
    padding: 34px 22px;
  }

  .filter-bar {
    display: grid;
    padding: 0 14px;
  }

  .detail-shell {
    grid-template-columns: 1fr;
    padding: 44px 16px;
  }

  .detail-cover {
    max-width: 220px;
  }

  .ranking-row {
    grid-template-columns: 44px 64px 1fr;
    gap: 12px;
  }

  .ranking-number {
    font-size: 22px;
  }

  .ranking-poster {
    width: 64px;
    height: 88px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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