:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --panel: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --brand: #475569;
  --brand-light: #e2e8f0;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  box-shadow: 0 12px 24px rgba(226, 232, 240, 0.18);
}

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

.site-nav a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
}

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

.header-search input,
.filter-controls input,
.filter-controls select,
.search-band input {
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
}

.header-search input {
  width: 230px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.search-band button,
.primary-btn {
  border: 0;
  cursor: pointer;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 28px;
}

.hero-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 48px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 94px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.94));
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(120%);
}

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

.hero-kicker,
.page-hero span {
  display: inline-flex;
  color: #cbd5e1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  color: #e2e8f0;
  font-size: clamp(26px, 3vw, 40px);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-cloud span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.18);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.42);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.36);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
}

.hero-poster {
  display: block;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateY(-7deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
}

.hero-dots button.active {
  background: #ffffff;
}

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -44px;
  position: relative;
  z-index: 8;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.search-band form,
.quick-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-band label {
  color: var(--dark);
  font-weight: 900;
}

.search-band input {
  min-width: min(360px, 70vw);
}

.quick-links a,
.text-link {
  color: #334155;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 64px 0 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  color: #0f172a;
}

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

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

.movie-card h3 a:hover,
.rank-info h2 a:hover {
  color: #475569;
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.meta-line span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 8px;
}

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

.rank-panel,
.category-card,
.category-overview-card,
.story-card,
.info-card,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-panel h2,
.story-card h2,
.info-card h2 {
  margin: 0 0 10px;
}

.rank-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.mini-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.mini-rank,
.mini-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  border-radius: 9px;
  background: #334155;
  font-size: 12px;
  font-weight: 900;
}

.mini-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.mini-meta {
  color: var(--muted);
  font-size: 12px;
}

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

.category-card {
  padding: 22px;
}

.category-card strong,
.category-overview-head h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card span,
.category-overview-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.category-samples a {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 7px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

.site-footer nav {
  display: flex;
  gap: 18px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #0f172a 68%, #334155);
}

.page-hero {
  padding: 92px 0;
}

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

.page-hero h1 {
  margin: 14px 0;
  font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel {
  margin-top: 32px;
  padding: 24px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: #0f172a;
  border-radius: 14px;
  font-weight: 900;
}

.rank-thumb img {
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.heat-score {
  justify-self: end;
  color: #0f172a;
  font-size: 20px;
}

.detail-hero {
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 82px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.crumb {
  color: #cbd5e1;
}

.detail-main h1 {
  margin: 12px 0 16px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.06;
}

.detail-one-line {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: #0f172a;
  background: #ffffff;
  border-radius: 50%;
  font-size: 30px;
}

.play-overlay strong {
  font-size: 18px;
}

.player-box.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 34px;
}

.story-card,
.info-card {
  padding: 24px;
}

.story-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.info-card {
  grid-row: span 2;
}

.info-card dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  font-weight: 800;
}

.hidden-by-filter {
  display: none !important;
}

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav,
  .header-search {
    display: none;
    width: 100%;
  }

  .site-nav.is-open,
  .header-search.is-open {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
  }

  .header-search input {
    flex: 1;
    width: auto;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 54px;
  }

  .hero-poster {
    width: min(270px, 72vw);
    transform: none;
  }

  .search-band,
  .search-band form {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-links {
    justify-content: center;
  }

  .category-grid,
  .category-overview-grid,
  .detail-hero-inner,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(300px, 76vw);
  }

  .rank-card {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .heat-score {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .movie-grid,
  .feature-grid,
  .compact-grid,
  .category-movie-grid,
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-inner,
  .site-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }
}
