:root {
  --pink: #ec4899;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #fff7fb;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: linear-gradient(135deg, #fff1f7 0%, #ffffff 42%, #eff6ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.08);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #111827;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--red), var(--yellow));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--red));
  box-shadow: 0 14px 26px rgba(236, 72, 153, 0.24);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.hero-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #ec4899, #ef4444, #f59e0b, #3b82f6);
  background-size: 260% 260%;
  animation: gradientMove 12s ease infinite;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.35), transparent 24%),
    radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.14), rgba(17, 24, 39, 0.42));
}

.hero-container {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: 54px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

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

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.section-kicker {
  color: var(--pink);
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.2);
}

.hero-copy h1 {
  margin: 22px 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(17, 24, 39, 0.26);
}

.hero-copy p {
  margin: 0 0 28px;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.hero-tags a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: 0.25s ease;
}

.hero-tags a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn.primary {
  color: var(--red);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.22);
}

.btn.secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(17, 24, 39, 0.42);
  transform: rotate(3deg);
  animation: floatPoster 5s ease-in-out infinite;
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.15), rgba(17, 24, 39, 0.78));
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 46px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: 0.25s ease;
}

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

.section-block {
  margin-top: 56px;
}

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

.section-heading h2,
.page-hero h1,
.detail-main h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, var(--pink), var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-more,
.text-link {
  color: var(--pink);
  font-weight: 900;
}

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

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

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

.movie-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #dbeafe);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: 0.28s ease;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.28);
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 18px;
}

.movie-info h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 900;
}

.movie-info h2 a:hover {
  color: var(--pink);
}

.movie-line {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta,
.detail-side-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #4b5563;
  font-size: 13px;
}

.movie-meta span,
.detail-meta span,
.detail-side-info span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f4f6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #be185d;
  background: #fce7f3;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile,
.category-card-large {
  display: block;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.08);
  transition: 0.25s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
  color: #111827;
}

.category-tile em,
.category-card-large p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 64px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateX(5px);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 950;
}

.rank-item img {
  width: 64px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  font-weight: 900;
}

.rank-text em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.page-shell {
  padding: 36px 0 70px;
}

.page-hero {
  position: relative;
  padding: 46px;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 251, 0.92));
  box-shadow: var(--shadow);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18), transparent 70%);
}

.page-hero p {
  position: relative;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.compact-actions .btn.secondary {
  color: var(--pink);
  border-color: rgba(236, 72, 153, 0.22);
  background: #ffffff;
}

.compact-actions .btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--red));
}

.category-large-grid {
  margin-top: 34px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

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

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

.top-rank-card {
  position: relative;
  display: block;
  min-height: 420px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.top-rank-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.top-rank-card:hover img {
  transform: scale(1.06);
}

.top-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(17, 24, 39, 0.86));
}

.rank-crown,
.top-rank-card strong,
.top-rank-card em {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  color: #ffffff;
}

.rank-crown {
  top: 22px;
  right: auto;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--red));
  font-weight: 950;
}

.top-rank-card strong {
  bottom: 58px;
  font-size: 24px;
  font-weight: 950;
}

.top-rank-card em {
  bottom: 26px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

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

.player-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: stretch;
}

.player-card {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--red);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.35);
}

.play-overlay strong {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 20px;
}

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

.detail-side {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.detail-side img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  margin-top: 34px;
}

.detail-main,
.side-rank {
  padding: 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-main h1 {
  color: #111827;
}

.detail-one-line {
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 1.8;
  color: #374151;
  font-weight: 800;
}

.detail-main h2,
.side-rank h2,
.site-footer h2 {
  margin: 28px 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.detail-main p {
  color: #4b5563;
  line-height: 1.95;
  font-size: 17px;
}

.side-list .rank-item {
  grid-template-columns: 36px 52px 1fr;
}

.side-list .rank-item img {
  width: 52px;
  height: 70px;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 42px;
  padding: 46px 0;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
}

.site-footer p {
  max-width: 620px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--red));
}

.hidden-by-filter {
  display: none !important;
}

@keyframes gradientMove {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes floatPoster {
  0%, 100% {
    transform: translateY(0) rotate(3deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

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

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

  .hero-slide,
  .player-layout,
  .detail-content,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .detail-side {
    display: none;
  }
}

@media (max-width: 820px) {
  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-shell,
  .hero-container {
    min-height: 560px;
  }

  .hero-dots {
    bottom: 28px;
  }

  .filter-panel,
  .footer-grid,
  .full-rank,
  .top-rank-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-main,
  .side-rank {
    padding: 24px;
  }
}

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

  .hero-shell,
  .hero-container {
    min-height: 620px;
  }

  .movie-grid,
  .hot-grid,
  .category-grid,
  .category-movie-grid,
  .search-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    display: grid;
    grid-template-columns: 112px 1fr;
  }

  .movie-card.compact .movie-poster img {
    height: 100%;
  }

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

  .hero-actions .btn {
    width: 100%;
  }
}
