:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --red-600: #dc2626;
  --pink-600: #db2777;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--red-600), var(--rose-600), var(--pink-600));
  box-shadow: 0 10px 30px rgba(190, 18, 60, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.18);
}

.brand-mark span {
  position: absolute;
  left: 15px;
  top: 11px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
}

.brand-mark.small span {
  left: 12px;
  top: 8px;
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-left-width: 11px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text em {
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
  color: var(--rose-100);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #fff;
  font-weight: 600;
  opacity: 0.92;
  padding: 26px 0 20px;
  border-bottom: 3px solid transparent;
  transition: color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose-100);
  opacity: 1;
  border-bottom-color: var(--rose-100);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: rgba(127, 29, 29, 0.38);
}

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

.mobile-link {
  padding: 10px 12px;
  color: #fff;
  border-radius: 10px;
}

.mobile-link.active,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #f43f5e 48%, #db2777 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.24));
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(10px);
}

.hero-glow.one {
  left: -80px;
  top: -80px;
}

.hero-glow.two {
  right: -120px;
  bottom: 30px;
  background: rgba(255, 255, 255, 0.10);
}

.hero-shell {
  position: relative;
  z-index: 1;
  padding: 82px 0 112px;
}

.hero-topline,
.hero-tags,
.card-tags,
.detail-tags,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-topline span,
.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-topline span,
.hero-tags span {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(14px);
}

.hero-shell > h1 {
  margin: 24px 0 12px;
  max-width: 880px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 760px;
  margin: 0 0 30px;
  font-size: clamp(18px, 2.4vw, 25px);
  color: var(--rose-100);
}

.hero-carousel {
  position: relative;
  min-height: 438px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 38px;
  min-height: 390px;
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20), var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.45s ease both;
}

.hero-copy .eyebrow {
  margin-bottom: 14px;
  color: #ffe4e6;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.12;
}

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

.hero-actions,
.sub-actions,
.detail-actions,
.cta-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: #fff;
  color: var(--rose-600);
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.12);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(190, 18, 60, 0.28);
}

.btn.ghost.dark {
  color: var(--rose-700);
  background: #fff;
  border-color: var(--rose-100);
}

.btn.ghost.light {
  color: var(--rose-700);
  background: #fff;
  border-color: var(--rose-100);
}

.btn.full {
  width: 100%;
  margin-top: 18px;
  color: var(--rose-600);
  background: var(--rose-50);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(17, 24, 39, 0.28);
  aspect-ratio: 2 / 3;
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-dots {
  position: absolute;
  left: 34px;
  bottom: 30px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 74px;
  background: var(--gray-50);
  clip-path: polygon(0 55%, 12% 66%, 28% 58%, 43% 70%, 58% 58%, 72% 66%, 86% 56%, 100% 64%, 100% 100%, 0 100%);
}

.search-section {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-panel {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--gray-700);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-box input,
.library-search input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  outline: none;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.search-box button {
  min-width: 108px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  background: var(--rose-600);
  cursor: pointer;
}

.search-results {
  display: none;
  max-height: 420px;
  overflow-y: auto;
  margin-top: 16px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
}

.search-results.active {
  display: grid;
}

.search-result {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result img {
  width: 62px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
}

.search-result span,
.search-result p {
  display: block;
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.block-section {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.section-more,
.text-link,
.back-link {
  color: var(--rose-600);
  font-weight: 800;
}

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

.category-card {
  min-height: 156px;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.category-card span {
  color: var(--rose-600);
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 42px;
  line-height: 1;
}

.category-card em {
  color: var(--gray-500);
  font-style: normal;
}

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

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

.listing-grid {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--gray-100);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 99px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 18px;
}

.card-tags {
  margin-bottom: 10px;
}

.card-tags span {
  padding: 5px 9px;
  color: var(--rose-700);
  background: var(--rose-50);
}

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

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

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

.rank-panel,
.text-panel,
.detail-card,
.cta-panel {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  padding: 24px;
  position: sticky;
  top: 96px;
}

.rank-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

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

.rank-list.wide {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.18s ease;
}

.rank-row:hover {
  background: var(--rose-50);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  border-radius: 11px;
  font-weight: 900;
  background: var(--rose-600);
}

.rank-row img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 3px;
}

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

.cta-panel {
  margin-bottom: 54px;
  padding: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-600), var(--red-600));
}

.cta-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
}

.cta-panel p {
  max-width: 680px;
  margin: 0;
  color: var(--rose-100);
}

.sub-hero {
  color: #fff;
  background: linear-gradient(135deg, #be123c, #e11d48 48%, #db2777);
}

.sub-hero .container {
  padding: 72px 0 58px;
}

.sub-hero span {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.sub-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
}

.sub-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--rose-100);
  font-size: 18px;
}

.library-search {
  max-width: 560px;
  margin-top: 24px;
}

.filter-pills {
  margin-top: 18px;
}

.filter-pills button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-weight: 800;
}

.filter-pills button.active,
.filter-pills button:hover {
  color: var(--rose-700);
  background: #fff;
}

.detail-wrap {
  padding: 42px 0 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  overflow: hidden;
}

.player-side {
  background: #050505;
}

.movie-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  background: #000;
}

.movie-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  z-index: 3;
}

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

.player-overlay strong {
  max-width: min(620px, 86%);
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.2;
}

.player-overlay em {
  font-style: normal;
  color: var(--rose-100);
  font-weight: 800;
}

.play-circle {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.play-circle::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--rose-600);
}

.detail-info {
  padding: 34px;
}

.detail-kicker {
  color: var(--rose-600);
  font-weight: 900;
}

.detail-info h1 {
  margin: 10px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
}

.detail-line {
  margin: 0 0 18px;
  color: var(--gray-500);
  font-size: 17px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.meta-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--gray-50);
}

.meta-grid b {
  color: var(--gray-500);
  font-size: 12px;
}

.detail-tags span {
  padding: 6px 10px;
  color: var(--rose-700);
  background: var(--rose-50);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 34px 0 0;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--gray-700);
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p {
  margin: 12px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 14px;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .desktop-nav {
    gap: 16px;
  }

  .hero-slide,
  .detail-card,
  .split-section,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding-bottom: 72px;
  }

  .hero-poster {
    max-width: 280px;
  }

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

  .rank-panel {
    position: static;
  }

  .movie-player {
    min-height: auto;
  }

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

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

  .menu-toggle {
    display: inline-block;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .hero-shell {
    padding: 52px 0 90px;
  }

  .hero-slide {
    gap: 22px;
    padding: 22px 22px 70px;
  }

  .hero-dots {
    left: 22px;
  }

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

  .movie-grid,
  .compact-grid,
  .listing-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-info {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero-shell > h1 {
    font-size: 34px;
  }

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

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

  .rank-row {
    grid-template-columns: 32px 48px 1fr;
  }
}
