:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 2%, rgba(59, 130, 246, 0.24), transparent 34rem),
    radial-gradient(circle at 84% 12%, rgba(34, 211, 238, 0.15), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.32);
}

.nav-container,
.footer-inner,
.section,
.hero-content,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-container {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #e2e8f0;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.text-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.text-link:hover {
  color: #60a5fa;
}

.site-search-form {
  position: relative;
  width: min(280px, 100%);
}

.site-search-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 999px;
  padding: 12px 48px 12px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-form input:focus,
.filter-bar input:focus {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.site-search-form button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.mobile-search {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-backdrop,
.detail-hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.66) 52%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 62%, rgba(2, 6, 23, 0.52) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 48px;
  align-items: end;
  padding: 130px 0 92px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.section-heading p,
.detail-one-line {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.06rem;
}

.hero-tags,
.detail-tags,
.movie-card-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags a,
.movie-card-tags span,
.filter-chips button {
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.3);
  padding: 7px 12px;
  font-size: 0.82rem;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  color: #cbd5e1;
  margin-top: 18px;
}

.hero-meta span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 7px 12px;
  font-size: 0.85rem;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.ghost-button {
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.26);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.14);
  transform: translateY(8px);
}

.hero-poster span,
.play-badge {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: white;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.34);
}

.hero-poster span {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.42);
}

.hero-dots button.active {
  width: 32px;
  border-radius: 999px;
  background: #60a5fa;
}

.section {
  padding: 72px 0 0;
}

.section-overlap {
  margin-top: -34px;
  position: relative;
  z-index: 4;
}

.section-heading {
  margin-bottom: 28px;
  max-width: 780px;
}

.section-heading h2,
.content-panel h2 {
  margin: 10px 0;
  font-size: clamp(1.7rem, 3.4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.split-heading {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.text-link {
  color: #93c5fd;
  font-weight: 800;
}

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

.movie-card,
.wide-card,
.rank-item,
.category-card,
.category-overview-card,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px) scale(1.01);
  border-color: rgba(96, 165, 250, 0.36);
  box-shadow: 0 22px 60px rgba(37, 99, 235, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.25), rgba(15, 23, 42, 0.92));
}

.poster-frame img,
.wide-cover img,
.rank-thumb img,
.hero-poster img,
.detail-poster img,
.category-preview img {
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-frame img,
.wide-card:hover .wide-cover img,
.rank-item:hover .rank-thumb img,
.category-overview-card:hover .category-preview img {
  transform: scale(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82));
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  z-index: 2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-card h3,
.wide-card h3,
.rank-item h3,
.category-card h3,
.category-overview-card h2 {
  margin: 10px 0 8px;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover,
.rank-item h3 a:hover,
.category-overview-card h2 a:hover {
  color: #60a5fa;
}

.movie-card p,
.wide-card p,
.rank-item p,
.category-card p,
.category-overview-card p,
.content-panel p,
.site-footer p {
  color: var(--soft);
  line-height: 1.68;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.3em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.9rem;
}

.movie-card-tags {
  min-height: 30px;
}

.movie-card-tags span {
  padding: 5px 9px;
  font-size: 0.72rem;
}

.movie-meta {
  gap: 6px;
  margin-top: 12px;
}

.movie-meta span {
  padding: 5px 8px;
  font-size: 0.76rem;
}

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

.category-card {
  padding: 26px;
  min-height: 180px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.38);
}

.feature-section {
  position: relative;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
  align-items: center;
}

.wide-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #bfdbfe;
  font-weight: 900;
  background: rgba(30, 64, 175, 0.42);
}

.rank-thumb {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: 86px max(16px, calc((100vw - 1180px) / 2)) 72px;
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.34), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.42));
}

.compact-hero h1 {
  max-width: 900px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}

.filter-chips button {
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  padding: 18px;
  align-items: center;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  height: 180px;
  overflow: hidden;
  border-radius: 18px;
}

.category-preview img {
  border-radius: 14px;
}

.detail-hero {
  min-height: 620px;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.breadcrumb a {
  color: #93c5fd;
}

.detail-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  box-shadow: var(--shadow);
}

.detail-info {
  max-width: 780px;
}

.detail-info h1 {
  margin-bottom: 16px;
}

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

.detail-section {
  padding-top: 46px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.42));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  font-size: 1.55rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.42);
}

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

.content-panel {
  padding: 30px;
}

.content-panel p {
  font-size: 1.02rem;
  color: #d1d5db;
}

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

.site-footer {
  margin-top: 76px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 48px 0 32px;
}

.footer-inner h3 {
  margin: 0 0 14px;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: #94a3b8;
}

.footer-inner a:hover {
  color: #60a5fa;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
  }

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .nav-container > .site-search-form {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 100px 0 86px;
  }

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

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

  .wide-grid,
  .rank-list,
  .full-rank,
  .footer-inner,
  .filter-bar,
  .category-overview-card,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 130px 1fr;
  }

  .category-preview {
    height: 150px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }
}

@media (max-width: 560px) {
  .nav-container,
  .footer-inner,
  .section,
  .hero-content,
  .detail-hero-inner,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .site-logo {
    font-size: 1.12rem;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2.15rem, 12vw, 3.4rem);
  }

  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .wide-card,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-thumb {
    width: 120px;
  }

  .page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }
}
