:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --deep: #020617;
  --deep-2: #0f172a;
  --accent: #334155;
  --accent-strong: #111827;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1240px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #334155, #020617);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
}

.site-nav a:hover,
.nav-dropdown:hover > a {
  color: #020617;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  width: 210px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #475569;
}

.nav-dropdown-panel a:hover {
  background: #f1f5f9;
}

.header-search {
  width: min(290px, 25vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 8px 4px 8px 12px;
  background: transparent;
  color: var(--ink);
}

.header-search button,
.search-panel button,
.hero-button,
.filter-button,
.play-button,
.detail-action {
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
  font-size: 13px;
}

.header-search button:hover,
.search-panel button:hover,
.hero-button:hover,
.filter-button:hover,
.play-button:hover,
.detail-action:hover {
  transform: translateY(-1px);
  background: #1e293b;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  color: #475569;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #f1f5f9;
  color: #020617;
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 70px;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.3), transparent 34%), linear-gradient(135deg, #334155, #020617 72%);
}

.hero-track {
  position: relative;
  min-height: 610px;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.18)), var(--cover);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(to top, var(--page-bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 610px;
  margin: 0 auto;
  padding: 92px 22px 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) 360px;
  gap: 56px;
  align-items: center;
}

.hero-kicker,
.section-heading p,
.eyebrow {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-summary {
  max-width: 650px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.14);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
}

.hero-button.secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.52), transparent 46%);
}

.hero-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  width: 28px;
  background: #fff;
}

.lifted-grid {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: -72px auto 62px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.feature-tile img {
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.5s ease;
}

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

.feature-tile div {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent);
}

.feature-tile h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.feature-tile p {
  display: -webkit-box;
  margin: 0;
  color: #cbd5e1;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section-block {
  max-width: 1240px;
  margin: 0 auto 72px;
  padding: 0 22px;
}

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

.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading a {
  flex: 0 0 auto;
  color: #475569;
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  backdrop-filter: blur(12px);
  transition: 0.25s ease;
}

.movie-card a:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

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

.movie-meta {
  margin: 0 0 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 5px 9px;
  background: #f1f5f9;
  color: #475569;
}

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

.category-card {
  display: block;
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0 0 24px;
  color: #64748b;
  line-height: 1.7;
}

.category-card span {
  color: #334155;
  font-weight: 900;
}

.page-hero {
  overflow: hidden;
  border-radius: 30px;
  background: radial-gradient(circle at top right, rgba(148, 163, 184, 0.32), transparent 35%), linear-gradient(135deg, #1e293b, #020617);
  color: #fff;
  padding: clamp(36px, 6vw, 70px);
  margin-bottom: 34px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  margin-bottom: 28px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 13px 15px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
}

.search-panel button {
  padding: 13px 24px;
}

.empty-state {
  display: none;
  padding: 44px 22px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  background: #fff;
  color: #64748b;
  font-weight: 800;
}

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

.player-card,
.detail-side,
.detail-copy {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  background: #020617;
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.78));
}

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

.play-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 17px;
}

.player-message {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 18px;
  color: #e2e8f0;
  text-align: center;
  font-size: 14px;
}

.detail-copy {
  padding: 28px;
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #0f172a;
}

.detail-title {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 900;
  font-size: 13px;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.detail-copy p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.95;
  font-size: 16px;
}

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

.detail-tags span {
  padding: 7px 11px;
  background: #f1f5f9;
  color: #334155;
}

.detail-side {
  padding: 18px;
  position: sticky;
  top: 94px;
}

.detail-side img {
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 16px;
}

.detail-side h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.detail-side p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.7;
}

.detail-action {
  display: block;
  padding: 13px 16px;
  text-align: center;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 22px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fff;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .site-header.is-open .mobile-nav {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 76px;
  }

  .hero-poster-card {
    max-width: 250px;
    transform: none;
  }

  .lifted-grid {
    grid-template-columns: 1fr;
    margin-top: -46px;
  }

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

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

@media (max-width: 560px) {
  .site-header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .site-logo {
    font-size: 22px;
  }

  .mobile-nav {
    padding-inline: 16px;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 650px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 24px;
  }

  .page-shell,
  .section-block,
  .lifted-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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