:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 6%, rgba(249, 115, 22, 0.14), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 78%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.brand-text {
  font-size: 1.12rem;
  white-space: nowrap;
}

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

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  width: 300px;
  padding: 4px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 8px 12px;
}

.nav-search input::placeholder {
  color: #64748b;
}

.nav-search button,
.primary-button,
.secondary-button,
.section-link,
.category-card a,
.search-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.nav-search button {
  padding: 8px 14px;
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.section-link,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 700;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.nav-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.section-link:hover,
.category-card a:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.32);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 10px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-track {
  position: relative;
  width: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.84) 38%, rgba(15, 23, 42, 0.36) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 132px 0 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 52px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.score-badge,
.rank-number,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
}

.eyebrow {
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 0.88rem;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
}

.hero h1 span,
.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, #fde68a, #fb923c 52%, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.breadcrumb,
.search-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.search-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

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

.hero-search {
  display: flex;
  width: min(620px, 100%);
  margin-top: 30px;
  padding: 8px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 16px;
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.8);
  transform: perspective(1000px) rotateY(-7deg) rotateX(3deg);
}

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

.hero-slide.is-active .hero-poster img {
  transform: scale(1.04);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.5), transparent 52%);
}

.hero-card-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.main-section {
  padding: 58px 0;
}

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

.section-head h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-head p,
.category-card p,
.page-hero p,
.detail-section p,
.movie-card p,
.footer-inner p {
  color: var(--text-soft);
  line-height: 1.75;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.7));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.55), transparent 48%);
}

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 44px;
  height: 28px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
}

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

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.72rem;
}

.card-meta span {
  padding: 3px 7px;
}

.movie-card h3 {
  min-height: 2.65em;
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.breadcrumb a:hover,
.rank-title:hover,
.footer-links a:hover {
  color: #fbbf24;
}

.movie-card p {
  min-height: 4.9em;
  margin: 0;
  font-size: 0.9rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
}

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

.category-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2), transparent 58%),
    rgba(15, 23, 42, 0.7);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.2);
}

.category-card h2,
.category-card h3 {
  margin: 10px 0 8px;
}

.category-card a {
  display: inline-flex;
  padding: 10px 16px;
  margin-top: 14px;
  font-weight: 700;
}

.category-pill {
  width: 42px;
  height: 42px;
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.38);
}

.rank-number {
  width: 42px;
  height: 42px;
  font-weight: 900;
}

.rank-poster {
  width: 78px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.rank-title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 1.08rem;
  font-weight: 800;
}

.rank-desc {
  margin: 0;
  color: var(--text-soft);
}

.rank-score {
  min-width: 70px;
  text-align: right;
  color: #fbbf24;
  font-weight: 900;
}

.page-wrap,
.detail-wrap {
  padding-top: 112px;
  padding-bottom: 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 16% 0%, rgba(245, 158, 11, 0.24), transparent 30rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.74));
  box-shadow: var(--shadow);
}

.page-hero.compact h1 {
  font-size: clamp(2rem, 5vw, 4.1rem);
}

.search-panel {
  margin: 22px 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  display: flex;
  gap: 12px;
  min-height: 50px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(30, 41, 59, 0.58);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.16);
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  margin: 0 0 22px;
}

.detail-player {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 48%, rgba(245, 158, 11, 0.28), transparent 26%),
    rgba(2, 6, 23, 0.18);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
  display: grid;
  place-items: center;
  width: clamp(76px, 11vw, 108px);
  height: clamp(76px, 11vw, 108px);
  padding-left: 7px;
  border-radius: 50%;
  font-size: clamp(2rem, 5vw, 3.4rem);
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.36);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin-top: 30px;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

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

.detail-body,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.18);
}

.detail-body {
  padding: 30px;
}

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

.detail-meta {
  margin: 18px 0;
}

.detail-lead {
  margin: 20px 0 28px;
  color: #fde68a;
  font-size: 1.12rem;
  line-height: 1.8;
}

.detail-section {
  padding: 26px;
  margin-top: 24px;
}

.detail-section p {
  margin: 12px 0 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--text-soft);
}

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

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

  .nav-search {
    width: 240px;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: 68px;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

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

  .site-nav a {
    text-align: center;
  }

  .nav-search {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 104px;
    gap: 28px;
  }

  .hero-poster {
    width: min(320px, 78vw);
    margin: 0 auto;
    transform: none;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-cover {
    max-width: 320px;
  }

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .main-section,
  .page-wrap,
  .detail-wrap {
    width: min(100% - 22px, 1180px);
  }

  .hero-inner {
    width: min(100% - 22px, 1180px);
    padding-bottom: 78px;
  }

  .hero-search,
  .search-box {
    flex-direction: column;
  }

  .hero-search input,
  .search-box input {
    min-height: 42px;
  }

  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

  .movie-card p {
    min-height: 0;
  }

  .page-hero,
  .detail-body,
  .detail-section {
    padding: 22px;
    border-radius: 24px;
  }

  .brand-text {
    font-size: 1rem;
  }
}
