:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --rose-600: #e11d48;
  --blue-600: #2563eb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
}

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;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.25);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

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

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--slate-900);
  background: var(--emerald-500);
  border-radius: 999px;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
}

.main-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--emerald-500);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.15);
  transform: scale(1.12);
  opacity: 0.45;
}

.hero-slide::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.24) 36%, rgba(2, 6, 23, 0.82));
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 1;
}

.hero-bg-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.7s ease;
}

.hero-slide.is-active .hero-bg-grid img {
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  max-width: 900px;
  min-height: 70vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  color: #d1fae5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  backdrop-filter: blur(14px);
}

.hero-content h1,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-main .lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

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

.hero-tags {
  justify-content: center;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #d1fae5;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 999px;
  background: rgba(4, 120, 87, 0.16);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

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

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

.btn.primary {
  color: var(--white);
  background: var(--emerald-600);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.34);
}

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

.btn.glass,
.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--emerald-500);
}

.section {
  padding: 72px 0;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: linear-gradient(135deg, var(--slate-100), var(--slate-50));
}

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

.section-head h2,
.section-head h3 {
  margin: 0 0 10px;
  color: var(--slate-800);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-head.slim {
  align-items: center;
  margin-bottom: 18px;
}

.section-head.slim h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
}

.section-head.slim h3::before {
  content: "";
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--emerald-600);
}

.section-head p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.section-link,
.section-head a {
  color: var(--emerald-700);
  font-weight: 800;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-900);
}

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

.movie-card:hover img {
  transform: scale(1.09);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.44);
  transition: opacity 0.25s ease;
}

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

.play-dot {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  background: rgba(16, 185, 129, 0.86);
  border-radius: 999px;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.18);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  border-radius: 8px;
  background: var(--emerald-600);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: block;
  overflow: hidden;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: var(--emerald-700);
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin-top: 8px;
  color: var(--slate-600);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--slate-500);
  font-size: 12px;
}

.category-stack {
  display: grid;
  gap: 44px;
}

.category-strip {
  min-width: 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.35), transparent 38%), linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.page-hero.compact {
  padding: 78px 0 58px;
}

.page-hero h1 {
  color: var(--white);
}

.search-panel {
  max-width: 560px;
  margin-top: 30px;
}

.card-search {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  color: var(--slate-800);
  font-size: 16px;
  border: 0;
  border-radius: 18px;
  outline: none;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 128px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-no {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--slate-700);
  font-size: 18px;
  font-weight: 900;
  border-radius: 999px;
  background: var(--slate-100);
}

.top-rank .rank-no {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-600), var(--emerald-600));
}

.rank-row img {
  width: 128px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info strong,
.rank-info em,
.rank-info span {
  display: block;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  overflow: hidden;
  margin: 6px 0;
  color: var(--slate-600);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info span {
  color: var(--slate-500);
  font-size: 13px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.15);
  transform: scale(1.1);
  opacity: 0.42;
}

.detail-wrap {
  position: relative;
  z-index: 3;
  padding: 36px 0 82px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-main .lead {
  color: #e2e8f0;
}

.detail-tags {
  margin-top: 24px;
}

.player-section {
  background: #020617;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.36);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 6px;
  font-size: 36px;
  border-radius: 999px;
  background: var(--emerald-600);
  box-shadow: 0 0 0 16px rgba(16, 185, 129, 0.18);
}

.player-start.is-hidden {
  display: none;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.movie-article,
.movie-side {
  padding: 30px;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.movie-article h2,
.movie-side h2 {
  margin: 0 0 16px;
  color: var(--slate-800);
  font-size: 26px;
}

.movie-article p {
  margin: 0 0 26px;
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.9;
}

.movie-side dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 13px 14px;
  margin: 0;
}

.movie-side dt {
  color: var(--slate-500);
}

.movie-side dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 700;
}

.movie-side a {
  color: var(--emerald-700);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 52px 0;
}

.footer-brand {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 24px;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a:hover {
  color: var(--emerald-500);
}

.copyright {
  padding: 20px 0;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

@media (max-width: 1024px) {
  .main-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-shell {
    min-height: 66px;
  }

  .main-nav {
    display: none;
  }

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

  .brand-text strong {
    font-size: 20px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-bg-grid {
    grid-template-columns: 1fr;
  }

  .hero-bg-grid img:nth-child(n+2) {
    display: none;
  }

  .hero-content {
    align-items: flex-start;
    text-align: left;
  }

  .hero-tags,
  .hero-actions {
    justify-content: flex-start;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-block;
    margin-top: 14px;
  }

  .movie-grid,
  .movie-grid.full,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body strong {
    font-size: 15px;
  }

  .card-body em {
    min-height: 38px;
    font-size: 12px;
  }

  .tag-row {
    display: none;
  }

  .rank-row {
    grid-template-columns: 38px 92px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-no {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .rank-row img {
    width: 92px;
    height: 58px;
  }

  .rank-info strong {
    font-size: 15px;
  }

  .rank-info em {
    display: none;
  }

  .detail-wrap {
    padding-bottom: 52px;
  }

  .detail-main h1 {
    font-size: 38px;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .movie-article,
  .movie-side {
    padding: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 36px 0;
  }
}
