* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #fce7f3;
  background: linear-gradient(90deg, rgba(253, 242, 248, 0.96), rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.96));
  box-shadow: 0 6px 24px rgba(244, 114, 182, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner,
.mobile-panel,
.footer-inner,
.section-inner,
.detail-inner,
.list-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.35);
  font-size: 15px;
  line-height: 1;
}

.logo-text {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

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

.top-search input,
.mobile-search input,
.search-form input,
.category-filter input {
  width: 250px;
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: #111827;
  padding: 10px 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-form input:focus,
.category-filter input:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16);
}

.top-search button,
.mobile-search button,
.search-form button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  padding: 10px 18px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-form button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.03);
}

.secondary-button {
  color: #be123c;
  background: #fff1f2;
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fce7f3;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #374151;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.mobile-link {
  display: block;
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: #fdf2f8;
}

.hero {
  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.6s ease;
}

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

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.52) 44%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-content-inner {
  max-width: 720px;
}

.hero-tags,
.tag-row,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.tag {
  background: #fdf2f8;
  color: #db2777;
}

.meta-pill {
  background: #fff1f2;
  color: #be123c;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.page-section,
.list-page {
  padding: 54px 0;
}

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

.section-title-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2,
.list-hero h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-title p,
.list-hero p {
  margin: 8px 0 0;
  color: #6b7280;
  line-height: 1.75;
}

.title-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #fb7185);
  border-radius: 12px;
}

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

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

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

.movie-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  display: block;
}

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

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.05) 58%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 9px;
  color: #ffffff;
  background: #ec4899;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.poster-intro {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  padding: 14px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-info {
  display: block;
  padding: 16px;
}

.movie-info strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 24px;
  color: #111827;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.2s ease;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

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

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

.movie-meta em {
  font-style: normal;
}

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

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

.horizontal-card {
  flex: 0 0 220px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.horizontal-card a {
  display: block;
}

.horizontal-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.horizontal-card span {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.horizontal-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.horizontal-card em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.45s ease;
}

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

.category-tile-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 22px;
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 16px;
  color: #f3f4f6;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-tile span {
  display: inline-flex;
  border-radius: 999px;
  color: #be123c;
  background: #ffffff;
  padding: 8px 14px;
  font-weight: 800;
}

.list-hero {
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  box-shadow: 0 22px 60px rgba(244, 114, 182, 0.14);
  padding: 34px;
  margin: 38px 0 34px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 18px;
  margin-bottom: 28px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tabs a {
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  padding: 10px 16px;
  font-weight: 750;
  transition: background 0.2s ease, color 0.2s ease;
}

.category-tabs a.active,
.category-tabs a:hover {
  color: #ffffff;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
}

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

.detail-page {
  padding: 38px 0 64px;
}

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

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

.watch-card {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
}

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

.watch-frame video,
.watch-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.watch-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #000000;
  cursor: pointer;
}

.watch-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.25));
}

.watch-cover.hidden {
  display: none;
}

.play-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  gap: 16px;
  place-items: center;
  transform: translate(-50%, -50%);
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 20px 46px rgba(236, 72, 153, 0.45);
  font-size: 26px;
}

.play-title {
  max-width: min(640px, calc(100vw - 80px));
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
}

.detail-content {
  padding: 30px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.detail-title p {
  margin: 16px 0 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-cover {
  flex: 0 0 190px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.info-item {
  border-radius: 16px;
  background: #fdf2f8;
  padding: 16px;
}

.info-item span {
  display: block;
  color: #9d174d;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.info-item strong {
  color: #111827;
}

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

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

.detail-block p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  text-align: justify;
}

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

.related-section {
  margin-top: 42px;
}

.search-panel {
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  box-shadow: 0 22px 60px rgba(244, 114, 182, 0.14);
  padding: 34px;
  margin: 38px 0 34px;
}

.search-form {
  max-width: 720px;
  margin-top: 24px;
}

.search-form input {
  width: 100%;
  border-radius: 18px;
  padding: 15px 16px;
}

.search-empty {
  border-radius: 20px;
  color: #6b7280;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 38px;
  text-align: center;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 19px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #6b7280;
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #4b5563;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  padding: 18px;
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.36);
  cursor: pointer;
  font-size: 20px;
}

.scroll-top.visible {
  display: block;
}

@media (max-width: 1120px) {
  .movie-grid,
  .movie-grid.featured,
  .movie-grid.category-grid,
  .ranking-list,
  .category-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-nav {
    gap: 16px;
  }

  .top-search input {
    width: 190px;
  }
}

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

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

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

  .hero-content {
    bottom: 70px;
  }

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

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.category-grid,
  .ranking-list,
  .category-tile-grid,
  .info-panel,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-title {
    display: block;
  }

  .detail-cover {
    width: 180px;
    margin-top: 20px;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-panel,
  .footer-inner,
  .section-inner,
  .detail-inner,
  .list-inner {
    width: min(100% - 22px, 1280px);
  }

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

  .hero {
    min-height: 620px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .hero-meta {
    gap: 12px;
  }

  .hero-content {
    bottom: 76px;
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.category-grid,
  .ranking-list,
  .category-tile-grid,
  .info-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-grid:not(.featured),
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info strong {
    font-size: 15px;
  }

  .detail-content,
  .list-hero,
  .search-panel {
    padding: 22px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
  }

  .category-filter {
    display: block;
  }

  .category-filter input {
    width: 100%;
    margin-top: 14px;
  }
}
