:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #ecfdf5;
  --text: #0f172a;
  --muted: #64748b;
  --muted-dark: #94a3b8;
  --line: #e2e8f0;
  --card: #ffffff;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --emerald: #059669;
  --emerald-2: #10b981;
  --cyan: #0891b2;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -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: 40;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(16px);
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  color: #ecfeff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 34px rgba(16, 185, 129, 0.32);
}

.brand__text {
  display: grid;
  line-height: 1.15;
}

.brand__text strong {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand__text small {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(16, 185, 129, 0.2);
}

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

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 99px;
  background: #fff;
}

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

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

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

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

.hero-slide__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 35%, rgba(16, 185, 129, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 48%);
}

.hero-slide__content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 64px));
  transform: translateY(-47%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--emerald);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info .lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.detail-info .btn {
  margin-top: 30px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.35);
}

.btn-ghost {
  margin-left: 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #ecfeff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-row span {
  color: #047857;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.tag-row--wide span {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(167, 243, 208, 0.22);
}

.hero-side-card {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 116px;
  width: min(340px, calc(100% - 64px));
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  color: #fff;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.hero-side-card img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
}

.hero-side-card strong,
.hero-side-card small {
  display: block;
}

.hero-side-card small {
  margin-top: 8px;
  color: #cbd5e1;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

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

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

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

.section {
  padding: 72px 0;
}

.section-overlap {
  position: relative;
  z-index: 2;
  padding-top: 0;
  margin-top: -42px;
}

.section-soft {
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(14px);
}

.search-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.chip {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #475569;
  background: #fff;
  cursor: pointer;
}

.chip.is-active,
.chip:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.16);
}

.movie-card__poster {
  position: relative;
  aspect-ratio: 3 / 4;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 54%);
  opacity: 0.86;
}

.movie-card__play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.92);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.26);
}

.movie-card__body {
  padding: 18px;
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--emerald);
}

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

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.category-tile span {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.category-tile strong,
.category-tile small {
  display: block;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile small {
  margin-top: 8px;
  color: #cbd5e1;
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.rank-panel__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.rank-panel__head h2 {
  margin: 0;
  font-size: 28px;
}

.rank-panel__head a {
  color: var(--emerald);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #ecfdf5;
}

.rank-item__num {
  font-weight: 900;
  color: var(--emerald);
}

.rank-item img {
  width: 62px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item strong,
.rank-item small {
  display: block;
}

.rank-item small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.3), transparent 26%),
    linear-gradient(135deg, #0f172a, #1e293b 54%, #064e3b);
}

.page-hero {
  padding: 84px 0 88px;
}

.page-hero p {
  max-width: 760px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #a7f3d0;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.category-card__covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 156px;
  overflow: hidden;
}

.category-card__covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__body {
  padding: 22px;
}

.category-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-card p {
  min-height: 52px;
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-movie-list,
.ranking-movie-list {
  margin-top: 28px;
}

.detail-hero {
  min-height: 620px;
  background: #020617;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.02);
}

.detail-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.36)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.1));
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
  padding: 64px 0 96px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  max-width: 820px;
}

.detail-main {
  margin-top: -84px;
  position: relative;
  z-index: 5;
}

.player-card {
  padding: 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.48));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 46px rgba(5, 150, 105, 0.38);
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 28px;
}

.story-card,
.info-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.story-card h2,
.info-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.info-card dl,
.info-card div {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 56px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p,
.site-footer li {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #a7f3d0;
}

.footer-bottom {
  padding: 18px 16px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

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

  .rank-panel,
  .info-card {
    position: static;
    grid-column: 1 / -1;
  }

  .hero-side-card {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-slide__content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(34px, 11vw, 54px);
  }

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

  .filter-chips {
    justify-content: flex-start;
  }

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

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

  .detail-poster {
    width: min(260px, 72vw);
  }

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

@media (max-width: 560px) {
  .container,
  .site-header__inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .brand__text small {
    display: none;
  }

  .hero {
    min-height: 580px;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
    align-items: stretch;
  }

  .btn-ghost {
    margin-left: 0;
  }

  .section {
    padding: 48px 0;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .category-overview-grid,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .row-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-card__poster {
    aspect-ratio: 16 / 12;
  }

  .category-card__covers {
    height: 130px;
  }
}
