:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-strong: 0 28px 70px rgba(2, 6, 23, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  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.02em;
  color: var(--slate-900);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
}

.brand-text {
  font-size: 1.05rem;
}

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

.nav-link,
.nav-drop-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--slate-600);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-drop-menu a:hover {
  color: var(--emerald-700);
  background: var(--emerald-100);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-button {
  border: 0;
  background: transparent;
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  color: var(--slate-900);
  background: var(--slate-100);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700) 48%, var(--emerald-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.6fr);
  align-items: center;
  gap: 56px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 112px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-backdrop,
.page-hero::before,
.detail-hero::before,
.category-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(5, 150, 105, 0.72)), var(--hero-cover);
  background-size: cover;
  background-position: center;
  opacity: 0.72;
}

.hero::after {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -30%;
  width: 55vw;
  height: 55vw;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 62%);
  pointer-events: none;
}

.hero-content,
.hero-poster,
.hero-controls,
.page-hero .container,
.detail-hero-grid {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--emerald-100);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-intro p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-tags span {
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-row span {
  color: var(--slate-600);
  background: var(--slate-100);
}

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.32);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
  box-shadow: var(--shadow-strong);
}

.hero-poster img,
.poster-frame img,
.rank-thumb img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img.is-hidden,
.poster-frame img.is-hidden,
.rank-thumb img.is-hidden,
.detail-cover img.is-hidden {
  display: none;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel {
  position: relative;
  z-index: 3;
  margin-top: -36px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.search-panel h2,
.section-heading h2,
.footer-grid h2,
.detail-article h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-heading p,
.footer-grid p {
  margin: 6px 0 0;
  color: var(--slate-500);
}

.search-box {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--slate-50);
}

.search-box span {
  color: var(--emerald-700);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--slate-800);
  background: transparent;
}

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

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

.section-heading.slim {
  align-items: center;
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  color: var(--emerald-700);
  font-weight: 900;
  border-radius: 999px;
  background: var(--emerald-100);
  white-space: nowrap;
}

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

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

.category-card {
  position: relative;
  min-height: 228px;
  overflow: hidden;
  border-radius: var(--radius-md);
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-cover {
  position: absolute;
  inset: 0;
}

.category-cover::before {
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.88)), var(--category-cover);
}

.category-body {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 228px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.category-body strong {
  font-size: 1.28rem;
  line-height: 1.2;
}

.category-body em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  font-style: normal;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.category-samples span {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.poster-frame img {
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.75rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  display: flex;
  min-height: 188px;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-card-body strong {
  overflow: hidden;
  color: var(--slate-900);
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-meta {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 0.8rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: var(--white);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.home-rank .rank-item {
  grid-template-columns: 34px 54px minmax(0, 1fr);
}

.home-rank .rank-score {
  display: none;
}

.rank-number {
  color: var(--emerald-700);
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  width: 64px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.home-rank .rank-thumb {
  width: 54px;
}

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

.rank-copy strong,
.rank-copy em,
.rank-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy strong {
  color: var(--slate-900);
  font-weight: 900;
}

.rank-copy em {
  color: var(--slate-600);
  font-size: 0.86rem;
  font-style: normal;
}

.rank-copy span,
.rank-score {
  color: var(--slate-500);
  font-size: 0.8rem;
}

.rank-score {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--slate-100);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700) 50%, var(--emerald-700));
}

.compact-hero {
  padding: 92px 0 84px;
}

.category-hero::before {
  background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64), rgba(5, 150, 105, 0.66)), var(--hero-cover);
}

.page-search {
  margin-top: -32px;
}

.full-rank {
  padding-bottom: 24px;
}

.full-rank .rank-item {
  grid-template-columns: 64px 74px minmax(0, 1fr) auto;
}

.detail-hero {
  padding: 72px 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
  box-shadow: var(--shadow-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
  padding-top: 42px;
}

.player-card,
.detail-article {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: var(--slate-950);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  box-shadow: 0 22px 40px rgba(5, 150, 105, 0.34);
  font-size: 2.1rem;
}

.detail-article {
  padding: 26px;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article p {
  margin: 0 0 22px;
  color: var(--slate-600);
}

.detail-meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-meta-list div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--slate-100);
}

.detail-meta-list dt {
  color: var(--slate-500);
  font-weight: 900;
}

.detail-meta-list dd {
  margin: 0;
  color: var(--slate-800);
}

.site-footer {
  margin-top: 78px;
  padding: 48px 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 40px;
}

.footer-brand,
.footer-grid h2 {
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.footer-links a {
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: var(--emerald-100);
  background: rgba(16, 185, 129, 0.18);
}

[data-card].is-hidden-card {
  display: none;
}

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header-inner {
    min-height: 64px;
  }

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
  }

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

  .nav-link {
    justify-content: center;
  }

  .nav-dropdown,
  .nav-drop-menu {
    position: static;
  }

  .nav-drop-menu {
    width: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 0;
    background: var(--slate-50);
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 64px 0 112px;
  }

  .hero-poster {
    justify-self: start;
    width: min(240px, 70vw);
  }

  .search-panel,
  .section-heading,
  .footer-grid {
    display: grid;
  }

  .search-panel {
    align-items: stretch;
  }

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

  .rank-item,
  .full-rank .rank-item {
    grid-template-columns: 44px 56px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

  .detail-cover {
    width: min(240px, 68vw);
  }
}

@media (max-width: 520px) {
  .container,
  .site-header-inner,
  .hero-slide {
    width: min(100% - 24px, 1180px);
  }

  .hero h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: clamp(2rem, 14vw, 3.2rem);
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .compact-grid,
  .category-movie-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .poster-frame {
    min-height: 174px;
  }

  .movie-card-body {
    min-height: auto;
  }

  .full-rank .rank-item,
  .rank-item {
    padding: 10px;
  }
}
