:root {
  --night-950: #050814;
  --night-900: #080d1c;
  --night-800: #0f172a;
  --silver-100: #f8fafc;
  --silver-200: #e2e8f0;
  --silver-300: #cbd5e1;
  --silver-400: #94a3b8;
  --silver-500: #64748b;
  --moon-300: #c4b5fd;
  --moon-400: #a78bfa;
  --moon-500: #8b5cf6;
  --moon-600: #7c3aed;
  --line: rgba(226, 232, 240, 0.14);
  --glass: rgba(15, 23, 42, 0.68);
  --card: rgba(30, 41, 59, 0.42);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--silver-100);
  background:
    radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.24), transparent 32rem),
    radial-gradient(circle at 80% 5%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--night-900), var(--night-950) 55%, #02040c);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(22px);
}

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

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--moon-500), #38bdf8);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--silver-300);
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.18);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.home-hero {
  position: relative;
  min-height: 600px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 8, 20, 0.88), rgba(5, 8, 20, 0.56) 48%, var(--night-950)),
    radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.28), transparent 28rem);
}

.hero-content {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 80px;
  text-align: center;
}

.hero-symbol {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, 0.36);
  border-radius: 28px;
  color: var(--moon-300);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 22px 70px rgba(139, 92, 246, 0.26);
  animation: float 3.4s ease-in-out infinite;
}

.hero-kicker {
  margin: 0 0 14px;
  color: var(--moon-300);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-hero h1,
.page-hero h1,
.detail-block h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-weight: 800;
  line-height: 1.08;
}

.home-hero h1 {
  font-size: clamp(42px, 6.5vw, 86px);
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero-lead {
  max-width: 780px;
  margin: 22px auto 0;
  color: var(--silver-200);
  font-size: clamp(18px, 2vw, 25px);
}

.hero-feature {
  width: min(720px, 100%);
  margin: 28px auto 0;
  padding: 18px 22px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-radius: 22px;
  color: var(--silver-300);
  background: rgba(8, 13, 28, 0.66);
  box-shadow: var(--shadow);
}

.feature-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

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

.small-actions {
  justify-content: flex-start;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--moon-500), var(--moon-600));
  box-shadow: 0 18px 45px rgba(139, 92, 246, 0.42);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--silver-100);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(139, 92, 246, 0.25);
}

.search-strip {
  margin-top: -34px;
  position: relative;
  z-index: 3;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.search-box span {
  color: var(--moon-300);
  font-weight: 800;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.search-box input::placeholder {
  color: var(--silver-500);
}

.inline-search {
  width: min(680px, 100%);
  margin-bottom: 26px;
}

.content-section {
  padding: 72px 0;
}

.muted-section {
  background: rgba(15, 23, 42, 0.22);
}

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

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.18;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--silver-400);
}

.section-more {
  color: var(--moon-300);
  font-weight: 800;
  white-space: nowrap;
}

.movie-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x proximity;
}

.movie-rail::-webkit-scrollbar {
  height: 8px;
}

.movie-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.28);
}

.rail-item {
  width: 320px;
  flex: 0 0 320px;
  scroll-snap-align: start;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 181, 253, 0.42);
  box-shadow: 0 24px 72px rgba(139, 92, 246, 0.20);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(15, 23, 42, 0.95));
}

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 46px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
  transition: opacity 0.28s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.score-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
}

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

.card-kicker,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--silver-400);
  font-size: 13px;
}

.card-kicker span:not(:last-child)::after,
.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--silver-500);
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--moon-300);
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 46px;
  color: var(--silver-300);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card,
.category-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(15, 23, 42, 0.55));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card {
  min-height: 160px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.category-card span,
.category-panel-top span {
  color: var(--moon-300);
  font-size: 32px;
}

.category-card strong,
.category-panel strong {
  color: #ffffff;
  font-size: 18px;
}

.category-card em,
.category-panel p {
  color: var(--silver-400);
  font-size: 14px;
  font-style: normal;
}

.category-card:hover,
.category-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(196, 181, 253, 0.42);
  box-shadow: 0 24px 72px rgba(139, 92, 246, 0.18);
}

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

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

.wide-card {
  display: flex;
  gap: 16px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.38);
  transition: background 0.25s ease, transform 0.25s ease;
}

.wide-card:hover {
  background: rgba(30, 41, 59, 0.62);
  transform: translateY(-3px);
}

.wide-card img {
  width: 150px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  object-fit: cover;
}

.wide-card span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
}

.wide-card strong {
  color: white;
  font-size: 17px;
}

.wide-card em,
.wide-card small {
  color: var(--silver-400);
  font-style: normal;
}

.ranking-panel,
.info-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.34);
  transition: transform 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.62);
}

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

.rank-num {
  min-width: 36px;
  color: var(--moon-300);
  font-weight: 900;
  text-align: center;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rank-copy strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: var(--silver-400);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: white;
  font-weight: 900;
}

.full-ranking .rank-row {
  grid-template-columns: 54px 92px minmax(0, 1fr) 64px;
}

.full-ranking .rank-row img {
  width: 92px;
  height: 60px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 24% 15%, rgba(139, 92, 246, 0.28), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(5, 8, 20, 0.12));
}

.compact-hero h1 {
  max-width: 860px;
  margin: 0;
  color: white;
  font-size: clamp(36px, 5vw, 64px);
}

.compact-hero p:not(.hero-kicker) {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--silver-300);
  font-size: 18px;
}

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

.category-panel {
  padding: 22px;
}

.category-panel-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.thumb-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.thumb-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
}

.filter-board {
  margin-bottom: 30px;
  display: grid;
  gap: 18px;
}

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

.filter-pills button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--silver-300);
  background: rgba(15, 23, 42, 0.72);
}

.filter-pills button:hover,
.filter-pills button.active {
  color: white;
  border-color: rgba(196, 181, 253, 0.42);
  background: rgba(139, 92, 246, 0.24);
}

.detail-hero {
  padding: 46px 0 24px;
  background:
    radial-gradient(circle at 85% 8%, rgba(139, 92, 246, 0.20), transparent 24rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.56), rgba(5, 8, 20, 0));
}

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

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

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

.detail-primary {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.media-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.30), rgba(0, 0, 0, 0.40) 36%, rgba(0, 0, 0, 0.66)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.76));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay[hidden],
.player-shell.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-orb {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: white;
  font-size: 38px;
  background: linear-gradient(135deg, var(--moon-500), #38bdf8);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.45);
}

.detail-block {
  margin-top: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.56);
}

.detail-block h1 {
  color: white;
  font-size: clamp(34px, 4vw, 58px);
}

.detail-block h2,
.info-card h2 {
  margin: 0 0 14px;
  color: white;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 26px;
}

.detail-block p {
  margin: 0;
  color: var(--silver-300);
  font-size: 17px;
}

.detail-lead {
  margin-top: 14px !important;
  font-size: 19px !important;
}

.detail-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(196, 181, 253, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--moon-300);
  background: rgba(139, 92, 246, 0.12);
  font-size: 13px;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 26px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 14px;
}

.info-card dt {
  color: var(--silver-500);
}

.info-card dd {
  margin: 0;
  color: var(--silver-200);
}

.info-card a {
  color: var(--moon-300);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 4, 12, 0.86);
}

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

.site-footer p {
  max-width: 560px;
  color: var(--silver-400);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

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

.footer-links a:hover {
  color: var(--moon-300);
}

.copyright {
  margin: 0;
  padding: 0 16px 30px;
  color: var(--silver-500);
  text-align: center;
}

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

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

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

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

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

  .detail-side {
    position: static;
  }

  .detail-poster {
    max-width: 360px;
  }
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-hero {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .hero-actions,
  .small-actions {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button {
    flex: 1 1 100%;
  }

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

  .movie-grid,
  .related-grid,
  .wide-list,
  .category-grid,
  .category-panels {
    grid-template-columns: 1fr;
  }

  .rail-item {
    width: 280px;
    flex-basis: 280px;
  }

  .wide-card {
    flex-direction: column;
  }

  .wide-card img {
    width: 100%;
  }

  .rank-row,
  .full-ranking .rank-row {
    grid-template-columns: 44px 70px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .detail-block,
  .ranking-panel,
  .info-card {
    padding: 20px;
  }
}
