:root {
  --bg: #f8fafc;
  --bg-soft: #eef7ff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --rose: #f43f5e;
  --orange: #f97316;
  --pink: #ec4899;
  --amber: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 16px 40px rgba(15, 23, 42, .12);
  --shadow-deep: 0 28px 70px rgba(15, 23, 42, .28);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 48%, #ecfeff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .08);
  backdrop-filter: blur(14px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 12px 28px rgba(244, 63, 94, .28);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link,
.mobile-link {
  font-weight: 700;
  color: #475569;
  transition: color .25s ease, transform .25s ease;
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
}

.nav-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 22px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: linear-gradient(115deg, var(--orange), var(--rose), var(--pink));
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
  pointer-events: none;
}

.hero-slides {
  position: relative;
  max-width: 1280px;
  min-height: 650px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .55fr);
  align-items: center;
  gap: 46px;
  padding: 72px 24px 118px;
  color: #fff;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -.04em;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 82px);
}

.hero p,
.page-hero p,
.detail-title-row p {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.75;
}

.hero-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.hero-tags span {
  padding: 8px 14px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 16px 36px rgba(236, 72, 153, .28);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}

.hero-poster {
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: var(--amber);
}

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

.hero-dots button {
  width: 36px;
  height: 10px;
  padding: 0;
  color: transparent;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
}

.hero-dots button.is-active {
  width: 54px;
  background: #fff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  width: min(760px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  min-width: 120px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.section-wrap,
.rank-band,
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px;
}

.rank-band {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(90deg, #faf5ff, #fff1f2, #fff7ed);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  font-weight: 950;
  color: #1f2937;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--orange);
  font-weight: 900;
}

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

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

.movie-card.is-hidden,
.wide-card.is-hidden {
  display: none;
}

.poster-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}

.poster-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-deep);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

.poster-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0) 58%);
}

.rating-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
}

.rating-badge {
  top: 12px;
  right: 12px;
  padding: 7px 9px;
  background: var(--amber);
}

.year-badge {
  left: 12px;
  bottom: 12px;
  padding: 7px 9px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(6px);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fbbf24, var(--orange));
}

.card-copy {
  padding: 17px;
}

.card-copy h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-copy p {
  min-height: 46px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-tags span {
  padding: 5px 8px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  background: #fff1f2;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
  transition: transform .28s ease, box-shadow .28s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-deep);
}

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

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, .94), rgba(15, 23, 42, .18));
}

.category-tile div {
  position: relative;
  z-index: 2;
  color: #fff;
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .84);
  line-height: 1.55;
}

.category-tile em {
  color: #fed7aa;
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose), var(--pink));
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 86px 24px;
}

.soft-hero {
  background: linear-gradient(135deg, var(--orange), var(--rose), var(--pink));
}

.rank-hero {
  background: linear-gradient(135deg, #7c3aed, #ec4899, #ef4444);
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 74px);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.search-box span,
.filter-row > span {
  color: #475569;
  font-weight: 900;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.result-count {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  color: var(--muted);
  border-radius: 16px;
  background: #fff7ed;
}

.result-count strong {
  color: var(--orange);
  font-size: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  background: #f1f5f9;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 12px 24px rgba(236, 72, 153, .2);
}

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-card a {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.wide-card img {
  width: 108px;
  height: 146px;
  object-fit: cover;
  border-radius: 15px;
}

.wide-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.wide-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 950;
}

.list-rank {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 950;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, var(--orange));
}

.wide-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.wide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.wide-meta span {
  padding: 6px 9px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  background: #f1f5f9;
}

.detail-hero {
  color: #fff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

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

.breadcrumb em {
  color: #fff;
  font-style: normal;
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: end;
}

.detail-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.detail-cover {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow-deep);
}

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

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(244, 63, 94, .32), rgba(2, 6, 23, .64));
}

.play-cover span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  font-size: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 20px 44px rgba(236, 72, 153, .35);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 30px;
}

.detail-main,
.detail-side {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 34px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 26px;
  font-weight: 950;
}

.detail-main p {
  margin: 0 0 30px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-side {
  padding: 28px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  gap: 13px;
}

.detail-side div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: #111827;
  font-weight: 900;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 560px;
  margin: 16px 0 0;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero,
  .hero-slides {
    min-height: 760px;
  }

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

  .hero-poster {
    width: 220px;
  }

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

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

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

  .search-row,
  .detail-title-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    display: none;
  }

  .detail-side {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .section-wrap,
  .rank-band,
  .detail-wrap,
  .page-hero > div,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button {
    min-height: 46px;
  }

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

  .wide-card a {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .wide-card img {
    width: 88px;
    height: 120px;
  }

  .wide-title h3 {
    font-size: 18px;
  }

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