:root {
  color-scheme: light;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-200: #fecdd3;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f1d9df;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(225, 29, 72, 0.12);
  --soft-shadow: 0 16px 34px rgba(31, 41, 55, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7f8 0%, #ffffff 42%, #fff1f7 100%);
}

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

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

img.is-missing {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(254, 205, 211, 0.8);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

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

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: #4b5563;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose-600);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-form input,
.filter-form select {
  border: 1px solid var(--rose-200);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--rose-400);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.18);
}

.header-search button,
.mobile-search button,
.filter-form button,
.primary-btn,
.ghost-btn,
.section-more,
.text-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.header-search button,
.mobile-search button,
.primary-btn,
.filter-form button {
  color: #fff;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  padding: 10px 18px;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.22);
}

.ghost-btn,
.section-more,
.text-link {
  color: var(--rose-600);
  background: #fff;
  border: 1px solid rgba(251, 113, 133, 0.36);
  padding: 10px 18px;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover,
.header-search button:hover,
.mobile-search button:hover,
.filter-form button:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--rose-600);
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--rose-100);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.mobile-menu a {
  display: block;
  padding: 12px 4px;
  color: #4b5563;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: min(680px, calc(100vh - 110px));
  min-height: 520px;
  margin: 28px auto 56px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--rose-100), #fff);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 70% 20%, rgba(251, 113, 133, 0.35), transparent 36%), linear-gradient(135deg, #111827, #831843);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.86), rgba(31, 41, 55, 0.45) 52%, rgba(244, 63, 94, 0.22));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 78px);
  right: clamp(24px, 42vw, 560px);
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-foot,
.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 78px);
  bottom: 36px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

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

.hero-dot.active {
  background: #fff;
}

.content-section,
.category-strip,
.category-overview,
.filter-panel,
.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 60px;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p,
.category-info p,
.page-hero p,
.detail-content p,
.footer-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(254, 205, 211, 0.72);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 113, 133, 0.52);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(251, 113, 133, 0.35), transparent 35%), linear-gradient(135deg, #1f2937, #9f1239);
}

.poster-frame img,
.category-tile img,
.related-mini img,
.detail-poster,
.player-cover img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-frame img {
  transition: transform 0.5s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.74);
  backdrop-filter: blur(8px);
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.card-body {
  padding: 18px;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--rose-600);
  font-size: 13px;
  font-weight: 800;
}

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

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.tag-row span {
  color: var(--rose-600);
  background: var(--rose-50);
}

.card-foot {
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rose-100);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #831843, #fb7185);
  box-shadow: var(--soft-shadow);
}

.category-tile::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.12));
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 48px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  opacity: 0.86;
  line-height: 1.5;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--rose-100);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-row b {
  color: var(--rose-600);
  font-size: 20px;
}

.rank-row img {
  width: 72px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #831843, #fb7185);
}

.rank-row span {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row small {
  color: var(--muted);
  font-weight: 800;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 42px;
  border-radius: 34px;
  background: radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.72), transparent 30%), linear-gradient(135deg, var(--rose-500), var(--pink-500));
  box-shadow: var(--shadow);
  color: #fff;
}

.page-hero.slim {
  padding: clamp(34px, 6vw, 72px);
}

.page-hero .eyebrow,
.detail-hero .eyebrow {
  background: rgba(255, 255, 255, 0.22);
}

.page-hero h1 {
  max-width: 820px;
}

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

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

.category-card-large {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--rose-100);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.category-cover {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 210px;
  background: linear-gradient(135deg, #831843, #fb7185);
}

.category-info {
  padding: 28px;
}

.category-info h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-info .text-link {
  display: inline-flex;
  margin-top: 22px;
}

.filter-panel {
  padding: 22px;
  border: 1px solid var(--rose-100);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.filter-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filter-panel.wide .filter-form {
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
}

.filter-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-form input,
.filter-form select {
  width: 100%;
}

.movie-card.hidden-by-filter {
  display: none;
}

.detail-hero {
  padding: clamp(20px, 4vw, 36px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

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

.breadcrumbs em {
  font-style: normal;
  opacity: 0.76;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.26);
}

.movie-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #111827;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #111827;
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.18));
}

.play-circle {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  box-shadow: 0 18px 40px rgba(244, 63, 94, 0.42);
}

.player-column h1 {
  margin-top: 28px;
  max-width: 860px;
}

.lead {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-top: 22px;
}

.detail-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: linear-gradient(135deg, #831843, #fb7185);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.primary-btn.full {
  display: block;
  text-align: center;
}

.full-tags {
  gap: 8px;
}

.full-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.side-related {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.side-related h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.related-mini {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.related-mini:first-of-type {
  border-top: 0;
}

.related-mini img {
  grid-row: span 2;
  width: 70px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #831843, #fb7185);
}

.related-mini span,
.related-mini small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-mini span {
  font-weight: 800;
}

.related-mini small {
  opacity: 0.76;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.detail-content article {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--rose-100);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content h2:not(:first-child) {
  margin-top: 34px;
}

.detail-content p {
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-list div {
  padding: 16px;
  border-radius: 18px;
  background: var(--rose-50);
}

.info-list dt {
  color: var(--rose-600);
  font-weight: 900;
}

.info-list dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--rose-100);
  background: linear-gradient(135deg, var(--rose-50), #fff);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin-top: 12px;
}

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

.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--rose-600);
  background: #fff;
  border: 1px solid var(--rose-100);
  font-weight: 800;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

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

  .detail-side {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .side-related {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .site-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu.open {
    display: block;
  }

  .mobile-search {
    margin-bottom: 8px;
  }

  .mobile-search input {
    min-width: 0;
    flex: 1;
  }

  .hero-carousel {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    left: 22px;
    right: 22px;
  }

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

  .hero-dots {
    left: 22px;
  }

  .section-head,
  .footer-inner {
    display: grid;
  }

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

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

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

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

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

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

  .hero-carousel,
  .page-hero,
  .detail-hero {
    width: calc(100% - 20px);
    border-radius: 24px;
  }

  .content-section,
  .category-strip,
  .category-overview,
  .filter-panel,
  .detail-content {
    width: calc(100% - 20px);
  }

  .movie-grid,
  .rank-list,
  .category-grid,
  .category-overview,
  .detail-side,
  .info-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 62px minmax(0, 1fr);
  }

  .rank-row small {
    display: none;
  }

  .page-hero.slim {
    padding: 28px;
  }

  .detail-content article {
    padding: 24px;
  }
}
