:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.20);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #60a5fa;
  --orange: #fb923c;
  --violet: #a78bfa;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(8, 145, 178, 0.24), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(8, 145, 178, 0.10);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

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

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-title {
  font-size: 24px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
  transform: translateY(-1px);
}

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

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

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.page-shell {
  padding-top: 76px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 1s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 28%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.46fr);
  align-items: end;
  gap: 48px;
  padding-bottom: 82px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.inner-hero span,
.section-head span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2.2vw, 20px);
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.13);
  color: var(--muted-strong);
  font-size: 14px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}

.hero-tags span,
.detail-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 13px;
}

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

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

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

.button.primary {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: white;
  box-shadow: 0 16px 42px rgba(8, 145, 178, 0.34);
}

.button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  transform: translateY(20px);
}

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

.hero-arrow {
  position: absolute;
  right: 38px;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: white;
  font-size: 32px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hero-arrow.prev {
  bottom: 130px;
}

.hero-arrow.next {
  bottom: 74px;
}

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

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

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

.quick-search-panel {
  position: relative;
  z-index: 8;
  margin-top: -36px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-panel.compact-panel {
  margin-top: 28px;
  grid-template-columns: 1fr;
}

.search-copy h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 32px);
}

.search-copy p {
  margin: 0;
  color: var(--muted);
}

.search-control {
  display: flex;
  gap: 12px;
}

.search-control.full {
  width: 100%;
}

.movie-search,
.movie-filter {
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
  outline: none;
}

.movie-search {
  width: 100%;
  padding: 0 16px;
}

.movie-filter {
  min-width: 168px;
  padding: 0 12px;
}

.movie-search:focus,
.movie-filter:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.category-pills {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
  color: var(--cyan);
  border-color: var(--line);
  transform: translateY(-1px);
}

.content-section {
  margin-top: 74px;
}

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

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 22px 60px rgba(8, 145, 178, 0.18);
}

.movie-card.is-hidden {
  display: none;
}

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

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  color: white;
  background: rgba(8, 145, 178, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #0b1020;
  background: linear-gradient(135deg, #facc15, var(--orange));
  box-shadow: 0 10px 28px rgba(251, 146, 60, 0.36);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

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

.card-meta {
  color: var(--muted-strong);
  font-size: 13px;
}

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

.card-tags {
  margin-top: 9px;
  color: rgba(34, 211, 238, 0.78);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-box,
.soft-panel {
  padding: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.34));
}

.category-showcase {
  display: grid;
  gap: 30px;
}

.category-strip-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.category-strip-title h3 {
  margin: 0;
  color: var(--cyan);
  font-size: 21px;
}

.category-strip-title a {
  color: var(--muted-strong);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.inner-hero {
  padding: 92px 0 64px;
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.23), rgba(2, 6, 23, 0)),
    radial-gradient(circle at 85% 10%, rgba(96, 165, 250, 0.20), transparent 26%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.inner-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.04em;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.small-actions {
  margin-top: 26px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
}

.category-card-main {
  display: block;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.88));
}

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

.category-card-main h2 {
  margin: 12px 0 10px;
  font-size: 28px;
}

.category-card-main p {
  margin: 0;
  color: var(--muted-strong);
}

.category-sample {
  display: grid;
  gap: 8px;
  padding: 20px 28px 24px;
}

.category-sample a {
  color: var(--muted-strong);
}

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

.rank-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: -32px;
  position: relative;
  z-index: 3;
}

.rank-feature {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.rank-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.rank-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.rank-feature span {
  color: #fde68a;
  font-weight: 900;
}

.rank-feature h2 {
  margin: 8px 0;
  font-size: 28px;
}

.rank-feature p {
  margin: 0;
  color: var(--muted-strong);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 58px;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-cover);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.12);
  transform: scale(1.12);
  opacity: 0.28;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.64), #020617 100%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.20), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #001018;
  font-size: 34px;
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.48);
}

.player-cover strong {
  max-width: min(640px, 90%);
  font-size: clamp(20px, 4vw, 38px);
  text-align: center;
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.text-panel {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
}

.site-footer {
  margin-top: 86px;
  padding: 46px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

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

.footer-brand {
  display: inline-block;
  color: var(--cyan);
  font-size: 24px;
}

.site-footer p {
  max-width: 360px;
  color: var(--muted);
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

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

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

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

  .hero-poster {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }

  .search-control {
    flex-direction: column;
  }

  .movie-filter {
    width: 100%;
  }

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

  .feature-box,
  .soft-panel {
    padding: 20px;
  }

  .category-page-grid,
  .rank-feature-grid,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .detail-one-line,
  .inner-hero p {
    font-size: 15px;
  }

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

  .card-body h3 {
    font-size: 17px;
  }

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

  .player-icon {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
