:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #111827;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(17, 24, 39, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --orange: #f97316;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --header: rgba(3, 7, 18, 0.78);
}

* {
  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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 36rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 30rem),
    var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--header);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.logo-text {
  font-size: clamp(18px, 2vw, 25px);
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-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.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #60a5fa;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

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

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

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

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #050915;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.64) 45%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.18) 50%, rgba(3, 7, 18, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 96px;
  padding-bottom: 90px;
}

.hero-copy {
  width: min(650px, 100%);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero p {
  width: min(580px, 100%);
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 7px 11px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 999px;
  font-size: 13px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border: 0;
  border-radius: 999px;
  font-weight: 750;
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(59, 130, 246, 0.45);
}

.button.secondary {
  color: #dbeafe;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 43px;
  height: 43px;
  color: white;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(17, 24, 39, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(203, 213, 225, 0.45);
  border: 0;
  border-radius: 999px;
}

.hero-dots button.active {
  width: 28px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

main {
  overflow: hidden;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.34);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.section-desc {
  width: min(680px, 100%);
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: rgba(17, 24, 39, 0.94);
  border-color: rgba(96, 165, 250, 0.35);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.05);
  opacity: 0.88;
}

.movie-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #e0f2fe;
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.movie-meta {
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 13px;
}

.movie-card h2 {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: #60a5fa;
}

.movie-card p {
  min-height: 58px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 188px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 55%),
    rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.38);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-card span {
  margin-top: 18px;
  color: #60a5fa;
  font-weight: 750;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 52px 82px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.36);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-content strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  padding: 146px 0 56px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.08)),
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.22), transparent 34rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
  width: min(780px, 100%);
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 20px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
}

.search-field,
.select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-field {
  flex: 1 1 320px;
}

.select-field {
  flex: 0 1 220px;
}

.search-field input,
.select-field select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 14px;
  outline: none;
}

.search-field input {
  padding: 0 16px;
}

.select-field select {
  padding: 0 12px;
}

.search-field input:focus,
.select-field select:focus {
  border-color: rgba(96, 165, 250, 0.65);
}

.detail-hero {
  padding: 130px 0 54px;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.72)),
    var(--detail-cover);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.breadcrumb a {
  color: #93c5fd;
}

.detail-head {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-title p {
  max-width: 780px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.detail-meta span {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

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

.player-card,
.content-card,
.sidebar-card {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-wrap {
  position: relative;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.5);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  min-height: 58px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(59, 130, 246, 0.42);
}

.player-button span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.content-card {
  padding: 28px;
}

.content-card h2,
.sidebar-card h2 {
  margin: 0 0 18px;
  font-size: 25px;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  line-height: 1.95;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 20px;
}

.sidebar-card {
  padding: 20px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(3, 7, 18, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
}

.related-card:hover {
  border-color: rgba(96, 165, 250, 0.34);
}

.related-card img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.related-card span {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.related-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
}

.empty-state.show {
  display: block;
}

.site-footer {
  background: rgba(3, 7, 18, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0 30px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    min-height: 66px;
  }

  .hero-content {
    align-items: end;
    padding-top: 96px;
  }

  .hero h1 {
    font-size: clamp(38px, 16vw, 58px);
  }

  .section {
    padding: 54px 0;
  }

  .section-head {
    display: block;
  }

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

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

  .movie-card p {
    display: none;
  }

  .category-grid,
  .footer-grid,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(240px, 76vw);
  }

  .rank-item a {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-item img {
    width: 72px;
    height: 50px;
  }

  .filter-tools {
    padding: 12px;
  }
}

@media (max-width: 440px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
