:root {
  --page-bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --brand: #ea580c;
  --brand-dark: #dc2626;
  --brand-soft: #fff7ed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.main-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.32);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 650;
  color: #374151;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

.page-main {
  padding-top: 68px;
}

.page-container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.28), transparent 28%), linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 48px;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 136px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -80px -20vw;
  z-index: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(10px);
  transform: scale(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: -80px -20vw;
  z-index: 1;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.32) 55%, rgba(17, 24, 39, 0.82));
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.hero-copy {
  max-width: 780px;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 24px 0 20px;
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #d1d5db;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #e5e7eb;
  margin-bottom: 32px;
  font-size: 14px;
}

.hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.26);
}

.primary-button:hover,
.secondary-button:hover,
.small-pill:hover {
  transform: translateY(-2px);
}

.secondary-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  justify-self: end;
  width: min(420px, 100%);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #1f2937;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 4;
  width: min(1280px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-search-card {
  width: min(620px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff;
}

.hero-search-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  outline: 0;
  font: inherit;
  background: #fff;
}

.search-row a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section {
  padding: 58px 0;
}

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

.section-heading h2,
.rank-entry h2,
.related-card h2,
.detail-card h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.play-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 17px;
  display: grid;
  gap: 9px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
}

.card-meta span:first-child {
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

.card-meta span:last-child {
  color: var(--muted);
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

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

.card-body p,
.card-tags {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 185px;
}

.movie-card-wide .card-cover {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-wide .card-body {
  align-content: center;
}

.rank-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 36px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(255, 237, 213, 0.28), transparent 32%), linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 25px 60px rgba(234, 88, 12, 0.24);
}

.rank-entry p {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.rank-entry .primary-button {
  background: #fff;
  color: var(--brand);
}

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

.category-tile,
.category-detail-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background-image: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.22)), var(--tile-bg);
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-detail-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
}

.category-tile span {
  display: block;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}

.category-tile strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}

.sub-hero {
  color: #fff;
  padding: 76px 0 70px;
  background: radial-gradient(circle at 20% 30%, rgba(255, 237, 213, 0.18), transparent 34%), linear-gradient(135deg, #ea580c, #dc2626);
}

.sub-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

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

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

.category-detail-tile {
  min-height: 280px;
  display: flex;
  align-items: end;
}

.category-detail-tile h2 {
  margin: 12px 0;
  font-size: 32px;
}

.category-detail-tile p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
}

.mini-title-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-title-list span {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.filter-bar select {
  max-width: 180px;
}

.detail-top {
  position: relative;
  padding: 42px 0 26px;
  color: #fff;
  overflow: hidden;
  background: #111827;
}

.detail-top::before {
  content: "";
  position: absolute;
  inset: -60px 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.7)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  transform: scale(1.05);
}

.detail-top .page-container {
  position: relative;
  z-index: 1;
}

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

.detail-primary {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  padding-left: 5px;
}

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

.detail-card,
.poster-card,
.related-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.detail-card {
  padding: 30px;
}

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

.detail-badge,
.small-pill {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 850;
}

.detail-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #475569;
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 700;
}

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

.detail-card p {
  color: #374151;
  font-size: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 750;
}

.detail-aside {
  display: grid;
  align-content: start;
  gap: 24px;
}

.poster-card {
  overflow: hidden;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #e5e7eb;
}

.poster-card div {
  padding: 20px;
}

.poster-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.poster-card span {
  color: var(--muted);
}

.related-card {
  padding: 20px;
}

.related-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.related-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.related-grid .movie-card-wide {
  min-height: 130px;
  grid-template-columns: 128px 1fr;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
  padding: 44px 0 26px;
}

.footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-content: start;
}

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

.copyright {
  width: min(1280px, calc(100% - 48px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #94a3b8;
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

  .hero-poster {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-container,
  .main-nav,
  .hero-slide,
  .hero-panel,
  .footer-inner,
  .copyright {
    width: min(100% - 32px, 1280px);
    padding-left: 0;
    padding-right: 0;
  }

  .hero-slider {
    min-height: 690px;
  }

  .hero-slide {
    padding-top: 58px;
    padding-bottom: 180px;
  }

  .hero-panel {
    display: grid;
  }

  .hero-dots {
    justify-content: center;
  }

  .section-heading,
  .rank-entry,
  .footer-inner,
  .detail-title-row {
    display: grid;
    align-items: start;
  }

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    display: grid;
  }

  .filter-bar select {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .main-nav {
    height: 64px;
  }

  .page-main {
    padding-top: 64px;
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .search-row,
  .hero-actions {
    display: grid;
  }

  .detail-card {
    padding: 22px;
  }
}
