:root {
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --white: #ffffff;
  --emerald: #10b981;
  --teal: #0d9488;
  --slate: #111827;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #0f172a 0%, #1f2937 48%, #0f172a 100%);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.3);
}

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

.brand-copy strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand-copy em {
  color: #99f6e4;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: #d1d5db;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 4px;
  background: #fff;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px 16px;
}

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

.mobile-link {
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 34%, rgba(16, 185, 129, 0.32), transparent 33%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding-top: 42px;
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecfeff;
  font-size: 13px;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 18px;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.28);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.btn.ghost.dark {
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.btn.wide {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.search-strip,
.content-section,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  margin-top: -46px;
  position: relative;
  z-index: 10;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel span,
.section-head span,
.side-panel span,
.page-hero span,
.overview-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-panel h2,
.section-head h2,
.side-panel h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 10px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.home-search input {
  width: 100%;
  padding: 0 16px;
}

.home-search button {
  min-width: 92px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.content-section {
  padding: 64px 0 0;
}

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

.section-more {
  color: var(--teal);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.card-meta,
.rank-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3,
.rank-copy h3 {
  margin: 6px 0;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.rank-copy h3 a:hover,
.side-list a:hover strong {
  color: var(--teal);
}

.movie-card p,
.rank-copy p,
.side-panel p,
.overview-card p,
.page-hero p,
.article-block p,
.detail-meta-card p {
  color: var(--muted);
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row.small span {
  padding: 4px 8px;
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.18);
  background: #f0fdfa;
  font-size: 12px;
}

.rank-grid {
  display: grid;
  gap: 18px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-poster b {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.rank-score {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 900;
}

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

.category-tile,
.overview-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 24px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
}

.category-tile img,
.overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-tile:hover img,
.overview-card:hover img {
  transform: scale(1.06);
}

.category-tile::after,
.overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.18));
}

.category-tile span,
.category-tile p,
.overview-card div {
  position: relative;
  z-index: 2;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

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

.category-tile p {
  margin: 6px 0 0;
  color: #dbeafe;
  font-size: 13px;
}

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

.side-panel {
  position: sticky;
  top: 98px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: var(--shadow);
}

.side-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.side-list a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 72% 22%, rgba(16, 185, 129, 0.45), transparent 28%),
    linear-gradient(135deg, #0f172a, #1f2937 55%, #0f766e);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

.page-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.compact-hero > div {
  padding: 70px 0;
}

.category-hero > div {
  padding: 76px 0;
}

.overview-card {
  min-height: 260px;
  grid-column: span 1;
}

.overview-card div {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.overview-card h2 {
  margin: 6px 0;
  font-size: 24px;
}

.overview-card p {
  color: #dbeafe;
}

.filter-bar {
  position: sticky;
  top: 88px;
  z-index: 20;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.filter-bar input {
  flex: 1;
  min-width: 180px;
  padding: 0 14px;
}

.filter-bar select {
  width: 160px;
  padding: 0 12px;
}

.detail-shell {
  padding-top: 34px;
}

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

.breadcrumbs a:hover {
  color: var(--teal);
}

.breadcrumbs em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  margin-top: 22px;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.25);
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: blur(1px) saturate(1.05);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.72));
}

.play-button {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.35);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid #fff;
}

.article-block,
.detail-meta-card {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.article-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  font-size: 16px;
}

.detail-aside {
  position: sticky;
  top: 98px;
}

.detail-poster {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-meta-card h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.detail-meta-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta-card dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-meta-card dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.detail-tags span {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.18);
  background: #f0fdfa;
}

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

.related-card .movie-card-body p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-inner p {
  margin: 6px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a:hover {
  color: #fff;
}

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

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

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

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

  .side-panel,
  .detail-aside {
    position: static;
  }

  .detail-aside {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
  }

  .detail-meta-card {
    margin-top: 0;
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding: 92px 0 84px;
    justify-content: flex-end;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .home-search,
  .filter-bar,
  .footer-inner,
  .detail-aside {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-bar select {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.slim,
  .rank-grid.compact,
  .rank-grid.full,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: 90px 1fr;
  }

  .content-section {
    padding-top: 46px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.slim,
  .rank-grid.compact,
  .rank-grid.full,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 96px 1fr;
  }

  .page-hero > div {
    padding: 56px 0;
  }

  .detail-meta-card h1 {
    font-size: 26px;
  }
}
