:root {
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --pink-500: #ec4899;
  --orange-500: #f97316;
  --amber-300: #fcd34d;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.32);
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
  -webkit-background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  white-space: nowrap;
}

.main-nav a {
  color: var(--slate-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--rose-500);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-nav input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 11px 14px;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-nav input:focus,
.large-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.13);
}

.top-search button,
.mobile-nav button,
.large-search button,
.filter-bar button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.24);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: var(--slate-700);
}

.mobile-nav {
  display: none;
  padding: 14px 20px 20px;
  border-top: 1px solid #e2e8f0;
  background: var(--white);
}

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

.mobile-nav form {
  display: grid;
  gap: 10px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #fb7185 0%, #ec4899 48%, #f97316 100%);
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.28;
  pointer-events: none;
}

.hero-glow-left {
  top: 30px;
  left: 6%;
  background: var(--white);
}

.hero-glow-right {
  right: 8%;
  bottom: 40px;
  background: var(--amber-300);
}

.hero-stage {
  position: relative;
  max-width: 1240px;
  min-height: 580px;
  margin: 0 auto;
  padding: 84px 20px 70px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  gap: 46px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fade-up 0.55s ease both;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0 0 10px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  color: #fff7ed;
  font-size: clamp(26px, 3vw, 38px);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #fff1f2;
  font-size: 19px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--rose-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fffbeb;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.ghost-btn.dark {
  color: var(--rose-600);
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(255, 255, 255, 0.86);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 340px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.32);
  transform: rotate(1deg);
  transition: transform 0.25s ease;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.35), rgba(244, 63, 94, 0.35));
}

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

.hero-poster img {
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.hero-poster span,
.score {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(244, 63, 94, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 26px;
  background: var(--white);
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 20px;
}

.section-soft {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px));
  background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

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

.section-head h2,
.page-hero h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head a,
.pager-links a {
  color: var(--rose-600);
  font-weight: 900;
}

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

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

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

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

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

.poster,
.rank-cover,
.detail-poster {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.88), rgba(236, 72, 153, 0.78)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 28%);
}

.poster img {
  height: 250px;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  color: var(--slate-900);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
}

.card-title:hover {
  color: var(--rose-500);
}

.card-meta,
.card-desc,
.rank-info p,
.site-footer p,
.text-panel p,
.prose-section p {
  color: var(--slate-600);
}

.card-meta {
  margin: 8px 0;
  font-size: 13px;
  font-weight: 700;
}

.card-desc {
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--rose-600);
  background: #fff1f2;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  font-size: 34px;
}

.category-card strong {
  color: var(--slate-900);
  font-size: 18px;
}

.category-card small,
.overview-count {
  color: var(--slate-500);
  font-weight: 700;
}

.ranking-section {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px));
  background: linear-gradient(135deg, #faf5ff, #fff1f2, #fff7ed);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 132px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-300), var(--orange-500));
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  border-radius: 14px;
}

.rank-cover img {
  height: 80px;
  object-fit: cover;
}

.rank-title {
  color: var(--slate-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-title:hover {
  color: var(--rose-500);
}

.rank-info p {
  margin: 4px 0;
  font-size: 14px;
}

.rank-meta,
.rank-score {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.rank-score {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--rose-600);
  background: #fff1f2;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.25), transparent 24%),
    linear-gradient(135deg, #fb7185, #ec4899 52%, #f97316);
}

.small-hero {
  padding: 74px 20px;
}

.small-hero > div {
  max-width: 1240px;
  margin: 0 auto;
}

.small-hero h1,
.small-hero .section-kicker {
  color: var(--white);
}

.small-hero p {
  max-width: 760px;
  color: #fff1f2;
  font-size: 18px;
}

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

.category-overview-title {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--slate-900);
  font-size: 22px;
  font-weight: 900;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a,
.detail-categories a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--rose-600);
  background: #fff1f2;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 900;
}

.filter-bar button[type="reset"] {
  color: var(--slate-700);
  background: var(--slate-100);
  box-shadow: none;
}

.empty-state {
  padding: 30px;
  border-radius: 18px;
  text-align: center;
  background: var(--white);
  color: var(--slate-500);
  font-weight: 800;
}

.large-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.large-search input {
  font-size: 17px;
  padding: 15px 18px;
}

.search-result-head {
  margin-bottom: 22px;
  color: var(--slate-600);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 20px;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  min-height: 520px;
  object-fit: cover;
}

.detail-copy {
  align-self: center;
}

.breadcrumb {
  margin-bottom: 14px;
  color: var(--slate-500);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: var(--rose-500);
}

.detail-copy h1 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 800px;
  color: var(--slate-700);
  font-size: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta div {
  padding: 13px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.detail-meta dt {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 900;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--slate-900);
  font-weight: 900;
}

.detail-tags {
  margin-bottom: 14px;
}

.detail-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  box-shadow: 0 18px 38px rgba(244, 63, 94, 0.42);
  font-size: 30px;
}

.text-panel {
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

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

.text-panel h2,
.prose-section h2 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: 26px;
}

.prose-section {
  max-width: 880px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #111827 58%, #1f2937);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
}

.footer-brand,
.site-footer h2 {
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

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

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--rose-500);
}

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

.image-missing {
  opacity: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

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

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

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
  }

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

  .hero-stage {
    min-height: auto;
    padding: 54px 20px 64px;
  }

  .hero-copy p,
  .small-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-poster img,
  .hero-poster {
    min-height: 240px;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 86px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .rank-cover img {
    height: 64px;
  }

  .detail-hero {
    padding-top: 34px;
  }

  .detail-poster img {
    min-height: 360px;
  }

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