* {
  box-sizing: border-box;
}

:root {
  --bg: #f8f7ff;
  --bg-soft: #ffffff;
  --ink: #17132b;
  --muted: #6b647c;
  --purple: #7c3aed;
  --pink: #db2777;
  --blue: #2563eb;
  --line: rgba(124, 58, 237, 0.14);
  --shadow: 0 24px 60px rgba(73, 45, 122, 0.16);
  --radius: 28px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(240, 147, 251, 0.25), transparent 32rem),
    radial-gradient(circle at top right, rgba(79, 172, 254, 0.20), transparent 30rem),
    var(--bg);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.nebula-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.marshmallow-gradient {
  background: linear-gradient(120deg, #ffd1dc, #ffb6c1, #e6b3ff, #c7b3ff, #b3d9ff);
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 55px rgba(93, 63, 151, 0.12);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
}

.text-gradient,
.logo-text,
.footer-logo {
  background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(55, 48, 101, 0.12);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 15px;
  background: linear-gradient(135deg, #7c3aed, #db2777, #2563eb);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.34);
}

.logo-text {
  font-size: 1.35rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #332b4a;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.10);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(124, 58, 237, 0.16);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
}

.header-search button,
.primary-button,
.ghost-button,
.section-link {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
}

.header-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
  box-shadow: 0 14px 32px rgba(124, 58, 237, 0.25);
}

.header-search button {
  padding: 8px 14px;
}

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

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 22px;
  height: 2px;
  background: #3c3158;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.mobile-panel a,
.mobile-panel form {
  display: flex;
  width: 100%;
  padding: 12px 10px;
  border-radius: 16px;
  color: #302842;
  font-weight: 800;
}

.mobile-panel a:hover {
  background: rgba(124, 58, 237, 0.10);
}

.mobile-panel form {
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
}

.mobile-panel button {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #db2777);
}

.site-header.menu-open .mobile-panel {
  display: block;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #110d22;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(0deg, #f8f7ff 0%, rgba(248, 247, 255, 0) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 112px;
  color: #ffffff;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #facc15;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.84);
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  font-weight: 800;
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 42px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.page-wrap,
.detail-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 112px;
}

.content-section,
.category-list-section,
.archive-section,
.detail-content,
.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 56px auto;
}

.page-wrap .content-section,
.page-wrap .archive-section,
.page-wrap .category-list-section,
.detail-wrap .content-section,
.detail-wrap .player-section,
.detail-wrap .detail-content {
  width: 100%;
}

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

.section-heading h2,
.filter-panel h2,
.story-card h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.section-heading p,
.filter-panel p,
.story-card p,
.page-hero p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.10);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(75, 52, 125, 0.10);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(240, 147, 251, 0.24));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 50%);
  opacity: 0.72;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.86);
  font-size: 0.82rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #db2777, #7c3aed);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.25);
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 6px;
}

.card-meta span {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.10);
  padding: 4px 8px;
  font-size: 0.75rem;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #7c3aed;
}

.card-summary {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-summary.compact {
  min-height: 3.2em;
  -webkit-line-clamp: 2;
}

.tag-row span {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.10);
}

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

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 28px;
  overflow: hidden;
  padding: 24px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 48px rgba(83, 52, 138, 0.16);
}

.category-card span {
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 72px clamp(24px, 5vw, 64px);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  filter: blur(6px);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p,
.page-hero .section-kicker {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
}

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

.breadcrumb a {
  color: #7c3aed;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0;
  padding: 22px;
  border-radius: 28px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(120px, 0.7fr));
  gap: 12px;
  flex: 1;
  max-width: 760px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 16px;
  outline: 0;
  padding: 0 14px;
  color: #2d2443;
  background: rgba(255, 255, 255, 0.86);
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 26px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 44px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(240, 147, 251, 0.28));
}

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

.detail-info h1 {
  margin: 10px 0 18px;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.9;
}

.detail-meta span {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.10);
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  scroll-margin-top: 96px;
}

.compact-heading {
  margin-bottom: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #090713;
  box-shadow: 0 28px 70px rgba(18, 12, 40, 0.36);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05030b;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background-image:
    linear-gradient(135deg, rgba(15, 10, 33, 0.75), rgba(124, 58, 237, 0.34)),
    var(--poster);
  background-size: cover;
  background-position: center;
  font-size: 1.1rem;
  font-weight: 900;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #db2777, #4facfe);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  font-size: 2rem;
}

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

.story-card {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
}

.story-card h2 {
  font-size: 1.65rem;
}

.story-card p {
  margin: 0;
  color: #514866;
  font-size: 1.02rem;
}

.site-footer {
  margin-top: 80px;
  padding: 44px 0;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-logo {
  font-size: 1.35rem;
  font-weight: 950;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.10);
  font-weight: 800;
}

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

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

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

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    max-width: none;
  }
}

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

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-content {
    padding-bottom: 90px;
  }

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

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

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

  .filter-controls input {
    grid-column: 1 / -1;
  }

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

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

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

  .footer-inner {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .header-inner {
    height: 68px;
  }

  .logo-text {
    font-size: 1.08rem;
  }

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

  .hero-content h1 {
    font-size: 2.7rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-wrap,
  .detail-wrap {
    width: min(100% - 24px, 1200px);
    padding-top: 92px;
  }

  .content-section,
  .category-list-section,
  .archive-section,
  .detail-content,
  .player-section {
    width: min(100% - 24px, 1200px);
    margin: 40px auto;
  }

  .page-wrap .content-section,
  .page-wrap .archive-section,
  .page-wrap .category-list-section,
  .detail-wrap .content-section,
  .detail-wrap .player-section,
  .detail-wrap .detail-content {
    width: 100%;
  }

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

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

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

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

  .page-hero {
    border-radius: 26px;
    padding: 48px 24px;
  }

  .card-body {
    padding: 13px;
  }
}
