:root {
  --bg: #fbf7ff;
  --bg-soft: #f3e8ff;
  --ink: #17112b;
  --muted: #695f7c;
  --brand: #9333ea;
  --brand-2: #db2777;
  --brand-3: #2563eb;
  --card: rgba(255, 255, 255, 0.78);
  --line: rgba(147, 51, 234, 0.16);
  --shadow: 0 24px 60px rgba(48, 24, 88, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(216, 180, 254, 0.55), transparent 26rem),
    radial-gradient(circle at 82% 6%, rgba(251, 207, 232, 0.6), transparent 26rem),
    linear-gradient(135deg, #faf5ff 0%, #eff6ff 48%, #fdf2f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.54) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.54) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 70%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 45px rgba(84, 47, 128, 0.12);
  backdrop-filter: blur(16px);
}

.text-gradient {
  color: transparent;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
}

.line-clamp-2,
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 14px auto 0;
  width: min(1180px, calc(100% - 28px));
  border-radius: 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 0 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.32);
}

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

.main-nav a,
.section-link,
.btn,
.filter-chips button,
.menu-toggle,
.player-start {
  border: 0;
  border-radius: 999px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.main-nav a {
  padding: 10px 16px;
  color: #4c3f61;
  font-weight: 700;
}

.main-nav a:hover,
.filter-chips button.active,
.filter-chips button:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.24);
}

.menu-toggle {
  display: none;
  padding: 9px 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.hero-slider {
  position: relative;
  min-height: 64vh;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.95), rgba(219, 39, 119, 0.86), rgba(37, 99, 235, 0.9));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 330px;
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 5vw, 70px);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 22rem),
    linear-gradient(90deg, rgba(19, 9, 38, 0.9), rgba(38, 13, 67, 0.66), rgba(12, 18, 42, 0.72));
}

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

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

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 34px rgba(147, 51, 234, 0.3);
}

.btn:hover,
.section-link:hover,
.player-start:hover {
  transform: translateY(-2px);
}

.btn.btn-light {
  color: #24143a;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.hero-poster {
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  transform: rotate(2deg);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
}

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

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 70px);
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  background: #fff;
}

.section {
  margin-top: 42px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #1f1433;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-head p,
.page-title p,
.detail-title p,
.category-card p,
.movie-card p,
.rank-info p,
.detail-prose p,
.site-footer p {
  color: var(--muted);
}

.section-link {
  flex-shrink: 0;
  padding: 11px 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(147, 51, 234, 0.22);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 35px rgba(84, 47, 128, 0.12);
  backdrop-filter: blur(12px);
}

.card-hover {
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 25px 50px rgba(48, 24, 88, 0.2);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(219, 39, 119, 0.35));
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  color: #fff;
  border-radius: 999px;
  background: rgba(17, 12, 32, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-title {
  display: block;
  min-height: 46px;
  color: #201335;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0;
  color: #7a6c8d;
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.08);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  color: #7e22ce;
  border: 1px solid rgba(147, 51, 234, 0.16);
  border-radius: 999px;
  background: rgba(250, 245, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.94), rgba(219, 39, 119, 0.78));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p,
.category-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
}

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.filter-panel {
  margin: 24px 0;
  padding: 18px;
  border-radius: 28px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(147, 51, 234, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.filter-chips button {
  padding: 8px 12px;
  border: 1px solid rgba(147, 51, 234, 0.15);
  color: #5d4d72;
  background: rgba(255, 255, 255, 0.7);
}

.page-title {
  margin: 14px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #7a6c8d;
  font-size: 14px;
}

.breadcrumb a {
  color: #7e22ce;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(84, 47, 128, 0.1);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rank-info a {
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 6px 0 0;
}

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

.player-card,
.detail-side,
.detail-prose {
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #080510;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080510;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 5, 16, 0.72), rgba(61, 19, 92, 0.45));
}

.player-cover.is-hidden {
  display: none;
}

.player-start {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  font-weight: 900;
}

.detail-title {
  padding: 24px;
}

.detail-title p {
  margin: 14px 0 0;
  font-size: 17px;
}

.detail-side {
  padding: 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
}

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

.detail-facts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(147, 51, 234, 0.12);
}

.detail-facts span:first-child {
  color: #7a6c8d;
}

.detail-facts span:last-child {
  font-weight: 900;
  text-align: right;
}

.detail-prose {
  margin-top: 24px;
  padding: 26px;
}

.detail-prose h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-prose p {
  margin: 0 0 18px;
  line-height: 1.9;
}

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

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding: 34px 0;
  color: #554866;
  background: rgba(255, 255, 255, 0.62);
  border-top: 1px solid rgba(147, 51, 234, 0.12);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 22px;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

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

.footer-links a {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.08);
  color: #6b21a8;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b5d78;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
  }
}

@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 24px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    justify-self: center;
    order: -1;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 62px minmax(0, 1fr);
  }

  .footer-inner,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .page,
  .site-header,
  .footer-inner {
    width: min(100% - 18px, 1180px);
  }

  .header-inner {
    padding: 0 14px;
  }

  .brand {
    font-size: 17px;
  }

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

  .movie-grid,
  .related-grid {
    gap: 12px;
  }

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

  .movie-title {
    min-height: 40px;
    font-size: 14px;
  }
}

.mini-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  padding: 6px 9px;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
}
