:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --line: #1e293b;
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --amber: #facc15;
  --orange: #f97316;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 36rem), var(--bg);
  color: var(--text);
  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: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.24);
}

.brand-text {
  font-size: 1.15rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
}

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover,
.desktop-nav .is-active {
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 14px);
  width: 190px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
}

.dropdown-link:hover {
  background: rgba(34, 211, 238, 0.11);
  color: #ffffff;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.nav-search input,
.filter-box input,
.filter-box select,
.hero-search input {
  width: 100%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-box input:focus,
.filter-box select:focus,
.hero-search input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.hero-search button,
.btn-primary,
.btn-secondary,
.filter-box button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.btn-primary:hover,
.filter-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.2);
}

.btn-secondary {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line-soft);
  padding: 14px 16px 18px;
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 12px;
}

.mobile-panel a:hover {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.1);
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

body.mobile-open .mobile-panel {
  display: block;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 390px;
  align-items: center;
  gap: 52px;
  padding: 68px 0 82px;
}

.eyebrow,
.section-kicker,
.breadcrumbs {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-title h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 16px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.15;
}

.hero p,
.page-title p,
.section-head p,
.detail-intro p,
.detail-copy p,
.category-card p,
.movie-info p,
.rank-content p {
  color: #cbd5e1;
  line-height: 1.75;
}

.hero-lead {
  max-width: 760px;
  margin-top: 18px;
  font-size: 1.05rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 26px;
}

.hero-search {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  max-width: 600px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
}

.hero-search input {
  border-color: transparent;
  background: transparent;
}

.hero-poster {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(10px);
}

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

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}

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

.hero-controls button,
.hero-dot {
  border: 1px solid var(--line-soft);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

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

.hero-dot {
  width: 30px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

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

.section {
  padding: 72px 0 0;
}

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

.section-head h2,
.detail-copy h2,
.player-section h2,
.category-card h2 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.section-more {
  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: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover .movie-poster img,
.mini-card:hover img,
.category-card:hover img {
  transform: scale(1.05);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  background: var(--cyan);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

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

.movie-info {
  padding: 16px;
}

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

.movie-meta span,
.meta-pills span,
.tag-row span,
.tag-row a,
.rank-score {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.78rem;
}

.movie-info h3,
.rank-content h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover {
  color: var(--cyan);
}

.movie-info p {
  min-height: 76px;
  margin: 0 0 14px;
  font-size: 0.92rem;
}

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

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

.category-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 145, 178, 0.16));
  min-height: 250px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  color: #00111a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.category-previews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
}

.category-previews img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 98px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.74);
}

.rank-number {
  font-size: 1.55rem;
  color: var(--amber);
  font-weight: 900;
  text-align: center;
}

.rank-cover img {
  width: 98px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

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

.mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mini-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 12px 12px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
  font-weight: 800;
  line-height: 1.35;
}

.page-title {
  padding: 70px 0 26px;
}

.page-title .title-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 34rem), rgba(15, 23, 42, 0.76);
  padding: clamp(26px, 5vw, 46px);
}

.filter-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 0 0 26px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.detail-hero {
  padding: 60px 0 32px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-soft);
}

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

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.86rem;
}

.detail-intro .one-line {
  font-size: 1.1rem;
  margin-top: 18px;
}

.player-section,
.detail-copy,
.related-section {
  padding: 34px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  margin-bottom: 28px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  margin-top: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.32));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #00111a;
  background: var(--cyan);
  font-size: 2rem;
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.28);
}

.detail-copy p {
  font-size: 1.02rem;
}

.detail-copy h2 + p {
  margin-top: 12px;
}

.detail-copy h2:not(:first-child) {
  margin-top: 28px;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line-soft);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p,
.footer-links a {
  color: var(--muted);
  line-height: 1.75;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-poster {
    max-width: 320px;
  }

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

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

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

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    gap: 28px;
    padding-top: 42px;
  }

  .hero-search,
  .hero-actions,
  .detail-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 44px 82px 1fr;
    gap: 10px;
  }

  .rank-cover img {
    width: 82px;
  }

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

  .player-section,
  .detail-copy,
  .related-section {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .mini-grid,
  .category-previews {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero h1,
  .page-title h1,
  .detail-intro h1 {
    font-size: 2.2rem;
  }
}
