:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.22);
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(6, 182, 212, 0.24);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), #2563eb 50%, var(--orange));
  box-shadow: 0 0 32px rgba(6, 182, 212, 0.45);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(6, 182, 212, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slides,
.hero-slide {
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  padding: clamp(88px, 12vh, 132px) max(24px, calc((100vw - 1240px) / 2)) 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.66)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.16);
  transform: scale(1.04);
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, #020617, transparent);
  z-index: -1;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(6, 182, 212, 0.34);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 92px);
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.48);
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.8;
}

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

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

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

.hero-actions,
.detail-tags {
  margin-top: 28px;
}

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

.btn-primary,
.quick-search button {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.32);
}

.btn-secondary {
  margin-left: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.btn-primary:hover,
.btn-secondary:hover,
.quick-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.42);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.hero-backdrop {
  position: absolute;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.36), transparent 68%);
  filter: blur(6px);
}

.hero-poster-frame {
  position: relative;
  width: min(32vw, 360px);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster-frame img,
.poster-wrap img,
.detail-poster img,
.ranking-item img,
.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel,
.content-section,
.filter-panel,
.breadcrumb,
.detail-hero,
.player-section {
  width: min(1240px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search {
  display: flex;
  gap: 10px;
}

.quick-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.68);
  color: #ffffff;
  padding: 0 16px;
  outline: none;
}

.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.content-section,
.filter-panel,
.breadcrumb,
.detail-hero,
.player-section {
  margin-top: 54px;
}

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

.section-header h2,
.ranking-aside h2,
.text-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

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

.section-more {
  flex-shrink: 0;
  color: #67e8f9;
  font-weight: 900;
}

.movie-grid,
.category-grid,
.ranking-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card,
.category-card,
.ranking-aside,
.text-panel,
.filter-panel,
.detail-hero,
.video-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.16);
}

.movie-card-link {
  display: block;
  height: 100%;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  left: 10px;
}

.rank-badge {
  right: 10px;
  color: #fed7aa;
}

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

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  min-height: 44px;
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card .tag-row {
  margin-top: 12px;
  gap: 6px;
}

.movie-card .tag-row span {
  padding: 5px 7px;
  font-size: 11px;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.12);
}

.category-card {
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.38);
}

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

.category-covers img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: #0f172a;
}

.category-card-body {
  padding: 18px;
}

.category-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  min-height: 48px;
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: #67e8f9;
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.ranking-aside {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.46);
}

.ranking-item img {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
}

.ranking-num {
  color: #67e8f9;
  font-weight: 950;
}

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

.ranking-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.ranking-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 44px auto 0;
  padding: clamp(48px, 8vw, 92px);
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at right top, rgba(6, 182, 212, 0.22), transparent 30rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.filter-panel {
  padding: 18px;
}

.filter-title {
  margin-bottom: 12px;
  color: #67e8f9;
  font-weight: 900;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 180px));
  gap: 12px;
}

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

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

.breadcrumb a {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(22px, 4vw, 42px);
  background:
    radial-gradient(circle at 25% 10%, rgba(6, 182, 212, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.88);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
}

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

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

.detail-play-link {
  margin-top: 28px;
}

.player-section {
  scroll-margin-top: 92px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2), rgba(2, 6, 23, 0.62));
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 0 46px rgba(6, 182, 212, 0.52);
  font-size: 30px;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.text-panel p {
  margin: 18px 0 0;
  color: #dbeafe;
  line-height: 2;
  font-size: 16px;
}

.movie-card-compact .movie-card-body {
  min-height: 174px;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 32px;
  padding: 36px 0;
  color: var(--muted);
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 620px;
  margin: 14px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

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

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-aside {
    position: static;
  }
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 92px 20px 72px;
  }

  .hero-visual {
    min-height: 280px;
    order: -1;
  }

  .hero-poster-frame {
    width: min(52vw, 260px);
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .filter-controls {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(280px, 70vw);
    margin: 0 auto;
  }

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

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

@media (max-width: 520px) {
  .header-inner {
    min-height: 64px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }

  .movie-grid,
  .category-grid,
  .ranking-grid {
    gap: 12px;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-desc {
    display: none;
  }

  .btn-secondary {
    margin: 12px 0 0;
  }
}
