:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #3b82f6;
  --pink: #ec4899;
  --orange: #f97316;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
body.nav-open .site-header {
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.26);
}

.site-nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.32);
}

.brand-name {
  background: linear-gradient(135deg, #ffffff, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted-strong);
  font-weight: 700;
  font-size: 14px;
}

.nav-link {
  position: relative;
  padding: 10px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--cyan);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-search {
  padding: 9px 16px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
}

.nav-search::after {
  display: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 76px 0 0 0;
  padding: 20px 24px 40px;
  background: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(20px);
  overflow-y: auto;
}

.mobile-nav-link {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--muted-strong);
  font-weight: 800;
}

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

main {
  min-height: 70vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transform: scale(1.035);
  transition: opacity 1s ease, visibility 1s ease, transform 3.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 45%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 76px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.subpage-hero h1,
.category-hero-content h1,
.detail-info h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-summary,
.category-hero-content p,
.subpage-hero p,
.detail-one-line {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.meta-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.12);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.hero-actions,
.detail-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 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

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

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

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.52);
  color: #ffffff;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  color: #ffffff;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.58);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 28px;
  margin-top: -56px;
  position: relative;
  z-index: 6;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.quick-search-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.home-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-search input,
.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
}

.home-search input:focus,
.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.home-search button {
  min-height: 48px;
  padding: 0 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--cyan);
  color: #082f49;
  font-weight: 900;
}

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

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

.section-heading p {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading a,
.category-preview-head a {
  color: var(--cyan);
  font-weight: 900;
}

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

.movie-grid-large {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.movie-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(15, 23, 42, 0.9);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster-frame img,
.mini-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

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

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.movie-card-body strong {
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body small {
  color: var(--muted);
  line-height: 1.45;
}

.movie-card-body em {
  min-height: 42px;
  color: var(--muted-strong);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

.ranking-band {
  margin-top: 76px;
  padding-bottom: 76px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.22)),
    radial-gradient(circle at center left, rgba(34, 211, 238, 0.12), transparent 32rem);
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.ranking-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.movie-card-horizontal {
  flex-direction: row;
  min-height: 144px;
}

.movie-card-horizontal .poster-frame {
  width: 118px;
  min-width: 118px;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-card-body {
  flex: 1;
  justify-content: center;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.category-preview-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.category-preview-card,
.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.category-preview-card {
  padding: 20px;
}

.category-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.category-preview-head h3,
.category-card strong {
  margin: 0 0 6px;
  font-size: 22px;
}

.category-preview-head p,
.category-card em {
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.7;
}

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

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

.mini-card img {
  width: 74px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.35s ease;
}

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

.mini-card small,
.category-card small {
  color: var(--muted);
}

.subpage-hero {
  padding: 150px 0 20px;
}

.subpage-hero h1 {
  margin-bottom: 18px;
}

.listing-tools {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 145, 178, 0.36);
}

.result-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transition: transform 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.2));
}

.category-number,
.category-card-content {
  position: relative;
  z-index: 2;
}

.category-number {
  position: absolute;
  top: 22px;
  left: 22px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 44px;
  font-weight: 900;
}

.category-card-content {
  display: grid;
  gap: 8px;
}

.category-hero {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.category-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 70%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.24));
}

.category-hero-content {
  position: relative;
  z-index: 2;
  padding: 128px 0 54px;
}

.breadcrumb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: 136px 0 52px;
}

.detail-cover {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info {
  min-width: 0;
}

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

.player-section {
  padding: 0 0 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.2)),
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 38%);
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.28);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

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

.detail-article,
.detail-meta-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.detail-article {
  padding: clamp(22px, 4vw, 34px);
}

.detail-article h2,
.detail-meta-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.95;
}

.detail-meta-card {
  padding: 24px;
  position: sticky;
  top: 96px;
}

.detail-meta-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
  margin: 0 0 20px;
}

.detail-meta-card dt {
  color: var(--muted);
}

.detail-meta-card dd {
  margin: 0;
  color: #ffffff;
}

.detail-meta-card a {
  color: var(--cyan);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 32px;
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

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

  .detail-cover {
    max-width: 340px;
  }

  .detail-meta-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .container-wide {
    width: min(100% - 24px, 1180px);
  }

  .site-nav {
    height: 68px;
  }

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .mobile-nav {
    inset: 68px 0 0 0;
  }

  .hero-carousel,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .hero-summary,
  .category-hero-content p,
  .subpage-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .hero-controls {
    right: 16px;
    bottom: 24px;
  }

  .quick-search-panel {
    margin-top: 18px;
    padding: 20px;
  }

  .home-search {
    flex-direction: column;
    align-items: stretch;
  }

  .section-block {
    padding-top: 52px;
  }

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

  .movie-grid,
  .movie-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .movie-card-body strong {
    font-size: 14px;
  }

  .movie-card-body em {
    display: none;
  }

  .ranking-grid,
  .ranking-grid-wide,
  .category-preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    min-height: 132px;
  }

  .movie-card-horizontal .poster-frame {
    width: 104px;
    min-width: 104px;
  }

  .subpage-hero {
    padding-top: 116px;
  }

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

  .category-hero-content {
    padding-top: 110px;
  }

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

  .movie-player {
    min-height: 210px;
  }
}
