:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.35);
}

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

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

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

.brand-name,
.footer-brand {
  font-size: 1.24rem;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.76);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
}

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

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

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.42fr);
  gap: 36px;
  align-items: center;
  padding: 82px 40px 58px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 10% 0 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 20%, rgba(34, 211, 238, 0.18), transparent 22rem),
    linear-gradient(180deg, transparent, #020617 92%);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #f8fafc, #67e8f9, #60a5fa, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-line,
.page-hero p,
.detail-line,
.section-text {
  max-width: 760px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 1.06rem;
}

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

.hero-tags span,
.tag-row span,
.rank-item span,
.card-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: #bae6fd;
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.8rem;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #04111b;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.26);
}

.primary-btn.small {
  min-height: 40px;
  margin-top: 14px;
}

.ghost-btn,
.section-more {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.62);
  color: #e0f2fe;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: end;
  width: min(330px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img,
.poster,
.rank-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 40px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.25);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.search-band,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-layout,
.category-overview-card {
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 24px;
  align-items: center;
}

.search-band h2,
.section-head h2,
.content-section h2,
.detail-article h2,
.detail-side h2,
.overview-body h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-box.inline {
  min-width: min(100%, 360px);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.55);
  outline: none;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 20px 55px rgba(2, 132, 199, 0.16);
}

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

.poster {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster {
  transform: scale(1.045);
}

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #e0f2fe;
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 3em;
  overflow: hidden;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-line,
.rank-item p,
.overview-body p,
.detail-article p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.card-meta {
  margin: 8px 0;
  font-size: 0.86rem;
}

.card-line {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-category {
  margin-top: 4px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.58), rgba(30, 41, 59, 0.7));
}

.tile-glow {
  position: absolute;
  inset: -35% auto auto -20%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.2);
  filter: blur(34px);
}

.tile-title,
.tile-desc {
  position: relative;
  display: block;
}

.tile-title {
  font-size: 1.1rem;
  font-weight: 900;
}

.tile-desc {
  margin-top: 10px;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 0.9rem;
}

.tile-covers {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: end;
}

.tile-covers img {
  width: 54px;
  height: 78px;
  margin-left: -20px;
  border: 2px solid rgba(15, 23, 42, 0.92);
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #04111b;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-thumb {
  width: 72px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
}

.rank-title {
  font-weight: 900;
}

.rank-item p {
  margin: 4px 0 8px;
  font-size: 0.86rem;
}

.page-hero {
  min-height: 330px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 24rem),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.18), transparent 28rem),
    var(--panel);
}

.page-hero.slim {
  min-height: 260px;
}

.category-hero {
  gap: 16px;
}

.overview-stack {
  display: grid;
  gap: 22px;
  margin-bottom: 40px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.overview-preview {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: var(--shadow);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
}

.detail-meta div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.tag-row.big span {
  min-height: 32px;
  padding: 6px 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.7));
  cursor: pointer;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #021018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.5);
  font-size: 2.2rem;
}

.player-state {
  position: absolute;
  left: 16px;
  bottom: 12px;
  margin: 0;
  color: #cbd5e1;
  font-size: 0.88rem;
}

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

.detail-article {
  display: grid;
  gap: 18px;
}

.detail-article p {
  margin: 0;
  font-size: 1.02rem;
}

.compact-list .rank-item {
  grid-template-columns: auto 58px minmax(0, 1fr);
}

.compact-list .rank-thumb {
  width: 58px;
}

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

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

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.search-page-box {
  max-width: 620px;
  margin-top: 22px;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .ranking-layout,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  main,
  .header-inner,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    display: none;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

  .main-nav.open {
    display: grid;
  }

  .hero,
  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 78px 18px 70px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
  }

  .hero-dots {
    left: 18px;
  }

  .search-band,
  .section-head,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .rank-list.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .rank-thumb {
    width: 58px;
  }
}

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

  .search-band,
  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-layout,
  .category-overview-card {
    padding: 20px;
  }

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