:root {
  --purple-950: #3b0764;
  --purple-900: #581c87;
  --purple-800: #6b21a8;
  --purple-700: #7e22ce;
  --purple-600: #9333ea;
  --purple-100: #f3e8ff;
  --pink-600: #db2777;
  --pink-500: #ec4899;
  --pink-100: #fce7f3;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(88, 28, 135, 0.13);
  --shadow-strong: 0 24px 80px rgba(88, 28, 135, 0.25);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: #fff;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(147, 51, 234, 0.1);
  box-shadow: 0 10px 30px rgba(88, 28, 135, 0.08);
}

.header-inner {
  max-width: 1180px;
  height: 76px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple-100), var(--pink-100));
  color: var(--purple-700);
  box-shadow: 0 10px 24px rgba(147, 51, 234, 0.16);
}

.brand-name {
  font-size: 24px;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-600));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--purple-700);
  background: var(--purple-100);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--purple-100);
  color: var(--purple-700);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 22px 18px;
  border-top: 1px solid rgba(147, 51, 234, 0.1);
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  background: linear-gradient(135deg, #faf5ff 0%, #fff1f7 52%, #faf5ff 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.32;
  pointer-events: none;
}

.hero-glow-left {
  width: 320px;
  height: 320px;
  left: 5vw;
  top: 70px;
  background: var(--purple-600);
}

.hero-glow-right {
  width: 420px;
  height: 420px;
  right: 3vw;
  bottom: 40px;
  background: var(--pink-500);
}

.hero-stage {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 86px 22px 112px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.86fr);
  gap: 56px;
  position: relative;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.62s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 18px;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(255,255,255,0.6)), var(--hero-cover);
  background-size: cover;
  background-position: center;
  border-radius: 36px;
  opacity: 0.24;
  filter: blur(22px);
  transform: scale(1.02);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--purple-700);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(88, 28, 135, 0.1);
  font-size: 14px;
  font-weight: 750;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero h1::first-letter {
  color: var(--purple-700);
}

.hero p {
  margin: 0;
  max-width: 660px;
  color: var(--gray-600);
  font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--purple-100);
  color: var(--purple-700);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-box button {
  color: white;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-600));
  box-shadow: 0 14px 34px rgba(219, 39, 119, 0.24);
}

.ghost-btn,
.section-more {
  color: var(--purple-700);
  background: white;
  box-shadow: 0 12px 30px rgba(88, 28, 135, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.search-box button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

.hero-poster {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  transform: rotate(1.2deg);
  background: #fff;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--purple-700);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(88, 28, 135, 0.14);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(147, 51, 234, 0.25);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 32px;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-600));
}

.home-search-panel {
  margin-top: -44px;
  position: relative;
  z-index: 8;
  padding: 0 22px 42px;
}

.search-panel-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.search-panel-inner h2 {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 34px);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-box input,
.filter-input input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(147, 51, 234, 0.18);
  border-radius: 16px;
  outline: 0;
  color: var(--gray-900);
  background: #fff;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus,
.filter-input input:focus {
  border-color: rgba(147, 51, 234, 0.55);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 22px;
}

.soft-section {
  max-width: none;
  background: linear-gradient(135deg, #faf5ff, #fff7fb);
}

.soft-section > .section-heading,
.soft-section > .movie-grid,
.soft-section > .category-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.story-card h2 {
  margin: 10px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--gray-600);
  max-width: 710px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-100), var(--pink-100));
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple-700), var(--pink-600));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.card-body h2 {
  margin: 8px 0;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--purple-700);
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
}

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

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

.category-tile {
  min-height: 168px;
  padding: 24px;
  border-radius: 24px;
  color: var(--gray-900);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-600));
  -webkit-background-clip: text;
  color: transparent;
}

.category-tile p {
  margin: 0;
  color: var(--gray-600);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 148px 1fr;
  align-items: stretch;
}

.movie-card-wide .poster-link img {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-wide .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 22px 72px;
  background: linear-gradient(135deg, var(--purple-700), var(--pink-600));
  color: #fff;
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero .section-kicker {
  color: var(--purple-700);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.tool-bar {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 16px;
  align-items: end;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.sticky-tools {
  position: sticky;
  top: 94px;
  z-index: 20;
}

.filter-input {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 800;
}

.wide-filter {
  min-width: 320px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--purple-700), var(--pink-600));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(88, 28, 135, 0.7), rgba(219, 39, 119, 0.42)), var(--detail-cover);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 22px 72px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  background: #fff;
}

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

.detail-info .section-kicker {
  color: var(--purple-700);
}

.detail-info h1 {
  color: #fff;
  font-size: clamp(40px, 6vw, 70px);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

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

.player-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #09090b;
  box-shadow: var(--shadow-strong);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.65), rgba(88, 28, 135, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 6px;
  color: var(--purple-700);
  background: white;
  font-size: 34px;
  box-shadow: var(--shadow-strong);
}

.player-cover strong {
  font-size: clamp(20px, 3vw, 32px);
}

.detail-text-section {
  padding-top: 20px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.story-card h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.story-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 16px;
}

.site-footer {
  color: white;
  background: linear-gradient(135deg, var(--purple-950), var(--purple-800), #831843);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-logo .brand-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.footer-logo .brand-name {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
}

.footer-brand p {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  padding: 18px 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.card-hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide,
  .hero-slide.active,
  .search-panel-inner,
  .tool-bar,
  .detail-layout,
  .detail-text-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    padding-top: 48px;
  }

  .hero-poster {
    max-width: 420px;
    margin: 0 auto;
  }

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

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

  .sticky-tools {
    position: static;
  }

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

@media (max-width: 560px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-stage,
  .content-section,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-search-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card-wide .card-body p,
  .movie-card-wide .tag-row {
    display: none;
  }

  .page-hero {
    padding-top: 64px;
  }
}
