:root {
  color-scheme: light;
  --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-400: #34d399;
  --teal-500: #14b8a6;
  --rose-500: #f43f5e;
  --amber-400: #f59e0b;
  --white: #ffffff;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.24);
}

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

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.32);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

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

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

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

.hero-bg-item {
  position: relative;
  overflow: hidden;
}

.hero-bg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.03);
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.hero-bg-item:hover img {
  opacity: 0.92;
  transform: scale(1.10);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: end;
  min-height: 72vh;
  padding: 82px 0 70px;
}

.hero-copy {
  display: none;
  max-width: 760px;
}

.hero-copy.active {
  display: block;
}

.hero-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.6vw, 20px);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  box-shadow: 0 16px 28px rgba(16, 185, 129, 0.30);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(16, 185, 129, 0.38);
}

.btn.secondary,
.ghost-link {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.30);
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

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

.hero-mini-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.hero-mini-card img {
  width: 70px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.hero-mini-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

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

.hero-dot.active {
  background: var(--emerald-400);
}

.page-hero,
.category-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-700), var(--teal-500));
  padding: 54px 0;
}

.page-hero h1,
.category-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.section {
  padding: 58px 0;
}

.section.alt {
  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: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--slate-900);
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--slate-600);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(16, 185, 129, 0.36);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-100);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.74));
  opacity: 0.72;
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(16, 185, 129, 0.88);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.22);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--amber-400));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.30);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-meta-line span {
  display: inline-flex;
  align-items: center;
}

.movie-meta-line span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--emerald-500);
}

.movie-card h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.25;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
  color: var(--emerald-600);
}

.movie-card p {
  min-height: 3.1em;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: block;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--slate-600);
}

.filter-box {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 0.5fr));
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-box input,
.filter-box select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-800);
  font: inherit;
  outline: none;
}

.filter-box input:focus,
.filter-box select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.list-no {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-600));
  font-weight: 900;
}

.rank-poster img {
  width: 92px;
  height: 124px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--slate-600);
}

.rank-row .ghost-link {
  color: var(--emerald-700);
  padding: 9px 14px;
  border-radius: 999px;
  border-color: rgba(16, 185, 129, 0.25);
  background: #ecfdf5;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 34px 0 58px;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

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

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: rgba(2, 6, 23, 0.24);
  cursor: pointer;
}

.player-layer.hidden {
  display: none;
}

.player-layer span {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
  box-shadow: 0 24px 55px rgba(16, 185, 129, 0.40);
  font-size: 28px;
}

.player-meta,
.detail-card,
.side-card {
  padding: 22px;
}

.player-meta h1 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

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

.detail-card p {
  margin: 0 0 16px;
  color: var(--slate-700);
}

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

.side-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 70px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.side-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--slate-900);
}

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

.breadcrumb {
  padding: 20px 0 0;
  color: var(--slate-500);
  font-size: 14px;
}

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

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
}

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

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .mobile-link {
    display: block;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 70px 0 44px;
  }

  .hero-panel {
    padding: 16px;
  }

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

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

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

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-row .ghost-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-poster img {
    width: 72px;
    height: 98px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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