:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #04111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: var(--soft);
  padding: 9px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: white;
  background: rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 28px 0 28px;
}

.hero-shell {
  position: relative;
  min-height: 580px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.72fr;
  gap: 30px;
  align-items: center;
  padding: 62px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.35) 100%),
    var(--poster);
  background-size: cover;
  background-position: center;
  filter: saturate(1.15);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.32), transparent 28rem),
    radial-gradient(circle at 78% 70%, rgba(34, 211, 238, 0.18), transparent 26rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.page-hero > span,
.detail-kicker,
.section-title > span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 650px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.tag-list span,
.meta-pills span {
  color: #dcfce7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.24);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.25);
}

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

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

.primary-btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.hero-poster {
  display: block;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  padding: 10px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster span,
.poster-art,
.detail-poster {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.52)),
    var(--poster),
    linear-gradient(135deg, rgba(16, 185, 129, 0.42), rgba(34, 211, 238, 0.22));
  background-size: cover;
  background-position: center;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
  background: var(--accent);
}

.home-search-wrap {
  margin-top: -20px;
}

.filter-panel {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-title span {
  color: var(--muted);
  font-size: 14px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
}

.filter-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(16, 185, 129, 0.72);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.content-section {
  margin: 58px 0;
}

.section-title {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(15, 23, 42, 0.9);
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.poster-art {
  border-radius: 0;
  transition: transform 0.45s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.year-badge {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: rgba(16, 185, 129, 0.86);
}

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

.card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.heat-score {
  color: var(--accent-2);
}

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

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

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

.tag-list span {
  color: var(--soft);
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.18);
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92)),
    var(--poster),
    linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(34, 211, 238, 0.18));
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.58);
}

.category-card span,
.overview-card span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #dcfce7;
  background: rgba(16, 185, 129, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.category-card strong {
  font-size: 22px;
}

.category-card p,
.overview-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.page-hero {
  position: relative;
  margin: 30px 0;
  min-height: 320px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.64)),
    var(--poster),
    radial-gradient(circle at 25% 20%, rgba(16, 185, 129, 0.28), transparent 24rem),
    #0f172a;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-hero.compact {
  min-height: 250px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.22), transparent 30rem),
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.85);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: -0.05em;
}

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

.page-hero-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.page-hero-meta strong {
  color: var(--accent);
  font-size: 28px;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72)),
    var(--poster);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.overview-card h2 {
  margin: 12px 0 10px;
  font-size: 30px;
}

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

.overview-card li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.42);
}

.overview-card li a:hover {
  color: white;
  background: rgba(16, 185, 129, 0.16);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin: 32px 0;
}

.rank-panel,
.rank-copy {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.rank-panel h2,
.rank-copy h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.rank-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.4);
}

.rank-panel a:hover {
  background: rgba(16, 185, 129, 0.14);
}

.rank-panel strong {
  color: var(--accent);
}

.rank-panel em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-copy p {
  color: var(--soft);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.78)),
    var(--poster);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-info p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 16px 0 22px;
}

.player-section {
  margin: 34px 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.82)),
    var(--poster),
    #020617;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.site-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.78);
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 132px;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  color: #04111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.32);
}

.player-wrap.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 34px 0;
}

.detail-content article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

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

.detail-content p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0;
}

.prev-next a {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--soft);
}

.prev-next a:hover {
  color: white;
  border-color: rgba(16, 185, 129, 0.5);
}

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

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

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  color: var(--soft);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.footer-links a:hover {
  color: white;
  background: rgba(16, 185, 129, 0.14);
}

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

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

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

  .hero-poster {
    justify-self: start;
    width: min(280px, 100%);
  }
}

@media (max-width: 820px) {
  main,
  .header-inner,
  .footer-grid {
    width: min(100% - 22px, 1240px);
  }

  .nav-toggle {
    display: block;
  }

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

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

  .main-nav a {
    width: 100%;
  }

  .hero,
  .hero-shell {
    min-height: 640px;
  }

  .hero-slide {
    padding: 28px;
  }

  .filter-controls,
  .overview-grid,
  .rank-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-panel a {
    grid-template-columns: 36px 1fr;
  }

  .rank-panel em {
    grid-column: 2;
  }

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

@media (max-width: 540px) {
  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-poster {
    display: none;
  }

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

  .prev-next,
  .footer-grid {
    flex-direction: column;
  }

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