:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-2: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --accent: #f59e0b;
  --line: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell,
.footer-shell,
.hero-content,
.content-section,
.detail-shell,
.detail-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-name,
.footer-brand span:last-child {
  font-size: 26px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.24);
}

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

.nav-link {
  color: var(--muted-2);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-light);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.55);
  color: var(--muted-2);
}

.mobile-link.active,
.mobile-link:hover {
  color: #fff;
  background: rgba(2, 132, 199, 0.85);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg-soft);
}

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

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

.hero-slide img,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 45%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.08) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(248, 250, 252, 0.9);
  font-size: 20px;
}

.hero-label,
.heading-kicker,
.pill,
.poster-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 700;
}

.hero-label {
  margin-bottom: 22px;
  padding: 8px 16px;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
}

.hero-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
}

.hero-meta {
  margin-bottom: 34px;
}

.hero-actions,
.center-action {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 34px rgba(2, 132, 199, 0.34);
}

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

.primary-btn:hover {
  background: var(--primary-dark);
}

.ghost-btn {
  border: 1px solid rgba(203, 213, 225, 0.22);
  background: rgba(15, 23, 42, 0.54);
  color: #fff;
}

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

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

.hero-dot.active {
  background: var(--primary-light);
}

.search-strip {
  margin-top: -32px;
  position: relative;
  z-index: 8;
}

.search-box {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.7);
  color: #fff;
  outline: none;
  padding: 0 16px;
}

.search-box a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 18px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

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

.dark-band {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1200px) / 2));
  padding-right: max(16px, calc((100% - 1200px) / 2));
  background: rgba(15, 23, 42, 0.45);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.heading-kicker {
  margin-bottom: 8px;
  color: var(--primary-light);
  font-size: 14px;
}

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

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

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

.movie-card {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card-2);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}

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

.movie-card:hover .poster-wrap img,
.wide-card:hover img,
.category-tile:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-category {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

.poster-play,
.play-badge {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  font-size: 22px;
}

.movie-card:hover .poster-play,
.wide-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-info {
  padding-top: 14px;
}

.card-info h3,
.wide-info h3,
.rank-item h3,
.rank-row h3 {
  margin: 0;
  color: #fff;
  line-height: 1.35;
}

.card-info h3 {
  min-height: 46px;
  font-size: 16px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-info p {
  min-height: 48px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover h3,
.wide-card:hover h3,
.rank-item:hover h3,
.rank-row:hover h3 {
  color: var(--primary-light);
}

.meta-line {
  gap: 10px;
  font-size: 13px;
}

.meta-line span:first-child {
  color: var(--accent);
}

.tag-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag-line span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.88);
  color: var(--muted-2);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background: var(--bg-card-2);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.08));
}

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

.category-tile span {
  font-size: 24px;
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--muted-2);
}

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

.rank-item,
.rank-row,
.wide-card {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.46);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item {
  padding: 14px;
}

.rank-item:hover,
.rank-row:hover,
.wide-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.78);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  font-weight: 900;
}

.rank-item img {
  width: 86px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-card);
}

.rank-item p,
.rank-row p,
.wide-info p {
  margin: 6px 0;
  color: var(--muted);
}

.center-action {
  justify-content: center;
  margin-top: 28px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.25), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.small-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
}

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

.small-hero h1 {
  max-width: 800px;
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.small-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted-2);
  font-size: 18px;
}

.filter-bar {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
}

.full-filter {
  grid-template-columns: 1fr 170px 150px 150px 170px;
}

.ranking-page-list {
  display: grid;
  gap: 16px;
}

.rank-row {
  padding: 16px;
}

.rank-row img {
  width: 96px;
  height: 134px;
  flex: 0 0 96px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--bg-card);
}

.rank-main {
  min-width: 0;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: var(--bg-soft);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.96)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.12));
  backdrop-filter: blur(5px);
}

.detail-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 64px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: var(--bg-card-2);
}

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

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

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 780px;
  margin: 0 0 24px;
  color: rgba(248, 250, 252, 0.9);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.74);
  color: var(--muted-2);
}

.detail-meta span:first-child {
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.player-section {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(2, 132, 199, 0.18), rgba(2, 6, 23, 0.42)),
    rgba(2, 6, 23, 0.15);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.95);
  font-size: 34px;
  box-shadow: 0 16px 44px rgba(2, 132, 199, 0.4);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 42px 0 24px;
}

.detail-content article,
.detail-content aside {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  padding: 28px;
}

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

.detail-content p {
  margin: 0 0 16px;
  color: var(--muted-2);
}

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

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

.detail-content dd {
  margin: -8px 0 0;
  color: #fff;
}

.wide-card {
  padding: 12px;
}

.wide-cover {
  position: relative;
  width: 180px;
  height: 104px;
  flex: 0 0 180px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
}

.wide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
}

.wide-info {
  min-width: 0;
}

.pill {
  padding: 4px 8px;
  background: rgba(2, 132, 199, 0.9);
  color: #fff;
  font-size: 12px;
}

.site-footer {
  margin-top: 72px;
  background: #0f172a;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}

.footer-shell {
  padding: 52px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 30px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.footer-grid a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.movie-filter-item.is-hidden {
  display: none;
}

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

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

  .full-filter {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

  .hero-slider {
    min-height: 620px;
  }

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

  .search-box,
  .filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-box {
    display: grid;
  }

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

  .detail-shell,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 320px;
  }

  .rank-row {
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .hero-content,
  .content-section,
  .detail-shell,
  .detail-content,
  .player-section {
    width: min(100% - 24px, 1200px);
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-slider {
    height: auto;
    min-height: 640px;
  }

  .hero-content p,
  .lead {
    font-size: 16px;
  }

  .movie-grid,
  .large-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .poster-wrap {
    border-radius: 16px;
  }

  .card-info p,
  .tag-line {
    display: none;
  }

  .rank-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    align-items: flex-start;
  }

  .rank-item img {
    width: 64px;
    height: 88px;
  }

  .rank-row img {
    width: 72px;
    height: 100px;
    flex-basis: 72px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-shell {
    padding: 36px 0;
  }

  .detail-info h1 {
    font-size: 36px;
  }

  .player-start span {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
