:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(245, 158, 11, 0.22);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-2: #f97316;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.1), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong,
.footer-brand span:last-child {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 330px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.55);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(2, 6, 23, 0.8);
}

.header-search button,
.mobile-search button,
.wide-search button,
.filter-panel button,
.btn-primary,
.btn-ghost {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.filter-panel button:hover,
.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #fbbf24;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.hero-slider {
  position: relative;
  height: min(72vh, 720px);
  min-height: 540px;
  overflow: hidden;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.7) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  bottom: 72px;
  left: max(24px, calc((100vw - var(--max)) / 2));
  width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.section-kicker {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content h2 + h2 {
  margin-top: -4px;
  font-size: clamp(28px, 4.4vw, 54px);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.detail-meta,
.card-meta,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 54px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

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

.section-wrap,
.page-hero,
.breadcrumb,
.detail-hero {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.section-wrap {
  margin-top: 64px;
}

.page-main {
  padding: 42px 0 74px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
  box-shadow: var(--shadow);
}

.home-search-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.wide-search {
  display: flex;
  gap: 12px;
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.detail-text h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.section-heading a {
  color: #fbbf24;
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.card-cover img,
.detail-poster img,
.rank-row img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
  opacity: 0.9;
}

.play-mark,
.player-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.9);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.32);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-mark,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.card-meta span:first-child {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 7px;
  padding: 4px 8px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

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

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

.category-tile,
.category-overview-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.66));
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span,
.category-overview-main span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.category-tile em,
.category-overview-main em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

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

.category-overview-card {
  min-height: auto;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 98px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.34);
}

.rank-number {
  color: #fbbf24;
  font-weight: 950;
  font-size: 18px;
}

.rank-row img {
  width: 68px;
  height: 44px;
  border-radius: 10px;
}

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

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

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

.rank-score {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  font-weight: 900;
}

.page-hero {
  padding: 58px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7)),
    radial-gradient(circle at 82% 10%, rgba(245, 158, 11, 0.18), transparent 24rem);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  margin-bottom: 22px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 130px;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-panel-wide {
  grid-template-columns: minmax(260px, 1fr) 180px 180px 130px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 26px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.62));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-cloud a {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 999px;
  padding: 7px 12px;
}

.player-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 54px auto 0;
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 34px);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.36)),
    radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 32rem);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play-icon {
  position: static;
  transform: none;
  opacity: 1;
  width: 76px;
  height: 76px;
  font-size: 30px;
}

.player-cover strong {
  max-width: min(680px, calc(100% - 40px));
  text-align: center;
  font-size: clamp(24px, 4vw, 44px);
}

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

.detail-text article {
  padding: 28px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-text p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
  margin: 0;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #000000);
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fbbf24;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: #fbbf24;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  padding: 18px 16px 24px;
}

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

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

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

  .split-layout,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-slider {
    height: 620px;
    min-height: 620px;
  }

  .hero-content {
    bottom: 92px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 36px;
  }

  .home-search-panel,
  .wide-search,
  .filter-panel,
  .filter-panel-wide,
  .detail-text {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 32px;
  }
}

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

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text em {
    display: none;
  }

  .movie-grid-3,
  .movie-grid-4,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    text-align: center;
  }

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

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

  .rank-score {
    display: none;
  }
}
