* {
  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: #1f2937;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 44%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(126, 34, 206, 0.96), rgba(219, 39, 119, 0.95), rgba(168, 85, 247, 0.96));
  box-shadow: 0 12px 32px rgba(91, 33, 182, 0.24);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.nav-links a,
.mobile-panel a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links .active,
.mobile-panel a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

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

.nav-search input,
.mobile-search input {
  width: 230px;
  border: 0;
  color: #ffffff;
  outline: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.play-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button {
  color: #7e22ce;
  background: #ffffff;
  padding: 10px 16px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
}

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

main {
  min-height: 64vh;
}

.hero {
  position: relative;
  min-height: 650px;
  color: #ffffff;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.42), transparent 34%), linear-gradient(135deg, #4c1d95 0%, #7e22ce 44%, #db2777 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 10, 38, 0.08), rgba(18, 10, 38, 0.52));
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 58px;
}

.hero-slider {
  position: relative;
  border-radius: 32px;
  min-height: 520px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 34px 80px rgba(59, 7, 100, 0.36);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff7ed;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.primary-btn {
  color: #7e22ce;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.primary-btn:hover,
.secondary-btn:hover,
.play-button:hover,
.filter-btn:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(390px, 100%);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.46);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04));
  transform: rotate(4deg);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 56px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.hero-arrows {
  position: absolute;
  right: 34px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

.section {
  padding: 64px 0;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 12px 0 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.detail-title p {
  margin: 12px 0 0;
  color: #6b7280;
  line-height: 1.8;
}

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.detail-panel {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(88, 28, 135, 0.1);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(88, 28, 135, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #581c87, #db2777);
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.play-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.3);
}

.card-body {
  padding: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 800;
}

.meta-row span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f5f3ff;
}

.movie-card h3,
.rank-info h3,
.detail-panel h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.rank-info p,
.category-card p,
.detail-panel p,
.info-panel p {
  margin: 0;
  color: #6b7280;
  line-height: 1.72;
}

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

.tag-row span {
  color: #9d174d;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #fdf2f8;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #7e22ce, #db2777);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(219, 39, 119, 0.22);
}

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

.category-card p {
  color: rgba(255, 255, 255, 0.86);
}

.category-card .category-link {
  display: inline-flex;
  margin-top: 20px;
  font-weight: 900;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(110deg, #581c87, #a21caf, #ec4899);
}

.page-hero .container {
  padding: 58px 0;
}

.page-title h1,
.page-title p {
  color: #ffffff;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(88, 28, 135, 0.1);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #ede9fe;
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  color: #374151;
  background: #ffffff;
}

.filter-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #7c3aed, #db2777);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 100px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  border-radius: 18px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.rank-cover img {
  height: 132px;
  object-fit: cover;
  border-radius: 16px;
}

.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 16% 20%, rgba(236, 72, 153, 0.42), transparent 30%), linear-gradient(135deg, #32105a, #7e22ce 46%, #be185d);
}

.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 54px;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 34px;
  align-items: center;
}

.detail-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 76px rgba(17, 24, 39, 0.42);
}

.detail-title h1,
.detail-title p {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

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

.player-card {
  margin-top: -32px;
  position: relative;
  z-index: 3;
  border-radius: 28px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 32px 90px rgba(17, 24, 39, 0.3);
}

.player-box {
  position: relative;
  background: #020617;
}

.player-box video {
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: #7e22ce;
  font-size: 30px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(255, 255, 255, 0.22);
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.detail-panel,
.info-panel {
  padding: 26px;
}

.detail-panel + .detail-panel {
  margin-top: 20px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta div {
  border-radius: 16px;
  padding: 14px;
  background: #f5f3ff;
}

.detail-meta strong {
  display: block;
  color: #6d28d9;
  font-size: 13px;
  margin-bottom: 5px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card img {
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.related-card h3 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 15px;
}

.related-card p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.search-empty {
  display: none;
  padding: 38px;
  text-align: center;
  border-radius: 24px;
  color: #6b7280;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(88, 28, 135, 0.1);
}

.site-footer {
  margin-top: 64px;
  color: #ede9fe;
  background: linear-gradient(135deg, #3b0764, #581c87, #831843);
}

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

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

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0 0 10px;
  color: #ddd6fe;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 16px 24px;
  text-align: center;
  color: #c4b5fd;
}

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

  .nav-search {
    margin-left: auto;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    padding: 34px;
  }

  .hero-poster {
    justify-self: start;
    width: min(280px, 100%);
  }

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

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

@media (max-width: 620px) {
  .nav-wrap {
    height: 62px;
  }

  .logo {
    font-size: 19px;
  }

  .hero {
    min-height: 740px;
  }

  .hero-shell {
    padding: 28px 0 44px;
  }

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

  .hero-slide {
    padding: 24px;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-arrows {
    right: 24px;
  }

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

  .movie-grid,
  .category-grid,
  .rank-list,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-cover img {
    height: 110px;
  }
}
