:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --teal-50: #f0fdfa;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 28px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
}

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

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

button,
input {
  font: inherit;
}

.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-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

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

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--slate-900);
  background: var(--emerald-400);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.16);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--slate-400);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-nav-link {
  border-radius: 12px;
  color: var(--slate-200);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 12px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}

.nav-link-soft {
  color: var(--slate-400);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--slate-900);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 1.2s ease;
}

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

.hero-slide img,
.category-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(15, 23, 42, 0.60) 44%, var(--slate-50) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy,
.page-hero-copy {
  max-width: 720px;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero-copy .eyebrow,
.page-hero-copy .eyebrow,
.slim-hero .eyebrow {
  color: var(--emerald-100);
  background: rgba(16, 185, 129, 0.20);
  border: 1px solid rgba(209, 250, 229, 0.28);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 18px;
  color: var(--emerald-400);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  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: var(--white);
  background: var(--emerald-600);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.30);
}

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

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(12px);
}

.btn-ghost.dark {
  color: var(--slate-700);
  border-color: var(--slate-200);
  background: var(--white);
}

.full-btn {
  width: 100%;
}

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

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

.hero-dots button.active {
  width: 34px;
  background: var(--emerald-400);
}

.section {
  padding: 56px 0;
}

.search-section {
  padding-top: 40px;
}

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

.section-head h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.text-link {
  color: var(--emerald-700);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-500);
}

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

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-filters button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--slate-600);
  background: var(--slate-100);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.quick-filters button:hover,
.quick-filters button.active {
  color: var(--white);
  background: var(--emerald-600);
}

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

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

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

.feature-band {
  width: min(1180px, calc(100% - 32px));
  padding: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--emerald-100), var(--teal-50));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.compact-card .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

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

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--slate-800);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
  color: var(--emerald-700);
}

.card-meta,
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin: 8px 0;
  -webkit-line-clamp: 1;
}

.card-desc {
  min-height: 42px;
  margin: 0 0 12px;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  font-size: 12px;
  font-weight: 700;
}

.large-tags span {
  padding: 7px 11px;
  font-size: 13px;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 24px;
}

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

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

.category-tile,
.category-card-large {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.tile-covers,
.category-card-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  overflow: hidden;
  background: var(--slate-900);
}

.tile-covers img,
.category-card-art img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card-art {
  grid-template-columns: repeat(4, 1fr);
}

.category-card-art img {
  height: 180px;
}

.tile-copy,
.category-card-info {
  padding: 18px;
}

.tile-copy strong,
.category-card-info strong {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-800);
  font-size: 18px;
}

.tile-copy span,
.category-card-info p,
.category-card-info span {
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.7;
}

.category-card-info span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--emerald-700);
  font-weight: 800;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.slim-hero {
  min-height: 300px;
  background:
    radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

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

.page-hero-copy {
  position: relative;
  z-index: 2;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.rank-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--slate-900);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.rank-title {
  display: block;
  color: var(--slate-800);
  font-size: 18px;
  font-weight: 900;
}

.rank-main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0;
  color: var(--slate-500);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 24px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.player-card,
.detail-content,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: var(--slate-950);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-900);
  background: var(--emerald-400);
  box-shadow: 0 0 0 16px rgba(52, 211, 153, 0.16);
  font-size: 30px;
}

.player-overlay strong {
  max-width: 80%;
  text-align: center;
  font-size: clamp(22px, 4vw, 34px);
}

.player-overlay small {
  color: var(--slate-200);
}

.detail-content {
  padding: 30px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.detail-content h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 13px;
  font-weight: 800;
}

.one-line {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.8;
}

.text-block {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.text-block h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 24px;
}

.text-block p {
  margin: 0 0 16px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.95;
}

.side-card {
  padding: 20px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: var(--slate-900);
}

.info-list {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.info-list dt {
  color: var(--slate-400);
}

.info-list dd {
  margin: 0;
  color: var(--slate-700);
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  padding: 44px 0;
  color: var(--slate-300);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 440px;
  color: var(--slate-400);
  line-height: 1.8;
}

.footer-links strong {
  display: block;
  margin-bottom: 12px;
  color: var(--white);
}

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

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--slate-300);
  background: rgba(255, 255, 255, 0.06);
}

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

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 540px;
  }

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

  .section-head,
  .detail-title-row,
  .footer-grid {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .rank-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

  .feature-band {
    padding: 24px;
  }
}

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

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

  .brand-text small {
    display: none;
  }

  .hero {
    height: 520px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-row {
    grid-template-columns: 38px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-main p {
    display: none;
  }

  .detail-content {
    padding: 22px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
