:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --pink: #f472b6;
  --green: #34d399;
  --shadow: 0 28px 90px rgba(2, 6, 23, 0.55);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

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

.brand-text,
.footer-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #67e8f9, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.12);
}

.top-search {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.top-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  padding: 8px 0 8px 12px;
}

.top-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  cursor: pointer;
  min-width: max-content;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn {
  color: #05101f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.28);
}

.top-search button {
  padding: 8px 14px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
}

.secondary-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover,
.top-search button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-cats a,
.tag-row span,
.hero-tags span,
.detail-tags span,
.movie-meta span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
}

.mobile-cats a {
  padding: 8px 12px;
}

.hero-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 28px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 36px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 48px;
  padding: 72px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.18) blur(1px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 22%, rgba(34, 211, 238, 0.24), transparent 24rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.4));
}

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

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

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

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  color: #e0f2fe;
}

.hero-content h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.9;
}

.hero-tag-row {
  margin: 22px 0 0;
}

.tag-row span {
  padding: 6px 10px;
  color: #bae6fd;
  font-size: 13px;
}

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

.hero-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-card span {
  display: block;
  padding: 18px;
  color: #e0f2fe;
  font-weight: 800;
  text-align: center;
}

.hero-controls {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 52px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.quick-panel {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.quick-panel a,
.category-card,
.category-overview-card,
.movie-card,
.ranking-box,
.page-hero,
.detail-hero,
.player-section,
.detail-text,
.video-wrap {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.32);
}

.quick-panel a,
.category-card {
  padding: 22px;
  border-radius: 24px;
}

.quick-panel strong,
.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.quick-panel span,
.category-card small,
.category-card div span,
.site-footer p,
.movie-card p,
.page-hero p,
.detail-info p,
.player-caption p,
.detail-text p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.content-section,
.page-main,
.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin: 58px auto;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-caption h2,
.detail-text h2,
.category-overview-head h2 {
  margin: 8px 0 0;
  letter-spacing: -0.04em;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

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

.category-card {
  min-height: 178px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card div {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.category-card div span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-bar input,
.filter-bar select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
  filter: saturate(1.16);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #06111f;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.movie-body {
  padding: 16px;
}

.movie-meta {
  margin-bottom: 10px;
}

.movie-meta span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.movie-card h3 {
  min-height: 52px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-box a:hover,
.inline-links a:hover {
  color: #67e8f9;
}

.movie-card p {
  display: -webkit-box;
  min-height: 75px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 14px;
}

.category-pill {
  margin-top: 12px;
  padding: 7px 10px;
  color: #e0f2fe;
  font-size: 13px;
}

.ranking-box {
  position: sticky;
  top: 96px;
  border-radius: 28px;
  padding: 24px;
}

.ranking-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ranking-head span,
.rank-number {
  display: grid;
  place-items: center;
  color: #05101f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.ranking-head span {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.ranking-head h2 {
  margin: 0;
}

.ranking-head a {
  margin-left: auto;
  color: #67e8f9;
  font-size: 14px;
}

.ranking-box ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-box li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ranking-box li span {
  color: #67e8f9;
  font-weight: 900;
}

.ranking-box li a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-box li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  padding: 54px;
  border-radius: 32px;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 26px;
  border-radius: 28px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

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

.compact h3 {
  min-height: auto;
  font-size: 16px;
}

.compact p,
.compact .tag-row,
.compact .category-pill {
  display: none;
}

.rank-grid {
  display: grid;
  gap: 16px;
}

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  font-size: 20px;
}

.rank-card .poster-link {
  border-radius: 18px;
}

.rank-card .poster-link img {
  aspect-ratio: 16 / 10;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 28px 0 16px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

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

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

.player-section {
  margin-top: 30px;
  overflow: hidden;
  border-radius: 34px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 34px 34px 0 0;
  background: #000;
}

.video-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

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

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #05101f;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 70px rgba(34, 211, 238, 0.55);
}

.player-caption {
  padding: 24px 28px 30px;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
  padding: 28px;
  border-radius: 30px;
}

.detail-text h2,
.player-caption h2 {
  font-size: 26px;
}

.detail-related {
  margin-top: 42px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.inline-links a {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.64);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.no-match {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 56px;
  }

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

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

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

  .ranking-box {
    position: static;
  }
}

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

  .main-nav {
    display: none;
  }

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

  .hero-slider {
    min-height: 720px;
    border-radius: 28px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    gap: 24px;
    padding: 36px 24px 92px;
  }

  .hero-card {
    width: 190px;
    transform: rotate(0);
  }

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

  .quick-panel,
  .category-grid,
  .movie-grid,
  .mini-grid,
  .filter-bar,
  .footer-inner,
  .detail-hero,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .category-overview-head,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .page-hero,
  .detail-hero,
  .detail-text,
  .category-overview-card {
    padding: 24px;
    border-radius: 26px;
  }

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

  .rank-number {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
  }

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