:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --line: rgba(148, 163, 184, 0.16);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --blue: #3b82f6;
  --orange: #f97316;
  --radius: 22px;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.48));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.28);
  color: white;
  font-size: 16px;
}

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

.nav-cats {
  margin-left: 0;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.desktop-nav a {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  cursor: pointer;
}

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

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

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #dbeafe;
}

.mobile-nav a:hover {
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  padding: 110px 0 54px;
}

.hero-slide {
  display: none;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  position: relative;
  align-items: center;
  gap: 48px;
}

.hero-slide.active {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
  animation: fadeIn 0.6s ease both;
}

.hero-backdrop {
  position: absolute;
  inset: -100px -8vw -70px;
  z-index: -2;
  opacity: 0.34;
  filter: blur(2px) saturate(1.1);
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.96)),
    linear-gradient(0deg, #020617, transparent 48%);
}

.hero-backdrop img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #dbeafe;
  font-size: 13px;
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.26);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.18));
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: inherit;
  pointer-events: none;
}

.hero-dots {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 0;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 68px;
  background: var(--cyan);
}

.hero-search {
  width: min(760px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.28);
}

.hero-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hero-search div,
.search-panel {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.86);
  color: #fff;
}

.hero-search button,
.search-panel button {
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.section-block {
  padding: 64px 0;
}

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

.section-head h2,
.panel-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.panel-head a {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.14));
}

.category-tile img,
.movie-card img,
.wide-card img,
.detail-cover img,
.mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.12));
}

.tile-content {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  gap: 8px;
}

.tile-content strong {
  font-size: 21px;
}

.tile-content em {
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 20%, rgba(34, 211, 238, 0.32), transparent 34%),
    linear-gradient(135deg, #0f172a, #020617);
}

.poster-wrap.image-empty img {
  display: none;
}

.movie-card .poster-wrap {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  margin-bottom: 13px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28);
}

.movie-card img {
  transition: transform 0.55s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.wide-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.card-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.9);
  color: white;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-wrap:hover .card-play,
.movie-card:hover .card-play,
.wide-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-category,
.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  left: 10px;
  top: 10px;
  color: var(--cyan);
}

.card-year {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.card-body h2 a:hover,
.wide-body h2 a:hover,
.side-card a:hover {
  color: var(--cyan);
}

.card-body p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-meta {
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.34);
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
  color: #bae6fd;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 34px;
  align-items: start;
}

.rank-panel,
.side-card,
.content-card,
.player-card,
.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-list,
.wide-list {
  display: grid;
  gap: 14px;
}

.wide-card {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.wide-poster {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.wide-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wide-title-line h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.wide-body p {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.62;
  font-size: 14px;
}

.list-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
  font-size: 13px;
}

.sub-hero {
  padding: 130px 0 56px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96)),
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.2), transparent 28rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.sub-hero p {
  max-width: 740px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.crumb a {
  color: #dbeafe;
}

.crumb a:hover {
  color: var(--cyan);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-bar button {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  padding: 9px 14px;
  cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.13);
  color: var(--cyan);
}

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

.category-card {
  overflow: hidden;
}

.category-card-link {
  display: block;
  padding: 18px;
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mini-poster {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.category-card-body span {
  color: var(--cyan);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 650px;
  padding: 120px 0 70px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.36;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-hero-inner .crumb {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

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

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

.detail-info .primary-btn {
  margin-top: 30px;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  padding: 14px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.46));
  color: white;
  cursor: pointer;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.28);
  font-size: 30px;
}

.player-card.is-playing .play-overlay {
  display: none;
}

.content-card {
  padding: 28px;
}

.content-card p {
  margin: 16px 0 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--subtle);
}

.side-card dd {
  margin: 0;
  color: #e2e8f0;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: flex;
  gap: 10px;
  color: #dbeafe;
  line-height: 1.45;
}

.side-list a span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.search-panel {
  width: min(760px, 100%);
  margin-top: 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
}

.search-panel input {
  min-height: 52px;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.98));
}

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: var(--cyan);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-slide.active,
  .detail-hero-inner,
  .detail-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-side,
  .rank-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-top: 98px;
  }

  .hero-slide {
    min-height: auto;
  }

  .hero-slide.active {
    gap: 28px;
  }

  .hero h1,
  .sub-hero h1 {
    font-size: 40px;
  }

  .hero p,
  .sub-hero p,
  .detail-line {
    font-size: 16px;
  }

  .hero-search div,
  .search-panel {
    flex-direction: column;
  }

  .hero-search input,
  .search-panel input {
    min-height: 48px;
  }

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

  .wide-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .wide-body p {
    display: none;
  }

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

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .mobile-nav,
  .hero-slide,
  .hero-dots,
  .hero-search {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero-poster,
  .detail-cover {
    max-width: 100%;
  }

  .section-head,
  .panel-head {
    align-items: start;
    flex-direction: column;
  }

  .detail-hero {
    padding-top: 98px;
  }

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

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