:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #4f46e5;
  --accent-light: #818cf8;
  --accent-deep: #312e81;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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: 80;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.34);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  color: var(--muted-strong);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: #ffffff;
}

.desktop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
}

.desktop-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
}

.desktop-search input {
  width: 180px;
  border: 0;
  background: transparent;
  padding: 8px 4px 8px 12px;
}

.desktop-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: #ffffff;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 24px 22px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-panel input {
  border-radius: 12px;
  padding: 10px 12px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 55%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 82px;
  max-width: 720px;
  z-index: 2;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.76);
  color: #ffffff;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero-content h1,
.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.detail-copy p {
  margin: 0;
  max-width: 640px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted-strong);
}

.hero-meta span {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(79, 70, 229, 0.32);
}

.btn.primary:hover {
  background: #4338ca;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.44);
  font-size: 30px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.66);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.main-shell.subpage {
  padding-top: 38px;
}

.content-section {
  margin-bottom: 72px;
}

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

.section-heading h2,
.page-title h1,
.ranking-head h2,
.detail-info h2,
.detail-side h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading p,
.page-title p,
.overview-card p,
.category-card p,
.detail-info p,
.footer-shell p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more,
.text-link,
.ranking-head a {
  color: var(--accent-light);
  font-weight: 700;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(129, 140, 248, 0.42);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
}

.wide-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(79, 70, 229, 0.78);
  backdrop-filter: blur(10px);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--accent-light);
  font-size: 13px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-summary {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.18);
  font-size: 12px;
}

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(1.15);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.36;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.category-card p {
  max-width: 90%;
  margin: 0;
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row strong {
  color: var(--accent-light);
  font-size: 18px;
}

.rank-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar.compact {
  margin-bottom: 24px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card.is-hidden,
.rank-card.is-hidden {
  display: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--accent-light);
}

.page-title {
  max-width: 820px;
  margin-bottom: 38px;
}

.page-title span,
.category-hero span {
  color: var(--accent-light);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-title h1 {
  margin: 12px 0 16px;
  font-size: clamp(38px, 6vw, 62px);
}

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

.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.64);
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  overflow: hidden;
  border-radius: 16px;
}

.overview-cover img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.overview-card h2 {
  margin: 4px 0 8px;
}

.category-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.category-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-hero div {
  position: relative;
  max-width: 680px;
  padding: 56px;
}

.category-hero h1 {
  margin: 12px 0;
  font-size: clamp(36px, 5vw, 58px);
}

.category-hero p {
  color: var(--muted-strong);
  line-height: 1.8;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 76px minmax(0, 1fr) 180px 220px;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-radius: 18px;
}

.rank-card strong {
  color: var(--accent-light);
  font-size: 24px;
}

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

.rank-title {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-card span,
.rank-card em {
  color: var(--muted);
  font-style: normal;
}

.detail-page {
  padding-bottom: 64px;
}

.detail-page .breadcrumbs {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}

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

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(2px) saturate(1.2);
  opacity: 0.42;
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 70%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 520px;
  margin: 0 auto;
  padding: 58px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.detail-shell {
  max-width: 1280px;
  margin: 44px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-panel {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-panel video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.34), rgba(0, 0, 0, 0.72));
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 20px 48px rgba(79, 70, 229, 0.42);
  font-size: 30px;
}

.player-layer span:last-child {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 800;
}

.detail-info,
.detail-side {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.68);
  padding: 28px;
}

.detail-info h2,
.detail-side h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.detail-info p {
  margin: 0 0 28px;
  color: var(--muted-strong);
}

.detail-info p:last-child {
  margin-bottom: 0;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: var(--text);
}

.related-section {
  padding-top: 46px;
  padding-bottom: 0;
}

.search-page .content-section {
  margin-bottom: 0;
}

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

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-shell p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

  .menu-toggle {
    display: block;
  }

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

  .feature-grid,
  .split-section,
  .category-overview,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .rank-card {
    grid-template-columns: 48px 64px minmax(0, 1fr);
  }

  .rank-card span:not(.rank-title),
  .rank-card em {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 66px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 78px;
  }

  .hero-content p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .main-shell {
    padding: 44px 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .overview-card {
    grid-template-columns: 1fr;
  }

  .category-hero div {
    padding: 34px 24px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 36px 16px;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

  .detail-page .breadcrumbs,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-info,
  .detail-side {
    padding: 22px;
  }

  .footer-shell {
    grid-template-columns: 1fr;
    padding: 30px 16px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .poster-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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