:root {
  --stellar-deep: #060914;
  --stellar-dark: #0b1025;
  --stellar-mid: #141b3d;
  --stellar-light: #263866;
  --stellar-glow: #4a90e2;
  --stellar-accent: #38bdf8;
  --text-main: #ffffff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --line-soft: rgba(255, 255, 255, 0.12);
  --shadow-glow: 0 22px 60px rgba(74, 144, 226, 0.24);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stellar-dark);
  color: var(--text-main);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 37, 0.94);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--stellar-glow), var(--stellar-accent));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

.logo-text {
  font-size: 22px;
}

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

.nav-link,
.mobile-link {
  color: var(--text-soft);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--stellar-accent);
}

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

.site-search input,
.mobile-search input,
.wide-search input,
.filter-input {
  width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(20, 27, 61, 0.82);
  color: var(--text-main);
  outline: none;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-input:focus {
  border-color: var(--stellar-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.site-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--stellar-glow);
  color: #ffffff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(38, 56, 102, 0.5);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(20, 27, 61, 0.96);
}

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

.hero {
  min-height: 70vh;
  background: var(--stellar-deep);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 35%, rgba(74, 144, 226, 0.34), transparent 32%),
    linear-gradient(to top, var(--stellar-dark) 2%, rgba(11, 16, 37, 0.72) 46%, rgba(11, 16, 37, 0.08) 100%);
}

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

.hero-meta,
.meta-pills,
.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.meta-pills span,
.tag-row span,
.tag-cloud span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(74, 144, 226, 0.18);
  border: 1px solid rgba(74, 144, 226, 0.36);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 20px;
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--stellar-glow), var(--stellar-accent));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.ghost-btn,
.section-link {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.ghost-btn.small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 14px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.section-deep {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1240px) / 2));
  padding-right: max(16px, calc((100vw - 1240px) / 2));
  background: linear-gradient(180deg, var(--stellar-dark), var(--stellar-deep));
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading h2,
.compact-page-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.section-heading p,
.compact-page-hero p {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 17px;
}

.section-kicker {
  color: var(--stellar-accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.row-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  border-radius: var(--radius-md);
  background: rgba(20, 27, 61, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 144, 226, 0.55);
  box-shadow: var(--shadow-glow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--stellar-mid);
}

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

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
}

.poster-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(to top, rgba(6, 9, 20, 0.92), rgba(6, 9, 20, 0.1));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-chip {
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--stellar-glow);
  color: #ffffff;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-body.compact {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-tile,
.category-card-main {
  display: grid;
  gap: 10px;
  min-height: 160px;
  border: 1px solid rgba(74, 144, 226, 0.28);
  border-radius: var(--radius-lg);
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(20, 27, 61, 0.96), rgba(38, 56, 102, 0.8));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-main:hover {
  transform: translateY(-4px);
  border-color: var(--stellar-accent);
}

.category-tile strong,
.category-card-main span {
  font-size: 24px;
  line-height: 1.1;
}

.category-tile span,
.category-card-main strong {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.rail-stack {
  display: grid;
  gap: 44px;
}

.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rail-title h3 {
  margin: 0;
  padding-left: 14px;
  border-left: 4px solid var(--stellar-accent);
  font-size: 24px;
}

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

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 18px;
  padding-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--stellar-glow) var(--stellar-mid);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 20%, rgba(74, 144, 226, 0.32), transparent 32%),
    linear-gradient(135deg, var(--stellar-deep), var(--stellar-mid));
}

.compact-page-hero {
  width: 100%;
  padding: 86px max(16px, calc((100vw - 1240px) / 2));
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(20, 27, 61, 0.8);
}

.filter-input {
  width: min(560px, 100%);
}

.category-card-large {
  display: grid;
  gap: 14px;
}

.category-samples {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(20, 27, 61, 0.72);
}

.category-samples a {
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.category-samples a:hover {
  color: var(--stellar-accent);
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(20, 27, 61, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(74, 144, 226, 0.52);
}

.rank-index {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(74, 144, 226, 0.2);
  color: var(--stellar-accent);
  font-weight: 900;
}

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

.rank-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-content strong {
  color: #ffffff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.rank-content em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--stellar-deep);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  filter: blur(18px);
  transform: scale(1.08);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 9, 20, 0.64), var(--stellar-dark));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74, 144, 226, 0.26);
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-glow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  background: rgba(6, 9, 20, 0.46);
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--stellar-glow), var(--stellar-accent));
  box-shadow: var(--shadow-glow);
}

.detail-section {
  padding-top: 50px;
}

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

.detail-main-card,
.detail-side-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(20, 27, 61, 0.86);
  padding: 28px;
}

.detail-title-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-title-block h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.text-block {
  margin-top: 28px;
}

.text-block h2,
.detail-side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.text-block p {
  margin: 0;
  color: var(--text-soft);
  white-space: pre-line;
}

.tag-cloud {
  margin-top: 28px;
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 20px;
}

.small-rank-list .rank-row {
  grid-template-columns: auto 52px minmax(0, 1fr);
  padding: 10px;
}

.small-rank-list .rank-row img {
  width: 52px;
  height: 70px;
}

.wide-search {
  width: 100%;
}

.wide-search input {
  width: 100%;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
}

.footer-brand p {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--text-muted);
}

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

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

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-columns a {
  color: var(--text-muted);
}

.footer-columns a:hover {
  color: var(--stellar-accent);
}

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

.is-filtered-out {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .rank-page-list,
  .home-rank-list {
    grid-template-columns: 1fr;
  }

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

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

  .logo-text {
    font-size: 19px;
  }

  .hero-slider {
    min-height: 560px;
    height: 78vh;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

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

  .card-body,
  .card-body.compact {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 12px;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-page-hero {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .detail-main-card,
  .detail-side-card {
    padding: 20px;
  }

  .detail-title-block,
  .row-heading {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .horizontal-rail {
    grid-auto-columns: 168px;
  }

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

  .rank-row img {
    width: 58px;
    height: 78px;
  }
}
