:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --sky: #0ea5e9;
  --sky-2: #0284c7;
  --blue: #2563eb;
  --orange: #f97316;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #fff;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

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

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

.nav-link,
.footer-links a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.footer-links a:hover {
  color: #fff;
  background: rgba(14, 165, 233, 0.15);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.hero {
  position: relative;
  height: min(82vh, 780px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 72%, rgba(2, 6, 23, 0.84) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 38%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1280px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  max-width: 1280px;
}

.hero-content > * {
  max-width: 680px;
}

.hero-badges,
.hero-tags,
.detail-meta,
.meta-line,
.card-kicker,
.card-tags,
.detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span,
.card-tags span,
.detail-tags span,
.hero-tags span,
.meta-line span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.66);
  color: #dbeafe;
  padding: 5px 10px;
  font-size: 0.82rem;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.55rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-content p {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.8;
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(14, 165, 233, 0.12);
}

.text-button {
  color: #7dd3fc;
  background: transparent;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(14, 165, 233, 0.7);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--sky);
}

.hero-quick-links {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-quick-links a {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 8px 12px;
  font-size: 0.88rem;
}

.content-section,
.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 58px 0;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.highlight-copy h2,
.detail-section h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-heading p,
.page-hero p,
.highlight-copy p,
.detail-copy .lead,
.detail-section p,
.footer-inner p,
.category-card-large p,
.category-tile small {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.14), 0 18px 38px rgba(0, 0, 0, 0.34);
}

.card-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.card-poster figcaption {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.poster-chip,
.rank-badge {
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #fff;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.rank-badge {
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  padding: 18px;
}

.card-kicker {
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-kicker span + span::before {
  content: "•";
  margin-right: 8px;
  color: var(--muted-2);
}

.card-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  margin-top: auto;
}

.card-tags span {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  font-size: 0.75rem;
}

.small-card .card-poster {
  aspect-ratio: 16 / 9;
}

.horizontal-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 16px;
  scrollbar-width: thin;
}

.horizontal-row .movie-card {
  flex: 0 0 330px;
}

.highlight-section {
  padding-top: 24px;
}

.highlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.highlight-poster {
  min-height: 420px;
  background: #0f172a;
}

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

.highlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
}

.highlight-copy h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.meta-line {
  margin: 12px 0 28px;
}

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

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

.category-tile,
.category-card-large > a {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.64));
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover,
.category-card-large > a:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(37, 99, 235, 0.18));
}

.category-tile span,
.category-card-large h2 {
  font-weight: 900;
  font-size: 1.15rem;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.13);
  font-size: 0.84rem;
}

.page-main {
  padding: 36px 0 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 24px 0 22px;
  padding: clamp(34px, 8vw, 76px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.20), rgba(37, 99, 235, 0.08)),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

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

.compact-hero p,
.ranking-hero p {
  max-width: 720px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.category-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  padding: 9px 13px;
}

.category-pill.active,
.category-pill:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(14, 165, 233, 0.18);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.7);
  color: #fff;
  padding: 0 16px;
}

.search-box input:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  color: #cbd5e1;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.2);
}

.empty-state {
  display: none;
  margin-top: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  color: #cbd5e1;
  padding: 28px;
  text-align: center;
}

.empty-state.visible {
  display: block;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin: 12px 0 22px;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  margin: 0 0 38px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.18), transparent 24rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  background: #0f172a;
}

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

.detail-copy h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.03;
}

.detail-copy .lead {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: 1.08rem;
}

.detail-meta,
.detail-tags {
  margin: 14px 0;
}

.player-section {
  margin: 0 0 40px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.56) 50%, rgba(2, 6, 23, 0.78) 100%);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.36);
  font-size: 1.85rem;
  padding-left: 5px;
}

.detail-section {
  margin: 0 0 28px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-section h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.7);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.footer-inner p {
  margin: 0;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .hero-quick-links {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 620px;
    height: 74vh;
  }

  .hero-content {
    top: 52%;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding: 42px 0;
  }

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

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

  .highlight-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .highlight-poster {
    min-height: 280px;
  }

  .detail-poster {
    max-width: 360px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .content-section,
  .page-main,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    min-height: 590px;
  }

  .hero-content h1 {
    font-size: 2.35rem;
  }

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

  .primary-button,
  .ghost-button,
  .text-button {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .four-grid,
  .library-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-row .movie-card {
    flex-basis: 280px;
  }

  .page-hero,
  .detail-hero,
  .detail-section,
  .filter-panel {
    border-radius: 22px;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
