:root {
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --pink-500: #ec4899;
  --orange-400: #fb923c;
  --amber-300: #fcd34d;
  --cyan-50: #ecfeff;
  --blue-50: #eff6ff;
  --purple-50: #faf5ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-800);
  background: var(--gray-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: var(--max-width);
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.35);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.nav-link {
  position: relative;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search {
  width: 230px;
  flex-shrink: 0;
}

.search-input,
.filter-input,
.filter-select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  padding: 0 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--gray-800);
}

.mobile-panel {
  display: none;
  padding: 10px 20px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

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

.mobile-link {
  display: block;
  padding: 10px 0;
  color: var(--gray-700);
  font-weight: 700;
}

.mobile-link.active {
  color: var(--rose-600);
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500) 52%, var(--orange-400));
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  opacity: 0.24;
  filter: blur(22px);
  pointer-events: none;
}

.hero-orb-left {
  left: 6%;
  top: 8%;
  width: 260px;
  height: 260px;
  background: var(--white);
}

.hero-orb-right {
  right: 4%;
  bottom: 8%;
  width: 360px;
  height: 360px;
  background: var(--amber-300);
}

.hero-shell {
  position: relative;
  max-width: var(--max-width);
  min-height: 560px;
  margin: 0 auto;
  padding: 78px 20px;
}

.hero-track {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 48px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
}

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

.hero-copy p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

.hero-label,
.detail-kicker,
.page-hero span,
.section-heading span,
.story-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-label {
  padding: 9px 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.primary-button,
.ghost-button,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--rose-600);
  background: var(--white);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.more-link:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  transform: rotate(1deg);
  transition: transform 0.3s ease;
}

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

.hero-visual img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.6));
}

.hero-visual span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--rose-500);
  color: var(--white);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  right: 20px;
  bottom: 36px;
  display: flex;
  gap: 12px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--rose-600);
  background: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 20px;
}

.category-section {
  max-width: none;
  background: linear-gradient(90deg, var(--blue-50), var(--cyan-50));
}

.category-section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading span,
.story-card span {
  margin-bottom: 10px;
  color: var(--rose-600);
  background: rgba(244, 63, 94, 0.1);
  padding: 8px 14px;
}

.section-heading h2,
.page-hero h1,
.story-card h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.story-card p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--gray-500);
  font-size: 17px;
  line-height: 1.85;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.poster-link img {
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.category-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.category-pill {
  right: 12px;
  background: var(--rose-500);
}

.rank-badge {
  left: 12px;
  background: rgba(17, 24, 39, 0.78);
}

.card-body {
  padding: 18px;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.meta-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--gray-100);
}

.card-body h3 {
  margin: 12px 0 8px;
  color: var(--gray-800);
  font-size: 19px;
  line-height: 1.35;
}

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

.card-body p {
  display: -webkit-box;
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--rose-600);
  background: rgba(244, 63, 94, 0.1);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--gray-900);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
  transition: transform 0.35s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78));
}

.category-card div {
  position: relative;
  z-index: 1;
  padding: 22px;
  color: var(--white);
}

.category-card span {
  font-size: 13px;
  opacity: 0.85;
}

.category-card h3 {
  margin: 8px 0;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.6;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(135deg, var(--purple-50), #fff1f2);
  box-shadow: var(--shadow-card);
}

.slim-heading h2 {
  font-size: 28px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  background: var(--white);
}

.ranking-number {
  color: var(--rose-600);
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 58px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-info strong {
  color: var(--gray-800);
}

.ranking-info em {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.ranking-score {
  color: var(--rose-600);
  font-weight: 900;
}

.more-link {
  width: 100%;
  margin-top: 18px;
  color: var(--white);
  background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
}

.page-hero {
  position: relative;
  max-width: var(--max-width);
  margin: 36px auto 0;
  padding: 56px 20px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff1f2, #fdf2f8 48%, #ffedd5);
}

.page-hero > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.page-hero span {
  padding: 8px 14px;
  color: var(--rose-600);
  background: rgba(244, 63, 94, 0.12);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 28px;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.overview-image img {
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.overview-body {
  padding: 26px;
}

.overview-body > span {
  color: var(--rose-600);
  font-weight: 800;
}

.overview-body h2 {
  margin: 10px 0;
  font-size: 28px;
}

.overview-body p {
  color: var(--gray-500);
  line-height: 1.75;
}

.overview-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.overview-samples a {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 13px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(8px);
  transform: scale(1.08);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.72));
}

.detail-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 20px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
}

.detail-kicker {
  padding: 8px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.detail-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.8;
}

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

.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags span {
  color: var(--white);
  background: rgba(244, 63, 94, 0.72);
}

.detail-copy .primary-button {
  width: fit-content;
  margin-top: 28px;
}

.player-section {
  padding-top: 56px;
  padding-bottom: 26px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--rose-600);
  background: var(--white);
  font-size: 32px;
  text-indent: 5px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 42px);
  text-align: center;
}

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

.story-card {
  border-radius: var(--radius-lg);
  padding: 30px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 54px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-logo .brand-text {
  color: var(--white);
  background: none;
  -webkit-text-fill-color: var(--white);
}

.footer-brand p {
  max-width: 420px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  padding: 0;
  margin: 0;
  list-style: none;
  columns: 2;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .two-column-section,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .hero-shell {
    min-height: auto;
    padding: 54px 20px 78px;
  }

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

  .hero-visual {
    transform: none;
  }

  .hero-controls {
    left: 20px;
    right: auto;
    bottom: 24px;
  }

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

  .overview-card,
  .detail-layout,
  .filter-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 14px;
  }

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

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

  .content-section {
    padding: 48px 14px;
  }

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

  .page-hero {
    margin-top: 18px;
    border-radius: 0;
  }

  .detail-wrap {
    padding: 24px 14px 48px;
  }

  .player-panel {
    border-radius: 18px;
  }

  .footer-links {
    columns: 1;
  }
}
