:root {
  --pink: #ec4899;
  --pink-dark: #db2777;
  --orange: #f97316;
  --blue: #38bdf8;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: rgba(236, 72, 153, 0.16);
  --shadow: 0 20px 50px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 48%, #eff6ff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.08);
  backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.28);
}

.brand-name,
.footer-brand {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 15px;
  color: #4b5563;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--pink);
  background: #fdf2f8;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #fdf2f8;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--pink);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.hero-slider {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--blue));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.04);
}

.hero-bg::after,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(219, 39, 119, 0.84), rgba(249, 115, 22, 0.64), rgba(56, 189, 248, 0.58)),
    rgba(0, 0, 0, 0.34);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 78px 0 110px;
}

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

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-info p {
  max-width: 780px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2.4vw, 1.32rem);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-actions,
.detail-info .btn {
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  box-shadow: 0 16px 28px rgba(236, 72, 153, 0.26);
}

.btn.ghost {
  color: var(--pink);
  background: #ffffff;
}

.btn.glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn.wide {
  width: 100%;
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border: 10px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.16);
}

.hero-poster img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 14px 16px;
  font-weight: 800;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.68);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  border-radius: 999px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-wave {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 3;
  height: 72px;
  color: #fff7ed;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.home-search-panel {
  margin-top: -30px;
  position: relative;
  z-index: 6;
}

.quick-search,
.search-box {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-search label {
  font-weight: 800;
  color: var(--pink);
}

.quick-search div,
.search-box {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.quick-search input,
.search-box input,
.search-box select,
.category-filter input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid #fbcfe8;
  border-radius: 999px;
  outline: 0;
  background: #ffffff;
}

.search-box {
  grid-template-columns: minmax(0, 1fr) 180px auto;
  margin-top: 24px;
}

.section-block,
.detail-section {
  padding: 56px 0;
}

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

.section-heading h2,
.ranking-card h2,
.content-card h2,
.category-overview-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.category-overview-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--pink);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fff7fb);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(236, 72, 153, 0.15);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fdf2f8, #fff7ed);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.poster-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.88);
  backdrop-filter: blur(8px);
}

.poster-chip {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body em {
  overflow: hidden;
  color: var(--pink);
  font-size: 0.83rem;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile,
.category-overview-card,
.ranking-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(14px);
}

.category-tile {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(236, 72, 153, 0.14);
}

.category-tile span {
  color: var(--pink);
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile strong {
  color: var(--text);
  font-size: 0.98rem;
}

.category-tile em {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
}

.layout-with-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.ranking-card,
.content-card,
.category-overview-card {
  padding: 24px;
}

.ranking-list,
.category-overview-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff7ed;
}

.mini-card span {
  display: grid;
  gap: 4px;
}

.mini-card strong {
  overflow: hidden;
  color: var(--text);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--blue));
}

.page-hero .container {
  position: relative;
  z-index: 2;
  padding: 76px 0 84px;
}

.page-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.26), transparent 28%),
    radial-gradient(circle at 86% 32%, rgba(255, 255, 255, 0.18), transparent 30%);
}

.compact-hero .container {
  padding-bottom: 72px;
}

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

.category-overview-card {
  display: grid;
  gap: 18px;
}

.category-filter {
  max-width: 520px;
  margin-top: 24px;
}

.detail-hero {
  min-height: 600px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.04);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.detail-poster {
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 28px 0 0;
}

.meta-list div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.meta-list dt,
.meta-list dd {
  margin: 0;
}

.meta-list dt {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
}

.meta-list dd {
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #111827;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-items: center;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.38), rgba(17, 24, 39, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  padding-left: 5px;
  color: var(--pink);
  font-size: 1.8rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.play-trigger strong {
  font-size: 1.3rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.content-card h2 + p,
.side-meta p {
  margin-top: 12px;
}

.content-card p {
  color: #4b5563;
  font-size: 1.03rem;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.site-footer {
  margin-top: 52px;
  color: #e5e7eb;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 18px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-content,
  .detail-grid,
  .layout-with-side,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: 640px;
  }

  .hero-content {
    padding: 70px 0 120px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.55rem;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .movie-grid,
  .movie-grid.small-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero .container,
  .detail-hero-inner {
    padding-top: 52px;
  }
}
