* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background:
    radial-gradient(circle at 10% 10%, rgba(147, 51, 234, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(219, 39, 119, 0.13), transparent 30rem),
    linear-gradient(135deg, #faf5ff 0%, #fdf2f8 48%, #eff6ff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(91, 33, 182, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 74px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 14px 30px rgba(147, 51, 234, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.06);
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 11px 16px;
  background: transparent;
  color: #374151;
}

.header-search button,
.large-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777, #2563eb);
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(124, 58, 237, 0.22);
}

.header-search button {
  margin-right: 5px;
  padding: 7px 15px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 650;
  color: #4b5563;
}

.nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #9333ea;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #6b21a8;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.page-shell {
  padding-top: 74px;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: -20px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.66);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.64)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 88px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  align-items: end;
  gap: 52px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #facc15;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 20px 38px rgba(79, 70, 229, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section-panel,
.content-section,
.rank-panel,
.story-panel,
.detail-side,
.page-hero,
.category-overview-card,
.ranking-card {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(91, 33, 182, 0.09);
}

.section-panel,
.content-section,
.page-hero {
  max-width: 1280px;
  margin: 42px auto 0;
  border-radius: 30px;
  padding: 32px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: center;
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.story-panel h2,
.detail-side h2 {
  margin: 0;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.home-search-panel h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.home-search-panel p,
.page-hero p {
  margin: 12px 0 0;
  color: #5b6472;
  line-height: 1.8;
}

.large-search,
.filter-panel {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.08);
}

.large-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  background: transparent;
  color: #374151;
}

.large-search input {
  flex: 1;
}

.large-search button,
.filter-panel button {
  padding: 0 22px;
}

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

.section-head h2 {
  font-size: 28px;
}

.section-head a,
.section-head span {
  color: #7c3aed;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 50px rgba(76, 29, 149, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 28px 70px rgba(76, 29, 149, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea, #f093fb);
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.06);
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #5b6472;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row span {
  color: #6b21a8;
  background: #f3e8ff;
}

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

.category-card,
.category-overview-main {
  position: relative;
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  overflow: hidden;
  border-radius: 26px;
  padding: 20px;
  color: #ffffff;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08)),
    var(--category-image) center / cover;
  box-shadow: 0 18px 50px rgba(76, 29, 149, 0.18);
}

.category-card span,
.category-overview-main span {
  font-size: 22px;
  font-weight: 900;
}

.category-card strong,
.category-overview-main strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.65;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  border-radius: 28px;
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  transition: transform 0.2s ease, background 0.2s ease;
}

.side-rank-list .rank-item {
  grid-template-columns: 54px minmax(0, 1fr);
}

.rank-item:hover {
  transform: translateX(4px);
  background: #ffffff;
}

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

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.rank-copy strong {
  overflow: hidden;
  color: #111827;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.inner-page {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.inner-page .page-hero,
.inner-page .content-section {
  max-width: none;
}

.small-hero {
  margin-top: 32px;
}

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

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chip {
  color: #6b21a8;
  background: rgba(243, 232, 255, 0.8);
}

.chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.category-overview-grid {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-overview-card {
  overflow: hidden;
  border-radius: 28px;
  padding: 16px;
}

.category-overview-main {
  min-height: 210px;
}

.category-samples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.category-samples a {
  overflow: hidden;
  border-radius: 14px;
  padding: 12px 14px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filter-panel {
  margin-top: 22px;
  border-radius: 24px;
  flex-wrap: wrap;
}

.filter-panel input,
.filter-panel select {
  flex: 1 1 180px;
}

.ranking-list-page {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  border-radius: 28px;
  padding: 16px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
}

.ranking-cover span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

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

.ranking-body h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 26px;
}

.ranking-body p {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.8;
}

.score-bar {
  position: relative;
  height: 12px;
  margin-top: 20px;
  border-radius: 999px;
  background: #e9d5ff;
}

.score-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #db2777, #2563eb);
}

.score-bar em {
  position: absolute;
  right: 0;
  top: -26px;
  color: #7c3aed;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.detail-hero {
  margin-top: 32px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.movie-player {
  width: 100%;
  height: 100%;
  min-height: 460px;
  display: block;
  background: #020617;
  object-fit: cover;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.66));
  cursor: pointer;
}

.play-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  font-size: 30px;
  background: linear-gradient(135deg, #7c3aed, #db2777, #2563eb);
  box-shadow: 0 22px 45px rgba(124, 58, 237, 0.38);
}

.play-cover strong {
  font-size: 20px;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-copy {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(91, 33, 182, 0.09);
}

.detail-copy h1 {
  margin: 0 0 16px;
  color: #111827;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.detail-copy p {
  margin: 0 0 22px;
  color: #4b5563;
  line-height: 1.85;
}

.detail-copy .detail-meta span {
  color: #6b21a8;
  background: #f3e8ff;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 32px;
}

.story-panel,
.detail-side {
  border-radius: 30px;
  padding: 30px;
}

.story-panel h2,
.detail-side h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.story-panel p {
  margin: 0 0 26px;
  color: #374151;
  line-height: 2;
}

.site-footer {
  max-width: 1280px;
  margin: 64px auto 0;
  padding: 0 24px 34px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 26px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(16px);
}

.footer-inner p {
  color: #6b7280;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px;
}

.footer-links a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #6b21a8;
  background: #f3e8ff;
  font-weight: 750;
}

.copyright {
  padding: 20px;
  color: #6b7280;
  text-align: center;
}

.is-filter-hidden {
  display: none !important;
}

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

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

  .two-column-section,
  .detail-content-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0 4px;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.58);
  }

  .page-shell {
    padding-top: 116px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 58px;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

  .home-search-panel,
  .footer-inner,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .large-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .large-search button {
    min-height: 46px;
  }

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

@media (max-width: 640px) {
  .inner-page,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-panel,
  .content-section,
  .page-hero {
    margin-top: 24px;
    border-radius: 24px;
    padding: 22px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .related-grid,
  .listing-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 15px;
  }

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

  .movie-player {
    min-height: 260px;
  }

  .detail-copy,
  .story-panel,
  .detail-side {
    border-radius: 24px;
    padding: 22px;
  }
}
