* {
  box-sizing: border-box;
}

:root {
  --pink: #ec4899;
  --pink-dark: #db2777;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --blue: #3b82f6;
  --cyan: #14b8a6;
  --orange: #f97316;
  --yellow: #fde047;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fdf2f8;
  --panel: rgba(255, 255, 255, 0.9);
  --shadow: 0 20px 50px rgba(82, 39, 126, 0.16);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(236, 72, 153, 0.18), transparent 26rem),
    radial-gradient(circle at 90% 4%, rgba(59, 130, 246, 0.16), transparent 24rem),
    linear-gradient(180deg, #fff7fb 0%, #f8fbff 44%, #ffffff 100%);
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #7c2d12;
  background: var(--yellow);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(253, 224, 71, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.mobile-nav a {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover {
  color: var(--yellow);
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.header-search input {
  width: 220px;
  height: 40px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  outline: none;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.search-panel button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  color: #7c2d12;
  font-weight: 800;
  background: var(--yellow);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(253, 224, 71, 0.28);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 14px;
  flex-direction: column;
}

.mobile-nav.open {
  display: flex;
}

.hero-section {
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 42px auto 32px;
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(253, 242, 248, 0.96), rgba(239, 246, 255, 0.95));
  box-shadow: var(--shadow);
}

.hero-glow {
  position: absolute;
  inset: -35% -12% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.36), transparent 65%);
  filter: blur(8px);
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  transform: translateX(32px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pink-dark);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(90deg, var(--pink-dark), var(--purple-dark));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 660px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--purple-dark);
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.12));
}

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

.primary-button,
.ghost-button,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 900;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.rank-action {
  color: #ffffff;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 16px 30px rgba(236, 72, 153, 0.26);
}

.ghost-button {
  color: var(--purple-dark);
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(255, 255, 255, 0.75);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(139, 92, 246, 0.28);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.24);
  transform: rotate(1.5deg);
}

.hero-poster img {
  height: 470px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.hero-poster span,
.play-badge {
  position: absolute;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

.hero-poster span {
  left: 22px;
  bottom: 22px;
  padding: 10px 16px;
  border-radius: 999px;
}

.hero-control-row {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-control-row a {
  color: var(--purple-dark);
  font-weight: 900;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.section-block,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto;
}

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

.section-title span {
  display: block;
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.section-title a {
  color: var(--purple-dark);
  font-weight: 900;
}

.section-title.light h2,
.section-title.light span,
.section-title.light a {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(31, 41, 55, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(139, 92, 246, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  height: 295px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease;
}

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

.play-badge {
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
}

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

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

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-samples a:hover {
  color: var(--purple-dark);
}

.movie-line {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.movie-meta {
  margin-bottom: 12px;
}

.movie-meta span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #c4b5fd;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--purple-dark);
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.1), rgba(139, 92, 246, 0.11));
}

.ranking-strip,
.player-section {
  padding: 42px;
  border-radius: 34px;
  background: linear-gradient(135deg, #111827, #312e81 54%, #831843);
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 108px 54px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
}

.ranking-strip .rank-item {
  background: rgba(255, 255, 255, 0.96);
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  height: 86px;
  object-fit: cover;
}

.rank-number {
  color: transparent;
  font-size: 30px;
  font-weight: 1000;
  background: linear-gradient(180deg, var(--pink), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

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

.category-card,
.category-overview-card,
.content-card {
  display: block;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(253, 242, 248, 0.9));
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(139, 92, 246, 0.18);
}

.category-card span,
.category-card-title {
  display: block;
  margin-bottom: 10px;
  color: var(--purple-dark);
  font-size: 22px;
  font-weight: 1000;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  padding: 7px 10px;
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 800;
  background: rgba(236, 72, 153, 0.1);
  border-radius: 999px;
}

.soft-panel {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(253, 242, 248, 0.92));
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 32px;
  padding: 54px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(253, 242, 248, 0.96), rgba(239, 246, 255, 0.95));
  box-shadow: var(--shadow);
}

.page-hero p {
  margin-bottom: 0;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px auto;
  gap: 12px;
  margin-top: 28px;
}

.search-panel input,
.search-panel select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.empty-result {
  display: none;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster-card {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(31, 41, 55, 0.2);
}

.detail-poster-card img {
  height: 510px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--purple-dark);
  font-weight: 800;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #7c2d12;
  font-size: 32px;
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 20px 46px rgba(253, 224, 71, 0.36);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.content-card p {
  color: #374151;
  font-size: 17px;
  line-height: 1.95;
}

.large-tags span {
  padding: 8px 12px;
  font-size: 13px;
}

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

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid h3 {
  color: transparent;
  background: linear-gradient(90deg, #f9a8d4, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
}

.footer-grid p {
  margin: 0;
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

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

@media (max-width: 1050px) {
  .header-search {
    display: none;
  }

  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .hero-poster img {
    height: 420px;
  }

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

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

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

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

  .header-inner {
    height: 64px;
  }

  .hero-section,
  .page-hero,
  .detail-hero,
  .section-block,
  .player-section {
    width: min(100% - 24px, 680px);
  }

  .hero-section {
    min-height: auto;
    border-radius: 26px;
  }

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

  .hero-slide {
    padding: 34px 24px 86px;
  }

  .hero-control-row {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

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

  .rank-item {
    grid-template-columns: 82px 44px 1fr;
  }

  .rank-action {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

  .page-hero,
  .detail-hero,
  .ranking-strip,
  .player-section,
  .soft-panel {
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .logo {
    font-size: 19px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 32px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

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

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

  .hero-poster img {
    height: 340px;
  }

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

  .poster-link img {
    height: 360px;
  }

  .rank-item {
    grid-template-columns: 76px 1fr;
  }

  .rank-number {
    position: absolute;
    margin-left: 52px;
    margin-top: -58px;
    padding: 2px 8px;
    font-size: 18px;
    background: linear-gradient(90deg, var(--pink), var(--orange));
    color: #ffffff;
    border-radius: 999px;
    -webkit-background-clip: initial;
    background-clip: initial;
  }

  .rank-action {
    grid-column: 1 / 3;
  }

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

  .detail-poster-card img {
    height: 430px;
  }

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