:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 82% 6%, rgba(168, 85, 247, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: 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%;
}

.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,
.footer-inner,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.25);
}

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

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--soft);
  font-weight: 700;
  transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 1.2rem;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 30px auto 42px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(168, 85, 247, 0.14));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 42px;
  align-items: center;
  min-height: 620px;
  padding: 62px;
  opacity: 0;
  transform: translateX(36px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.24) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
  opacity: 0.62;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 1;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(2.35rem, 5.4vw, 5.35rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 1.08rem;
  line-height: 1.86;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-tags span,
.tag-list span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--soft);
  font-size: 0.78rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.3);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hero-visual {
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-visual img,
.poster-link img,
.detail-poster img,
.player-poster img,
.compact-card img,
.rank-list img,
.category-cover-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  right: 34px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-control,
.hero-dots button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  font-size: 1.8rem;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: 0.2s ease;
}

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

.search-panel,
.page-hero,
.section-block,
.ranking-card,
.category-overview-card,
.detail-article,
.related-panel,
.watch-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: center;
  gap: 24px;
  margin: 0 0 46px;
  padding: 26px;
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
}

.search-box span {
  color: var(--cyan);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
}

.search-box input::placeholder {
  color: rgba(203, 213, 225, 0.58);
}

.section-block {
  margin-bottom: 46px;
  padding: 30px;
}

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

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

.section-heading a,
.text-link {
  color: #67e8f9;
  font-weight: 900;
}

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

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

.library-grid {
  align-items: stretch;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 0.8rem;
}

.split-block {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 28px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile {
  display: block;
  padding: 22px;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.category-tile span,
.category-overview-card p,
.page-hero p,
.detail-copy p,
.detail-article p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.78;
}

.ranking-card {
  padding: 24px;
}

.ranking-card ol,
.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-card li a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.36);
}

.ranking-card li span,
.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--pink));
  color: #ffffff;
  font-weight: 900;
}

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

.ranking-card em,
.rank-list em,
.compact-card em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.page-main {
  padding: 30px 0 54px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 42px;
}

.page-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.slim-hero {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(168, 85, 247, 0.14)),
    rgba(15, 23, 42, 0.72);
}

.inline-search {
  max-width: 520px;
  margin-top: 22px;
}

.category-overview-card {
  overflow: hidden;
}

.category-overview-card div {
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 180px;
  overflow: hidden;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.filter-bar button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--soft);
  cursor: pointer;
  font-weight: 800;
}

.filter-bar button.active {
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(59, 130, 246, 0.22));
  color: #ffffff;
}

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

.breadcrumb a {
  color: #67e8f9;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72)),
    var(--detail-image) center / cover no-repeat;
  opacity: 0.7;
  filter: blur(0.5px) saturate(1.08);
}

.detail-poster,
.detail-copy {
  position: relative;
  z-index: 1;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 20px 68px rgba(0, 0, 0, 0.48);
}

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.watch-section {
  margin-bottom: 28px;
  padding: 24px;
}

.watch-section h2 {
  margin: 0 0 16px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
}

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

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.76));
}

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

.play-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 22px 70px rgba(59, 130, 246, 0.35);
}

.play-button span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-article,
.related-panel {
  padding: 28px;
}

.detail-article h2 {
  margin: 0 0 14px;
}

.detail-article p + h2 {
  margin-top: 30px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: var(--text);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
}

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

.rank-section {
  min-width: 0;
}

.rank-list li a {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-list img {
  width: 54px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
}

.rank-list strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-brand {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  color: #67e8f9;
  font-weight: 800;
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .rank-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-visual {
    display: none;
  }

  .detail-hero {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .footer-inner,
  main {
    width: min(100% - 24px, 1180px);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    top: 74px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.94);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    border-radius: 12px;
  }

  .hero,
  .hero-slide {
    min-height: 540px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-controls {
    left: 28px;
    right: auto;
  }

  .search-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .section-block,
  .page-hero,
  .detail-hero,
  .watch-section,
  .detail-article,
  .related-panel {
    padding: 20px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-list li a {
    grid-template-columns: 38px 50px 1fr;
  }
}
