:root {
  --moonlight-950: #020617;
  --moonlight-900: #0f172a;
  --moonlight-850: #111c33;
  --moonlight-800: #1e293b;
  --moonlight-700: #334155;
  --golden-300: #fcd34d;
  --golden-400: #fbbf24;
  --golden-500: #f59e0b;
  --golden-600: #d97706;
  --lunar-50: #fafafa;
  --lunar-100: #f5f5f5;
  --lunar-200: #e5e5e5;
  --lunar-300: #d4d4d4;
  --lunar-400: #a3a3a3;
  --panel: rgba(15, 23, 42, 0.74);
  --line: rgba(148, 163, 184, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 84% 14%, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--moonlight-950);
  color: var(--lunar-100);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--moonlight-950);
  background: linear-gradient(135deg, var(--golden-300), var(--golden-500));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 1.15rem;
  background: linear-gradient(90deg, var(--golden-300), var(--golden-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.nav-chip {
  color: var(--lunar-300);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--golden-300);
  background: rgba(245, 158, 11, 0.08);
}

.header-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-chip {
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  font-size: 0.86rem;
}

.nav-chip:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--golden-300);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: var(--lunar-100);
  background: rgba(30, 41, 59, 0.9);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-backdrop,
.hero-overlay,
.hero-image {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  z-index: -1;
  background: var(--moonlight-900);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(8px) saturate(1.12);
  transform: scale(1.04);
  transition: opacity 0.8s ease;
}

.hero-image.is-active {
  opacity: 0.34;
}

.hero-overlay {
  background:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.54), var(--moonlight-950)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.68), transparent 58%);
}

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

.hero-eyebrow,
.section-heading p,
.page-hero p {
  margin: 0 0 12px;
  color: var(--golden-400);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 auto 22px;
  max-width: 920px;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, var(--golden-300), var(--golden-400), var(--golden-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 auto 26px;
  max-width: 760px;
  color: var(--lunar-300);
  font-size: clamp(1rem, 2.3vw, 1.38rem);
}

.hero-search {
  width: min(720px, 100%);
  margin: 0 auto 24px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  outline: none;
  color: var(--lunar-100);
  background: rgba(2, 6, 23, 0.44);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
}

.hero-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-search button,
.primary-btn {
  color: var(--moonlight-950);
  background: var(--golden-500);
}

.hero-search button:hover,
.primary-btn:hover {
  background: var(--golden-400);
  transform: translateY(-1px);
}

.secondary-btn {
  color: var(--lunar-100);
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.78);
}

.secondary-btn:hover {
  border-color: rgba(245, 158, 11, 0.48);
  color: var(--golden-300);
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hero-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  text-align: left;
  backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero-mini-card:hover,
.hero-mini-card.is-active {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-2px);
}

.hero-mini-card img {
  width: 70px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-mini-card strong,
.hero-mini-card em {
  display: block;
}

.hero-mini-card strong {
  color: var(--lunar-50);
  line-height: 1.3;
}

.hero-mini-card em {
  margin-top: 4px;
  color: var(--lunar-400);
  font-size: 0.86rem;
  font-style: normal;
}

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

.muted-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1280px) / 2));
  padding-right: max(16px, calc((100% - 1280px) / 2));
  background: rgba(15, 23, 42, 0.34);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-heading h2,
.page-hero h1,
.movie-detail h1 {
  margin: 0;
  color: var(--lunar-100);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.section-more {
  color: var(--golden-400);
  font-weight: 700;
  white-space: nowrap;
}

.section-more:hover {
  color: var(--golden-300);
}

.movie-grid,
.feature-grid,
.compact-grid,
.category-movie-grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

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

.movie-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(30, 41, 59, 0.66);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--moonlight-900);
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 11;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 38% 1fr;
}

.movie-card-horizontal .poster-wrap {
  aspect-ratio: auto;
  min-height: 178px;
}

.poster-wrap img,
.movie-card-horizontal .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12), transparent);
  opacity: 0.88;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.2rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.7);
}

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

.card-category,
.card-duration {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.68);
}

.card-category {
  top: 10px;
  left: 10px;
  color: var(--golden-300);
}

.card-duration {
  right: 10px;
  bottom: 10px;
  color: #fff;
}

.movie-info {
  display: block;
  padding: 14px;
}

.movie-info strong {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  color: var(--lunar-100);
  font-size: 1rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
  color: var(--golden-300);
}

.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--lunar-400);
  font-size: 0.8rem;
}

.movie-meta span:first-child {
  color: var(--golden-400);
}

.movie-line {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--lunar-400);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.76)),
    radial-gradient(circle at top right, rgba(252, 211, 77, 0.2), transparent 40%);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.56);
}

.category-tile span {
  color: var(--golden-300);
  font-size: 1.35rem;
  font-weight: 800;
}

.category-tile strong {
  color: var(--lunar-300);
  font-weight: 500;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.66)),
    radial-gradient(circle at 72% 0%, rgba(245, 158, 11, 0.2), transparent 34rem);
}

.slim-hero {
  padding: 72px max(16px, calc((100% - 1280px) / 2)) 54px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 16px;
  color: var(--lunar-300);
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

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

.no-result {
  display: none;
  padding: 36px 0;
  color: var(--lunar-400);
  text-align: center;
}

.no-result.is-visible {
  display: block;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.72);
}

.rank-num {
  color: var(--golden-300);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

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

.rank-body strong,
.rank-body span,
.rank-body em {
  display: block;
}

.rank-body strong {
  color: var(--lunar-100);
  font-size: 1.08rem;
}

.rank-body span {
  margin: 5px 0;
  color: var(--golden-400);
  font-size: 0.88rem;
}

.rank-body em {
  color: var(--lunar-400);
  font-style: normal;
}

.rank-score {
  color: var(--golden-300);
  font-size: 1.25rem;
  font-weight: 900;
}

.detail-crumb {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--lunar-400);
  font-size: 0.92rem;
}

.detail-crumb a:hover {
  color: var(--golden-300);
}

.detail-crumb em {
  color: var(--lunar-200);
  font-style: normal;
}

.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.player-shell,
.movie-detail,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.player-shell {
  overflow: hidden;
  margin-bottom: 22px;
}

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

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
}

.player-cover.is-hidden {
  display: none;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--moonlight-950);
  background: var(--golden-400);
  font-size: 2rem;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.38);
}

.player-cover strong {
  font-size: 1.15rem;
}

.movie-detail {
  padding: 28px;
}

.movie-detail h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

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

.detail-meta span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--golden-300);
  background: rgba(120, 53, 15, 0.3);
  font-size: 0.9rem;
}

.lead-text {
  color: var(--lunar-200);
  font-size: 1.15rem;
}

.movie-detail h2 {
  margin: 28px 0 10px;
  color: var(--lunar-100);
  font-size: 1.35rem;
}

.movie-detail p {
  color: var(--lunar-300);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.detail-poster {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: var(--shadow);
}

.side-card {
  margin-top: 18px;
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  color: var(--lunar-100);
}

.side-card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: var(--lunar-300);
}

.side-card strong {
  color: var(--lunar-400);
}

.side-card a {
  color: var(--golden-300);
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

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

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

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--lunar-100);
  font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: var(--lunar-400);
}

.site-footer a:hover {
  color: var(--golden-300);
}

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

@media (max-width: 1180px) {
  .compact-grid,
  .category-movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .header-chips {
    display: none;
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .hero-mini-list,
  .feature-grid,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid-large,
  .category-movie-grid,
  .horizontal-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    gap: 20px;
  }

  .detail-side {
    order: -1;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    width: min(100% - 24px, 1060px);
    padding-top: 56px;
  }

  .hero-search,
  .filter-panel,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .hero-search {
    display: grid;
  }

  .hero-mini-list,
  .feature-grid,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid-large,
  .category-movie-grid,
  .horizontal-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .content-section {
    width: min(100% - 24px, 1280px);
    padding: 46px 0;
  }

  .slim-hero {
    padding: 52px 12px 42px;
  }

  .movie-detail {
    padding: 20px;
  }

  .rank-score {
    justify-self: start;
  }
}
