:root {
  --night-950: #080b18;
  --night-900: #0f172a;
  --night-800: #1a1f35;
  --silver-900: #0f172a;
  --silver-800: #1e293b;
  --silver-700: #334155;
  --silver-400: #94a3b8;
  --silver-300: #cbd5e1;
  --moonlight-600: #4f46e5;
  --moonlight-500: #6172f3;
  --moonlight-400: #8ba2ff;
  --white: #ffffff;
  --soft-shadow: 0 24px 80px rgba(97, 114, 243, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--silver-300);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #334155 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 31, 53, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-600));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(97, 114, 243, 0.4);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--silver-300);
  font-size: 15px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(97, 114, 243, 0.2);
}

.top-search {
  display: flex;
  align-items: center;
  width: 250px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.top-search input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: none;
}

.top-search button {
  padding: 8px 14px;
  color: var(--white);
  cursor: pointer;
  background: var(--moonlight-500);
  border: 0;
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(97, 114, 243, 0.18);
  border: 1px solid rgba(97, 114, 243, 0.35);
  border-radius: 14px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(51, 65, 85, 0.45);
  border-radius: 20px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  color: var(--silver-300);
  border-radius: 12px;
}

.mobile-panel a:hover {
  color: var(--white);
  background: rgba(97, 114, 243, 0.16);
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--night-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 420px;
  align-items: center;
  gap: 52px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.18);
  transform: scale(1.08);
  opacity: 0.28;
}

.hero-carousel::before,
.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-carousel::before {
  background: radial-gradient(circle at 78% 42%, rgba(97, 114, 243, 0.36), transparent 36%), linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.98));
}

.hero-carousel::after {
  background: linear-gradient(180deg, transparent 75%, rgba(15, 23, 42, 0.95));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 50px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--moonlight-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--silver-300);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--moonlight-400);
  font-size: 12px;
  background: rgba(97, 114, 243, 0.16);
  border: 1px solid rgba(97, 114, 243, 0.24);
  border-radius: 999px;
}

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

.primary-btn,
.ghost-btn,
.panel-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-600));
  box-shadow: 0 18px 48px rgba(97, 114, 243, 0.36);
}

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

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

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: var(--soft-shadow);
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

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

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  color: var(--white);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.36);
  border: 0;
  border-radius: 50%;
}

.hero-dot.active {
  width: 28px;
  background: var(--moonlight-400);
  border-radius: 999px;
}

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

.section-band {
  background: rgba(15, 23, 42, 0.28);
  border-top: 1px solid rgba(51, 65, 85, 0.24);
  border-bottom: 1px solid rgba(51, 65, 85, 0.24);
}

.section-band.soft {
  background: linear-gradient(135deg, rgba(97, 114, 243, 0.08), rgba(15, 23, 42, 0.18));
}

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

.section-head h2,
.rank-panel h2,
.page-hero h1,
.detail-article h1 {
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-head a {
  color: var(--moonlight-400);
  font-weight: 700;
}

.center-head {
  justify-content: center;
  text-align: center;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 286px;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(30, 41, 59, 0.32);
  border: 1px solid rgba(51, 65, 85, 0.34);
  border-radius: 18px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(97, 114, 243, 0.48);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28), 0 12px 32px rgba(97, 114, 243, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.75);
}

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

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: block;
  min-height: 48px;
  color: var(--white);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--moonlight-400);
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--silver-400);
  font-size: 13px;
}

.movie-desc {
  min-height: 66px;
  margin: 10px 0 14px;
  color: var(--silver-300);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.category-tile {
  min-height: 168px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(47, 46, 130, 0.32), rgba(15, 23, 42, 0.34));
  border: 1px solid rgba(51, 65, 85, 0.36);
  border-radius: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(97, 114, 243, 0.52);
}

.category-tile span,
.category-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 32px;
}

.category-tile strong {
  display: block;
  color: var(--white);
  font-size: 18px;
}

.category-tile em {
  display: block;
  margin-top: 10px;
  color: var(--silver-400);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.rank-panel,
.side-info,
.detail-article,
.category-card-large {
  background: rgba(30, 41, 59, 0.32);
  border: 1px solid rgba(51, 65, 85, 0.34);
  border-radius: 22px;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(51, 65, 85, 0.26);
  border-radius: 16px;
}

.rank-item:hover {
  border-color: rgba(97, 114, 243, 0.42);
}

.rank-num {
  color: var(--moonlight-400);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-item strong {
  display: block;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  display: block;
  margin-top: 3px;
  color: var(--silver-400);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-link,
.text-link {
  margin-top: 18px;
  color: var(--moonlight-400);
  background: rgba(97, 114, 243, 0.14);
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px max(16px, calc((100vw - 1180px) / 2)) 70px;
  background: radial-gradient(circle at 76% 36%, rgba(97, 114, 243, 0.28), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.52));
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.compact-hero p,
.category-hero p,
.search-hero p {
  max-width: 760px;
  color: var(--silver-300);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  max-width: 720px;
  margin-top: 28px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.filter-bar input {
  width: 100%;
  padding: 15px 20px;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: 0;
}

.category-list-large {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  padding: 22px;
  align-items: center;
}

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

.category-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
}

.category-card-large h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 28px;
}

.category-card-large p {
  color: var(--silver-300);
  line-height: 1.8;
}

.ranking-page {
  padding-top: 42px;
}

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

.large-rank .rank-item {
  grid-template-columns: 48px 92px minmax(0, 1fr);
  padding: 14px;
}

.large-rank .rank-item img {
  width: 92px;
  height: 66px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--silver-400);
  font-size: 14px;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid rgba(97, 114, 243, 0.28);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 18px;
  color: var(--white);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.58));
  border: 0;
  text-align: center;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-600));
  border-radius: 50%;
  box-shadow: 0 20px 54px rgba(97, 114, 243, 0.42);
}

.detail-article {
  margin-top: 24px;
  padding: 28px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 11px;
  color: var(--silver-300);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: 999px;
}

.lead-text {
  color: var(--white);
  font-size: 18px;
  line-height: 1.8;
}

.detail-article h2 {
  margin: 28px 0 10px;
  color: var(--white);
  font-size: 22px;
}

.detail-article p {
  color: var(--silver-300);
  line-height: 1.9;
}

.detail-tags {
  margin-top: 24px;
}

.detail-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.detail-pager a {
  padding: 14px;
  color: var(--silver-300);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(51, 65, 85, 0.36);
  border-radius: 14px;
}

.detail-pager a:hover {
  color: var(--white);
  border-color: rgba(97, 114, 243, 0.42);
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-cover {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

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

.side-info {
  margin-top: 18px;
  padding: 22px;
}

.side-info h2 {
  margin: 0 0 16px;
  color: var(--white);
}

.side-info p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.32);
}

.side-info strong {
  color: var(--silver-400);
}

.side-info span {
  color: var(--silver-300);
}

.related-section {
  padding-top: 48px;
}

.site-footer {
  margin-top: 40px;
  background: rgba(15, 23, 42, 0.82);
  border-top: 1px solid rgba(51, 65, 85, 0.34);
}

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

.footer-logo {
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 460px;
  color: var(--silver-400);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

.footer-links a {
  color: var(--silver-400);
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--silver-400);
  font-size: 14px;
  text-align: center;
  border-top: 1px solid rgba(51, 65, 85, 0.34);
}

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

@keyframes floatPoster {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-poster {
  animation: floatPoster 5s ease-in-out infinite;
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .nav-shell {
    height: 64px;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 26px;
  }

  .hero-poster {
    width: min(72vw, 280px);
    margin: 0 auto;
  }

  .hero-content {
    padding-top: 10px;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tags,
  .hero-actions {
    justify-content: center;
  }

  .hero-controls {
    bottom: 18px;
  }

  .section-wrap {
    padding: 52px 0;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .wide-grid,
  .all-grid,
  .category-grid,
  .large-rank,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-article {
    padding: 20px;
  }
}
