* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --rose: #fb7185;
  --cyan: #22d3ee;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
}

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

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

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

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

.header-inner,
.section-wrap,
.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--rose));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.3);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  opacity: 0.86;
}

.hero-bg .poster-large {
  width: min(58vw, 780px);
  min-height: 100%;
  border-radius: 0;
  filter: saturate(1.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 36%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1240px) / 2));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--amber-light);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 14px;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 740px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.card-meta span,
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.52);
  color: #cbd5e1;
  font-size: 0.82rem;
}

.hero-actions,
.filter-bar,
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-light), var(--rose));
  color: #111827;
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.52);
  color: var(--text);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

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

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

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

.section-head h2,
.ranking-box h2,
.text-panel h2 {
  margin: 6px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.text-link {
  color: var(--amber-light);
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -52px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel h2 {
  margin: 6px 0 0;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

.search-box input {
  flex: 1 1 260px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  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.45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.poster-art {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.24), transparent 22%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.78), rgba(244, 63, 94, 0.82) 46%, rgba(14, 165, 233, 0.78));
}

.poster-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.18) 36% 38%, transparent 38% 100%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.22), transparent 18%);
}

.poster-art::after {
  content: attr(data-cover-index);
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 800;
  font-size: 1rem;
}

.poster-art span {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.28);
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 900;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--amber-light);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.ranking-box,
.overview-card,
.text-panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.ranking-box {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr 54px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: var(--amber-light);
  font-weight: 900;
}

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

.rank-year {
  color: var(--muted);
  text-align: right;
}

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

.category-tile,
.overview-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  transition: 0.2s ease;
}

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

.category-tile strong,
.overview-title {
  display: block;
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.category-tile span,
.overview-count {
  color: var(--amber-light);
  font-weight: 700;
}

.category-tile p,
.overview-card p {
  color: var(--muted);
  margin: 10px 0 0;
}

.overview-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.overview-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  color: #cbd5e1;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 18px;
}

.compact-hero h1 {
  max-width: 920px;
}

.filter-bar {
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  max-width: 320px;
}

.search-large input {
  max-width: 520px;
}

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 42px;
  align-items: center;
  padding: 56px 0 32px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-poster .poster-large {
  min-height: 560px;
}

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

.breadcrumb a:hover {
  color: var(--amber-light);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 38%, rgba(245, 158, 11, 0.2), transparent 28%),
    #000000;
}

.player-start {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 116px;
  height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.3);
}

.player-start.hidden {
  display: none;
}

.player-note {
  color: var(--muted);
  margin: 14px 0 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  padding: 28px;
}

.text-panel p {
  color: #cbd5e1;
  margin-bottom: 0;
}

.table-wrap {
  overflow: auto;
}

.ranking-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ranking-table th {
  color: var(--amber-light);
  background: rgba(15, 23, 42, 0.88);
}

.ranking-table a:hover {
  color: var(--amber-light);
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
  font-size: 1.15rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--amber-light);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .ranking-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    height: 680px;
  }

  .hero-bg .poster-large {
    width: 100%;
    opacity: 0.42;
  }

  .hero-content {
    margin-left: 16px;
    max-width: calc(100% - 32px);
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

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

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

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

  .detail-poster .poster-large {
    min-height: 360px;
  }
}
