:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #fbbf24;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 25px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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.12), transparent 34rem),
    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: 90;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 15px 40px rgba(2, 6, 23, 0.25);
}

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

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

.brand-text {
  font-size: 24px;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

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

.nav-link,
.nav-drop-button {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-drop-button:hover {
  color: white;
}

.nav-drop {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 178px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.22s ease;
}

.nav-drop:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-menu a {
  display: block;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-drop-menu a:hover {
  color: white;
  background: rgba(51, 65, 85, 0.8);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid var(--line);
  color: white;
  background: rgba(15, 23, 42, 0.88);
  border-radius: 999px;
  outline: none;
}

.header-search input,
.mobile-search input {
  width: 180px;
  padding: 10px 14px;
  transition: width 0.25s ease, border-color 0.25s ease;
}

.header-search input:focus {
  width: 245px;
  border-color: rgba(34, 211, 238, 0.8);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-trigger {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 15px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.45);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-trigger:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.25);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.86);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(15, 23, 42, 0.14) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 36px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 900;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--dim);
}

.hero-meta span,
.detail-meta span,
.page-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.hero-panel {
  padding: 18px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.hero-panel h2 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.hero-panel p {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

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

.hero-dots button {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(203, 213, 225, 0.36);
}

.hero-dots button.is-active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.page-main,
.section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 64px 0 0;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-title,
.page-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-desc,
.page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 780px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.24);
  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.48);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.38);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #00111a;
  background: rgba(34, 211, 238, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: all 0.22s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-rating {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: var(--amber);
}

.card-body {
  padding: 17px;
}

.card-meta {
  gap: 8px;
  font-size: 12px;
  margin-bottom: 9px;
}

.card-meta span {
  color: var(--dim);
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  color: var(--cyan);
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.1);
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.18)),
    rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card strong {
  font-size: 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 50px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.rank-info em {
  color: var(--dim);
  font-style: normal;
  line-height: 1.55;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, minmax(120px, 1fr));
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  margin: 28px 0;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  display: none;
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  margin: 26px 0;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 44px rgba(2, 6, 23, 0.42);
}

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

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

.detail-copy p {
  color: var(--muted);
  line-height: 1.85;
  font-size: 18px;
}

.watch-panel,
.text-panel {
  margin-top: 34px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
}

.watch-panel h2,
.text-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.58));
  z-index: 3;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-trigger {
  width: 86px;
  height: 86px;
  font-size: 34px;
}

.text-panel p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 17px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
}

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

.related-card span {
  display: block;
  padding: 12px;
  line-height: 1.45;
  font-weight: 800;
}

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

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

.footer-grid p,
.footer-links a,
.copyright {
  color: var(--dim);
}

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

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

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

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

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

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

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

  .hero-panel {
    display: none;
  }
}

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

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

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

  .mobile-nav .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.76);
  }

  .hero {
    min-height: 560px;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .movie-grid,
  .rank-layout,
  .footer-grid,
  .detail-hero,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .page-main,
  .section,
  .footer-grid,
  .copyright,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

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

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 64px 1fr;
  }

  .rank-item img {
    width: 64px;
    height: 84px;
  }
}
