:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-light: #cbd5e1;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.28);
  --radius: 22px;
}

* {
  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.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.28);
}

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

.desktop-nav,
.mobile-nav,
.footer-links,
.related-categories {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link,
.footer-links a,
.related-categories a,
.hero-quick-links a {
  color: var(--muted-light);
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.footer-links a:hover,
.related-categories a:hover,
.hero-quick-links a:hover {
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
}

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

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

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

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
}

.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-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 96px 0 180px;
}

.eyebrow,
.sub-hero span,
.section-heading span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-content h1,
.detail-intro h1 {
  max-width: 820px;
  margin: 14px 0 18px;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-content p,
.detail-intro .lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted-light);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.tag-row,
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.info-tags span {
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #cffafe;
  padding: 6px 10px;
  font-size: 0.82rem;
}

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

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

.primary-btn,
.hero-search button,
.page-search button {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.24);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
  color: var(--muted-light);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover,
.page-search button:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(260px, 460px) 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
  width: 100%;
}

.hero-search input,
.page-search input,
.local-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: rgba(2, 6, 23, 0.64);
  color: white;
  padding: 0 16px;
}

.hero-search input:focus,
.page-search input:focus,
.local-search input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.hero-quick-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--accent);
}

.section {
  padding: 74px 0;
}

.section-overlap {
  position: relative;
  z-index: 3;
  margin-top: -20px;
}

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

.section-heading h2,
.sub-hero h1,
.story-card h2,
.info-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

.small-heading h2,
.text-heading h2 {
  font-size: 1.5rem;
}

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

.category-tile {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.22);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.48;
}

.category-tile span {
  position: absolute;
  inset: auto 16px 16px;
}

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

.category-tile em,
.movie-meta-line,
.movie-card p,
.mini-card em,
.info-card dd,
.story-card p,
.sub-hero p,
.site-footer p {
  color: var(--muted);
  font-style: normal;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 58px rgba(2, 6, 23, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 22px 70px rgba(8, 145, 178, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 48%);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.94);
  color: white;
  font-size: 0.9rem;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 1.08rem;
  line-height: 1.28;
}

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

.movie-card p {
  margin: 0;
  font-size: 0.92rem;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact .tag-row span:nth-child(n+3) {
  display: none;
}

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

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--muted-light);
  padding: 10px 15px;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: rgba(34, 211, 238, 0.46);
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
}

.ranking-panel,
.story-card,
.info-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 20px;
}

.sticky-panel {
  position: sticky;
  top: 94px;
}

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

.long-list {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.mini-card {
  display: grid;
  grid-template-columns: 34px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.26);
  background: rgba(30, 41, 59, 0.68);
}

.mini-card img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

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

.mini-card strong {
  line-height: 1.35;
}

.mini-card em {
  font-size: 0.8rem;
  margin-top: 4px;
}

.mini-rank {
  color: var(--accent);
  font-weight: 900;
  text-align: center;
}

.sub-hero {
  min-height: 310px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: end;
  padding-top: 78px;
  padding-bottom: 46px;
}

.sub-hero p {
  max-width: 720px;
  font-size: 1.08rem;
}

.category-hero {
  min-height: 280px;
}

.related-categories {
  padding: 0 0 10px;
}

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

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 52%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted-light);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 540px;
  padding-bottom: 72px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.6);
}

.detail-intro h1 {
  font-size: clamp(2.2rem, 7vw, 5.6rem);
}

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

.player-card {
  padding: 14px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: black;
  aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  text-align: center;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.45)),
    rgba(2, 6, 23, 0.4);
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-orb {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.32);
  font-size: 2rem;
  text-indent: 4px;
}

.player-cover strong {
  max-width: min(720px, 86%);
  font-size: clamp(1.4rem, 4vw, 3rem);
  line-height: 1.1;
}

.player-cover em {
  max-width: min(760px, 86%);
  color: var(--muted-light);
  font-style: normal;
}

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

.story-card,
.info-card {
  padding: 26px;
}

.story-card p {
  font-size: 1.03rem;
  margin: 0 0 30px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 20px 0;
}

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

.info-card dd {
  margin: 0;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.4fr;
  gap: 28px;
  padding: 38px 0;
}

.footer-links {
  justify-content: flex-end;
}

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

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

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

  .sticky-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-content {
    min-height: 620px;
    padding: 90px 0 220px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-dots {
    justify-content: flex-start;
  }

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

  .detail-layout {
    min-height: auto;
    padding-top: 42px;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content h1,
  .detail-intro h1 {
    letter-spacing: -0.05em;
  }

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

  .section {
    padding: 50px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .story-card,
  .info-card {
    padding: 20px;
  }
}
