:root {
  color-scheme: dark;
  --stellar-dark: #0a0e27;
  --stellar-deep: #141b3d;
  --stellar-mid: #1e2847;
  --stellar-light: #2a3857;
  --stellar-glow: #4a90e2;
  --primary: #0ea5e9;
  --text: #ffffff;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 0 20px rgba(74, 144, 226, 0.3);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--stellar-dark);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.narrow {
  width: min(920px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--stellar-glow), var(--primary));
  box-shadow: var(--shadow);
  font-weight: 900;
}

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

.desktop-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--stellar-glow);
}

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

.header-search input,
.mobile-menu input,
.page-search-box input {
  width: 100%;
  border: 1px solid rgba(74, 144, 226, 0.35);
  outline: none;
  color: var(--text);
  background: rgba(30, 40, 71, 0.9);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-menu input:focus,
.page-search-box input:focus {
  border-color: var(--stellar-glow);
  box-shadow: var(--shadow);
}

.header-search button,
.mobile-menu button {
  border: 0;
  color: white;
  background: var(--stellar-glow);
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 40, 71, 0.95);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(10, 14, 39, 0.98);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu nav {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-menu a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 40, 71, 0.65);
}

.mobile-menu form {
  display: flex;
  gap: 8px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--stellar-deep);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--stellar-dark), rgba(10, 14, 39, 0.55) 46%, rgba(10, 14, 39, 0.15));
}

.hero-copy {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  max-width: 760px;
}

.hero-tags,
.detail-tags-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-tags span,
.hero-tags a,
.detail-tags-inline span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(74, 144, 226, 0.82);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.btn-primary {
  background: var(--stellar-glow);
  color: white;
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.38);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn-primary:hover {
  background: var(--primary);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 40px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--stellar-glow);
}

.section {
  padding: 72px 0;
  background: var(--stellar-dark);
}

.section-deep {
  background: var(--stellar-deep);
}

.section-gradient {
  background: linear-gradient(180deg, var(--stellar-dark), var(--stellar-deep));
}

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

.section-title.compact {
  align-items: center;
  margin-bottom: 20px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.section-title a {
  color: var(--stellar-glow);
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--stellar-glow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(30, 40, 71, 0.78);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stellar-mid), var(--stellar-light));
}

.movie-card-wide .movie-cover {
  aspect-ratio: 16 / 9;
}

.movie-card-large .movie-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.82));
}

.card-badges {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.card-badges span {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.card-badges span:first-child {
  background: rgba(74, 144, 226, 0.86);
}

.card-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.card-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 17px;
  line-height: 1.28;
}

.card-copy em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scrollbar-color: var(--stellar-glow) var(--stellar-mid);
}

.rail-block + .rail-block {
  margin-top: 54px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 36px;
  align-items: start;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 40, 71, 0.95), rgba(20, 27, 61, 0.92));
  padding: 22px;
  min-height: 152px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 144, 226, 0.7);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile span,
.category-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

.category-card {
  min-height: 260px;
  padding: 0;
}

.category-card strong,
.category-card em {
  padding-left: 18px;
  padding-right: 18px;
}

.category-card strong {
  margin-top: 16px;
}

.category-card em {
  padding-bottom: 20px;
}

.category-card-art {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 128px;
  overflow: hidden;
  background: var(--stellar-mid);
}

.category-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-panel,
.detail-side,
.detail-article,
.player-wrap,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 27, 61, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 40, 71, 0.68);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(42, 56, 87, 0.9);
  transform: translateX(4px);
}

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

.rank-thumb {
  display: block;
  width: 58px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--stellar-mid);
}

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

.rank-body strong,
.rank-body em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-body strong {
  font-size: 15px;
}

.rank-body em {
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
}

.rank-action {
  color: var(--stellar-glow);
  font-size: 13px;
  font-weight: 800;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  background: radial-gradient(circle at 18% 12%, rgba(74, 144, 226, 0.28), transparent 34%), linear-gradient(135deg, var(--stellar-dark), var(--stellar-deep));
}

.small-hero {
  padding: 72px 0 54px;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--stellar-glow);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.page-search-box {
  margin-bottom: 16px;
}

.hero-search-box {
  max-width: 680px;
  margin-top: 24px;
  margin-bottom: 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(74, 144, 226, 0.35);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  background: rgba(30, 40, 71, 0.76);
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  background: var(--stellar-glow);
  border-color: var(--stellar-glow);
}

.detail-hero {
  min-height: 560px;
  padding: 76px 0 72px;
}

.detail-bg,
.detail-layer {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-layer {
  background: linear-gradient(90deg, var(--stellar-dark), rgba(10, 14, 39, 0.86), rgba(10, 14, 39, 0.55));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: var(--stellar-mid);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

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

.detail-copy p {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.detail-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-category-links a,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(30, 40, 71, 0.82);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.detail-category-links a:hover,
.tag-cloud a:hover {
  color: white;
  border-color: var(--stellar-glow);
  background: rgba(74, 144, 226, 0.35);
}

.player-section {
  padding-top: 42px;
  padding-bottom: 42px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.28), rgba(0, 0, 0, 0.74));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--stellar-glow);
  box-shadow: var(--shadow);
  font-size: 34px;
  padding-left: 6px;
}

.player-cover span:last-child {
  font-size: 18px;
  font-weight: 900;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0 0 22px;
}

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

.detail-side dd {
  margin: 0;
  color: white;
  min-width: 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  background: var(--stellar-deep);
  border-top: 1px solid var(--line);
}

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

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 420px;
  color: var(--soft);
  margin: 0;
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links strong {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--soft);
  font-size: 14px;
}

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

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

.is-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .latest-grid,
  .two-column,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .hero {
    height: 620px;
    min-height: 620px;
  }

  .hero-copy {
    left: 20px;
    right: 20px;
    bottom: 74px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .movie-rail {
    grid-auto-columns: 160px;
  }

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

  .rank-row {
    grid-template-columns: 38px 50px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

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

  .detail-poster {
    width: min(230px, 72vw);
  }

  .detail-copy h1 {
    font-size: 36px;
  }

  .detail-side dl {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .latest-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .movie-cover {
    aspect-ratio: 16 / 10;
  }
}
