:root {
  --brand-a: #7c3aed;
  --brand-b: #ec4899;
  --brand-c: #a855f7;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f8f2ff;
  --line: #eadcf8;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(88, 28, 135, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff7ff 0%, #f8f2ff 42%, #ffffff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b), var(--brand-c));
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.04);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-a);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.brand-text {
  background: linear-gradient(90deg, #fff, #f3e8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  width: 220px;
}

.header-search input,
.mobile-search input,
.page-filter input,
.quick-search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 12px 48px 12px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

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

.header-search button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

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

.mobile-search input {
  padding-right: 18px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--brand-a);
  background: #fff;
  font-weight: 800;
}

.mobile-link {
  display: block;
  padding: 10px 4px;
}

main,
.page-main,
.detail-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  width: 100%;
  height: 520px;
  margin: 28px auto 34px;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(236, 72, 153, 0.36), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(88, 28, 135, 0.78) 48%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.62), transparent 44%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  top: 50%;
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #f9a8d4;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.player-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.hero-copy p,
.page-hero p,
.player-info p {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
}

.card-body .tag-row span {
  color: #7e22ce;
  background: #f3e8ff;
  box-shadow: none;
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.38);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.as-button {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.quick-search-panel,
.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(236, 72, 153, 0.88));
  box-shadow: var(--shadow);
  color: #fff;
}

.quick-search-panel span {
  color: #fde68a;
  font-weight: 900;
}

.quick-search-panel h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
}

.quick-search-panel form {
  display: flex;
  width: min(520px, 100%);
  gap: 12px;
}

.quick-search-panel input {
  background: rgba(255, 255, 255, 0.18);
  padding-right: 18px;
}

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

.quick-search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--brand-a);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.content-section {
  margin: 46px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: #2d1b45;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 950;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #9333ea;
  font-weight: 900;
  white-space: nowrap;
}

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

.category-grid.large {
  grid-template-columns: repeat(4, 1fr);
}

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  isolation: isolate;
  box-shadow: 0 14px 32px rgba(76, 29, 149, 0.18);
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.86), rgba(236, 72, 153, 0.62));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile strong {
  display: block;
  margin-top: 52px;
  font-size: 22px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
  font-size: 14px;
}

.movie-grid,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.mini-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 35px rgba(88, 28, 135, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(17, 24, 39, 0.82));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(236, 72, 153, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #2d1b45;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.35;
}

.card-title:hover {
  color: #9333ea;
}

.card-meta {
  margin-top: 7px;
  color: #8b5cf6;
  font-size: 13px;
  font-weight: 800;
}

.card-body p {
  min-height: 48px;
  margin: 9px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
}

.movie-card.compact .card-body p {
  display: none;
}

.two-column-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
}

.rank-stack,
.rank-page-list {
  display: grid;
  gap: 14px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(88, 28, 135, 0.1);
}

.horizontal-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #581c87, #ec4899);
}

.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horizontal-body {
  align-self: center;
  min-width: 0;
}

.horizontal-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2d1b45;
  font-weight: 950;
}

.horizontal-title-line a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-rank {
  flex: 0 0 auto;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #7c3aed);
  font-size: 13px;
}

.horizontal-body p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.page-main,
.detail-main {
  padding-top: 28px;
}

.page-hero {
  min-height: 260px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #581c87, #ec4899 62%, #a855f7);
}

.page-hero.small-hero {
  min-height: 220px;
}

.page-filter {
  width: min(460px, 100%);
}

.page-filter input {
  color: #fff;
  padding-right: 18px;
}

.page-filter input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 22px;
  color: #7e22ce;
  background: #f3e8ff;
  text-align: center;
  font-weight: 900;
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #9333ea;
  font-weight: 800;
}

.player-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 26px;
  align-items: stretch;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(135deg, #1f0b3b, #581c87 56%, #ec4899);
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-overlay-button span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #7c3aed);
  box-shadow: 0 20px 48px rgba(236, 72, 153, 0.4);
  font-size: 32px;
  text-indent: 4px;
}

.player-overlay-button.playing {
  opacity: 0;
  pointer-events: none;
}

.player-info {
  align-self: center;
  color: #fff;
}

.player-info h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  margin-top: 34px;
}

.detail-poster {
  overflow: hidden;
  align-self: start;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.poster-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
}

.poster-meta span {
  border-radius: 14px;
  padding: 8px 6px;
  color: #7e22ce;
  background: #f3e8ff;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.detail-content {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-content h2 {
  margin: 0 0 14px;
  color: #2d1b45;
  font-size: 26px;
  font-weight: 950;
}

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

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

.movie-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.movie-facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.movie-facts dt {
  color: #7e22ce;
  font-weight: 950;
}

.movie-facts dd {
  margin: 0;
  color: #4b5563;
}

.site-footer {
  margin-top: 70px;
  color: #fff;
  background: linear-gradient(180deg, #581c87, #2e1065);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 950;
}

.footer-grid h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

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

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

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

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

  .two-column-section,
  .player-section {
    grid-template-columns: 1fr;
  }

  .mini-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    gap: 14px;
  }

  .hero {
    height: 560px;
    border-radius: 24px;
  }

  .hero-copy {
    top: auto;
    bottom: 64px;
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .page-hero {
    display: grid;
  }

  .quick-search-panel form,
  .mobile-search {
    flex-direction: column;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  main,
  .page-main,
  .detail-main,
  .header-inner,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1220px);
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 600px;
    margin-top: 18px;
  }

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

  .hero-copy p,
  .page-hero p,
  .player-info p {
    font-size: 15px;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: 0;
    font-size: 13px;
  }

  .horizontal-card {
    grid-template-columns: 78px 1fr;
  }

  .player-section {
    padding: 12px;
    border-radius: 24px;
  }

  .detail-content {
    padding: 20px;
  }

  .movie-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

@media (max-width: 420px) {
  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }
}
