:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(51, 65, 85, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #34d399;
  --accent-strong: #10b981;
  --gold: #fbbf24;
  --red: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(180, 83, 9, 0.13), transparent 30rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86));
  z-index: -1;
}

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

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

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.26);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 48%, rgba(2, 6, 23, 0.86)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.22));
  backdrop-filter: blur(4px);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  padding: 110px 0 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 58px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.tag-cloud,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.tag-cloud span,
.detail-meta span,
.meta-line span {
  padding: 8px 12px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.66);
}

.hero-actions,
.section-head,
.meta-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.ghost-btn,
.site-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.primary-btn,
.site-search-form button {
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.22);
}

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

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.8));
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #022c22;
  font-weight: 800;
  background: var(--accent);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-controls button,
.hero-dot {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.active {
  width: 32px;
  background: var(--accent);
}

.search-band {
  margin-top: -36px;
  position: relative;
  z-index: 8;
}

.site-search-form {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.site-search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 16px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.58);
}

.content-section,
.page-hero {
  padding: 72px 0 0;
}

.page-hero {
  padding-top: 96px;
}

.page-hero h1 {
  max-width: 880px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.section-head a {
  color: var(--accent);
  font-weight: 800;
}

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

.category-tile,
.category-board,
.rank-panel,
.detail-main,
.detail-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-tile {
  min-height: 132px;
  padding: 20px;
  display: grid;
  align-content: space-between;
  transition: 0.24s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-board:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.44);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em,
.rank-info em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.84);
  transition: 0.24s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(30, 41, 59, 0.86));
  transition: transform 0.5s ease;
}

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

.year-badge,
.play-badge {
  position: absolute;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  color: #022c22;
  background: rgba(52, 211, 153, 0.92);
}

.play-badge {
  left: 10px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
}

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

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

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.meta-line {
  justify-content: space-between;
  gap: 8px;
}

.meta-line span {
  padding: 5px 8px;
  font-size: 12px;
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.small-head h2 {
  font-size: 26px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
}

.rank-row:hover {
  border-color: rgba(52, 211, 153, 0.44);
}

.rank-row img {
  width: 48px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.82);
}

.rank-no {
  color: var(--gold);
  font-weight: 900;
}

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

.rank-info strong,
.rank-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--accent);
  font-weight: 900;
}

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

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

.category-board {
  padding: 18px;
  transition: 0.24s ease;
}

.category-board-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-board-images img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
}

.category-board h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-board p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 590px;
  padding: 96px 0 64px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
}

.breadcrumbs a:hover,
.detail-side a:hover {
  color: var(--accent);
}

.player-section {
  margin-top: -48px;
  position: relative;
  z-index: 6;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--text);
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #022c22;
  background: var(--accent);
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.34);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 42px;
}

.detail-main,
.detail-side {
  padding: 28px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-main p {
  color: var(--soft);
  font-size: 16px;
  line-height: 2;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: -34px 0 0 86px;
  color: var(--soft);
}

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

.footer-grid {
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

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

.site-footer h3 {
  margin: 0 0 14px;
}

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }
  .mobile-toggle {
    display: grid;
    place-items: center;
  }
  .hero,
  .hero-content {
    min-height: 760px;
  }
  .hero-content,
  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-poster,
  .detail-cover {
    width: min(260px, 70vw);
  }
  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(38px, 13vw, 58px);
  }
  .hero-actions,
  .site-search-form,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .movie-grid,
  .compact-grid,
  .full-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-grid,
  .category-board-grid,
  .tall-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .rank-row {
    grid-template-columns: 30px 42px minmax(0, 1fr);
  }
  .rank-score {
    display: none;
  }
}

@media (max-width: 430px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }
  .movie-grid,
  .compact-grid,
  .full-grid {
    gap: 12px;
  }
  .movie-card-body {
    padding: 12px;
  }
}
