* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #111827;
  background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 42%, #fff1f2 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fdf2f8 0%, #ffffff 50%, #fff1f2 100%);
  border-bottom: 1px solid #fce7f3;
  box-shadow: 0 1px 3px rgba(244, 114, 182, 0.12);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ec4899;
  font-size: 28px;
  line-height: 1;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-link:hover,
.nav-link.is-active {
  color: #db2777;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
}

.search-form input {
  width: 260px;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.35);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 20px;
  pointer-events: none;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #374151;
  background: transparent;
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: #fce7f3;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

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

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

.mobile-search input {
  width: 100%;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 10px;
  color: #374151;
  font-weight: 600;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #db2777;
  background: #fdf2f8;
}

.page-main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px 72px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  max-width: 720px;
}

.hero-tags,
.detail-tags,
.card-tags,
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(236, 72, 153, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 28px;
  color: #ffffff;
  font-weight: 600;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 13px 32px;
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  padding: 11px 24px;
  color: #be185d;
  background: #fce7f3;
}

.btn-soft {
  padding: 10px 20px;
  color: #374151;
  background: #f3f4f6;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 18px;
}

.page-hero h1 {
  margin: 0 0 14px;
  color: #111827;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #4b5563;
  font-size: 17px;
}

.section {
  margin-bottom: 64px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #111827;
  font-size: 28px;
  font-weight: 900;
}

.section-title .mark {
  color: #ec4899;
}

.section-desc {
  margin: 6px 0 0;
  color: #6b7280;
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(190, 24, 93, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f3f4f6;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 62%);
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  top: 10px;
  right: 10px;
  min-width: 48px;
  padding: 5px 8px;
  background: #ec4899;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 30px;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.26);
}

.poster-hover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 14px;
  color: #ffffff;
  transform: translateY(105%);
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-hover {
  transform: translateY(0);
}

.poster-hover p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 24px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #db2777;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12px;
}

.card-meta span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-tags span,
.detail-tags span,
.meta-tags span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: #db2777;
  background: #fdf2f8;
  font-size: 12px;
  font-weight: 700;
}

.scroll-row {
  overflow-x: auto;
  padding-bottom: 12px;
}

.scroll-track {
  display: flex;
  gap: 18px;
}

.scroll-track .movie-card {
  flex: 0 0 190px;
}

.category-panel,
.filter-panel,
.content-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.category-panel {
  padding: 24px;
}

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

.category-chip,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-chip:hover,
.filter-btn:hover,
.filter-btn.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  transform: translateY(-2px);
}

.filter-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #db2777;
  font-weight: 700;
}

.player-card {
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(190, 24, 93, 0.12);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.22), rgba(0, 0, 0, 0.32) 42%, rgba(0, 0, 0, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(236, 72, 153, 0.36);
}

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

.detail-body {
  padding: 30px;
}

.detail-title {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0 22px;
  color: #4b5563;
  font-weight: 650;
}

.detail-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.review-box {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fdf2f8, #fff1f2);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(190, 24, 93, 0.14);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-results {
  min-height: 240px;
}

.empty-state {
  padding: 42px;
  border-radius: 18px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.site-footer {
  margin-top: 32px;
  background: #ffffff;
  border-top: 1px solid #fce7f3;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-col h2,
.footer-col h3 {
  margin: 0 0 16px;
  color: #111827;
  font-weight: 900;
}

.footer-main p,
.footer-col a,
.footer-bottom {
  color: #6b7280;
  font-size: 14px;
}

.footer-main p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

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

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

.footer-col a:hover {
  color: #db2777;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #f3f4f6;
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.28);
}

.back-to-top.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

  .search-form input {
    width: 220px;
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    height: 66vh;
    min-height: 500px;
  }

  .hero-content {
    padding-bottom: 80px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .hero-arrow.prev {
    left: 14px;
  }

  .hero-arrow.next {
    right: 14px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  .mobile-panel,
  .container,
  .page-hero,
  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo-text {
    font-size: 20px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-meta {
    gap: 12px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.medium,
  .movie-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .detail-body {
    padding: 22px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

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

  .rank-num {
    width: 34px;
    height: 34px;
  }
}

.category-overview-card {
  overflow: hidden;
}

.category-overview-card a {
  display: block;
  height: 100%;
}

.category-mini-posters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  height: 160px;
  overflow: hidden;
  background: #f3f4f6;
}

.category-mini-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.category-overview-body p {
  min-height: 78px;
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.7;
}

.category-overview-body span {
  color: #db2777;
  font-weight: 900;
}

@media (max-width: 640px) {
  .category-mini-posters {
    height: 130px;
  }
}
