:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --pink-500: #ec4899;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 1rem;
}

.gradient-text {
  background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
  backdrop-filter: blur(14px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  font-size: 0.85rem;
  box-shadow: 0 10px 24px rgb(244 63 94 / 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link,
.mobile-nav-link {
  color: var(--gray-600);
  font-weight: 600;
  transition: color 0.25s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.8rem;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 1.2rem;
  height: 2px;
  background: var(--gray-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-inner {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 620px);
  min-height: 500px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.68), rgb(0 0 0 / 0.38), rgb(0 0 0 / 0.04));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 660px;
  color: white;
  padding-top: 2rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgb(255 255 255 / 0.88);
}

.hero-tags,
.tag-row,
.movie-meta,
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags span {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: white;
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.btn-primary,
.btn-secondary,
.btn-white,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.78rem 1.55rem;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, var(--rose-500), var(--pink-500));
  box-shadow: 0 16px 28px rgb(244 63 94 / 0.26);
}

.btn-primary:hover,
.btn-white:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  color: var(--rose-500);
  background: white;
  border: 2px solid var(--rose-500);
}

.btn-secondary:hover {
  background: var(--rose-50);
}

.btn-white {
  color: var(--gray-900);
  background: white;
}

.btn-ghost {
  color: white;
  border: 2px solid rgb(255 255 255 / 0.8);
  background: rgb(255 255 255 / 0.08);
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.18);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 0.65rem;
  height: 0.65rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgb(255 255 255 / 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: white;
}

.hero-panel {
  position: absolute;
  z-index: 4;
  right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  bottom: 2rem;
  width: min(420px, 34vw);
  display: grid;
  gap: 0.8rem;
}

.hero-panel a {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.8rem;
  padding: 0.65rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(12px);
  color: white;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-panel a:hover {
  transform: translateX(-4px);
  background: rgb(255 255 255 / 0.22);
}

.hero-panel img {
  width: 5.4rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 0.75rem;
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel span {
  color: rgb(255 255 255 / 0.75);
  font-size: 0.85rem;
}

.section-block {
  padding: 4rem 0;
}

.section-soft {
  background: linear-gradient(180deg, #ffffff, var(--rose-50));
  border-radius: 2rem;
  margin: 1rem auto;
}

.section-heading {
  margin-bottom: 2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  line-height: 1.15;
}

.section-heading p {
  margin: 0.5rem 0 0;
  color: var(--gray-600);
}

.category-strip,
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  min-height: 132px;
  padding: 1rem;
  border-radius: 1rem;
  background: white;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
  height: 4.2rem;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--rose-100), var(--blue-50));
}

.category-card h3 {
  margin: 0;
  text-align: center;
  color: var(--gray-800);
}

.category-card p {
  margin: 0.45rem 0 0;
  color: var(--gray-600);
  font-size: 0.92rem;
  text-align: center;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
}

.movie-list {
  display: grid;
  gap: 1rem;
}

.card {
  overflow: hidden;
  border-radius: 0.9rem;
  background: white;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  height: 20rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--rose-50));
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.cover-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgb(0 0 0 / 0.34);
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-mask {
  opacity: 1;
}

.cover-mask i {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-500);
  background: rgb(255 255 255 / 0.9);
  font-style: normal;
  font-size: 1.4rem;
  padding-left: 0.18rem;
}

.region-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.region-badge {
  top: 0.75rem;
  left: 0.75rem;
  color: white;
  background: var(--rose-500);
}

.year-badge {
  right: 0.75rem;
  bottom: 0.75rem;
  color: white;
  background: rgb(0 0 0 / 0.72);
}

.rank-badge {
  top: 0.75rem;
  right: 0.75rem;
  color: white;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.movie-info {
  padding: 1rem;
}

.movie-meta {
  margin-bottom: 0.75rem;
}

.movie-meta a,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 0.45rem;
  padding: 0.18rem 0.5rem;
  color: var(--blue-600);
  background: var(--blue-50);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-meta a {
  color: var(--rose-600);
  background: var(--rose-50);
}

.movie-info h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--rose-500);
}

.movie-info p {
  min-height: 3.1rem;
  margin: 0 0 0.75rem;
  color: var(--gray-600);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span,
.info-tags span {
  display: inline-flex;
  border-radius: 0.45rem;
  padding: 0.18rem 0.48rem;
  color: var(--gray-600);
  background: var(--gray-100);
  font-size: 0.76rem;
}

.genre-line {
  margin-top: 0.65rem;
  color: var(--gray-500);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-list {
  display: grid;
  grid-template-columns: 18rem 1fr;
}

.list-cover {
  height: 16rem;
}

.list-info {
  padding: 1.25rem;
}

.list-info h3 {
  font-size: 1.25rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  background: white;
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 0.4rem;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 2px solid var(--gray-200);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--rose-500);
  background: white;
}

.page-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--rose-50), #ffffff 50%, var(--blue-50));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--gray-600);
  font-size: 1.08rem;
}

.breadcrumb {
  margin-bottom: 1rem;
  color: var(--gray-500);
  font-size: 0.92rem;
}

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

.detail-shell {
  background: var(--gray-50);
  padding: 2rem 0 4rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 1rem;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-shell video,
.player-poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-poster {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 0.25s ease;
}

.player-shell.is-ready .player-poster,
.player-shell.is-ready .play-layer {
  opacity: 0;
  pointer-events: none;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.play-button {
  width: 5rem;
  height: 5rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--rose-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  padding-left: 0.28rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.play-button:hover {
  transform: scale(1.08);
  background: var(--rose-600);
}

.detail-card {
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.detail-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--rose-700, #be123c);
  background: var(--rose-100);
  font-size: 0.9rem;
  font-weight: 700;
}

.lead-text {
  color: var(--gray-700);
  font-size: 1.08rem;
  font-weight: 700;
}

.prose h2 {
  margin: 1.6rem 0 0.7rem;
  color: var(--gray-900);
}

.prose p {
  margin: 0 0 1rem;
  color: var(--gray-700);
}

.side-card {
  padding: 1.25rem;
}

.side-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.side-list {
  display: grid;
  gap: 0.8rem;
}

.side-list a {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 0.8rem;
  background: var(--gray-50);
}

.side-list a:hover {
  background: var(--rose-50);
}

.side-list img {
  width: 4.4rem;
  height: 3.4rem;
  border-radius: 0.6rem;
  object-fit: cover;
}

.side-list strong,
.side-list span {
  display: block;
}

.side-list span {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-item {
  display: grid;
  grid-template-columns: 4rem 9rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  background: white;
  box-shadow: var(--shadow);
}

.rank-number {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
  font-weight: 900;
}

.ranking-item img {
  width: 9rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 0.8rem;
}

.ranking-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.ranking-item p {
  margin: 0 0 0.5rem;
  color: var(--gray-600);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow);
  padding: 0 0.9rem;
  color: var(--gray-700);
  font-weight: 800;
}

.pagination a:hover,
.pagination span.current {
  color: white;
  background: var(--rose-500);
}

.site-footer {
  background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
  margin-top: 2rem;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.site-footer p {
  color: var(--gray-600);
  max-width: 420px;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
}

.site-footer a:not(.site-logo) {
  display: block;
  color: var(--gray-600);
  margin: 0.45rem 0;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.back-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--rose-500);
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.empty-state {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--gray-600);
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.empty-state.is-visible {
  display: block;
}

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

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

  .hero-panel {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .detail-grid,
  .footer-grid,
  .card-list,
  .ranking-item {
    grid-template-columns: 1fr;
  }

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

  .ranking-item img {
    width: 100%;
    height: 12rem;
  }
}

@media (max-width: 640px) {
  .container-custom {
    padding: 0 0.9rem;
  }

  .hero-carousel {
    height: 560px;
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .movie-cover {
    height: 22rem;
  }

  .section-block {
    padding: 3rem 0;
  }

  .footer-bottom {
    display: grid;
  }
}
