:root {
  --twilight-950: #3b0764;
  --twilight-900: #581c87;
  --twilight-700: #7e22ce;
  --twilight-600: #9333ea;
  --twilight-500: #a855f7;
  --twilight-300: #d8b4fe;
  --dusk-600: #c026d3;
  --dusk-400: #e879f9;
  --sunset-400: #fb923c;
  --sunset-300: #fdba74;
  --white-10: rgba(255, 255, 255, 0.1);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-80: rgba(255, 255, 255, 0.8);
  --white-90: rgba(255, 255, 255, 0.9);
  --shadow-glow: 0 10px 40px -10px rgba(217, 70, 239, 0.5);
  --shadow-soft: 0 18px 60px rgba(20, 0, 40, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(192, 38, 211, 0.34), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(251, 146, 60, 0.16), transparent 28rem),
    linear-gradient(135deg, #3b0764 0%, #581c87 48%, #4a044e 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-effect {
  background: rgba(59, 7, 100, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
}

.logo-text,
.gradient-text {
  background: linear-gradient(90deg, var(--twilight-300), #f0abfc, var(--sunset-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--white-80);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--twilight-300);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-search,
.page-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
}

.top-search input,
.page-search input,
.filter-panel select {
  width: 240px;
  padding: 10px 14px;
  border: 1px solid var(--white-20);
  border-radius: 12px;
  color: #ffffff;
  background: var(--white-10);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.page-search input {
  width: min(420px, 100%);
}

.filter-panel select {
  width: 180px;
}

.top-search input:focus,
.page-search input:focus,
.filter-panel select:focus {
  border-color: var(--twilight-300);
  background: rgba(255, 255, 255, 0.14);
}

.top-search input::placeholder,
.page-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--white-10);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}

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

.page {
  min-height: 100vh;
}

.main-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.hero {
  position: relative;
  min-height: 78vh;
  margin-top: -72px;
  overflow: hidden;
}

.hero-track {
  position: relative;
  min-height: 78vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(59, 7, 100, 1) 0%, rgba(59, 7, 100, 0.82) 34%, rgba(59, 7, 100, 0.18) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), transparent 64%);
}

.veil-effect::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(139, 92, 246, 0.1) 48%, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 82px;
}

.hero-copy {
  max-width: 720px;
}

.hero-meta,
.movie-card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--white-80);
}

.hero-meta span,
.movie-card-meta span,
.detail-meta span,
.rank-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(216, 180, 254, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
}

.glow-text {
  text-shadow: 0 0 26px rgba(167, 139, 250, 0.55);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--white-90);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  color: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.55);
}

.btn-secondary {
  border: 1px solid var(--white-20);
  background: var(--white-10);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.45);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  opacity: 0.58;
}

.hero-dot.is-active {
  width: 48px;
  opacity: 1;
  background: linear-gradient(90deg, var(--twilight-300), var(--sunset-300));
}

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

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

.section-heading h2,
.page-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.16;
}

.section-heading p,
.page-heading p {
  max-width: 820px;
  color: var(--white-70);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--sunset-300);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.dusk-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 70, 239, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(112, 26, 117, 0.43), rgba(107, 33, 168, 0.4));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.dusk-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240, 171, 252, 0.42);
  box-shadow: var(--shadow-glow);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.24);
}

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

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

.poster::after,
.video-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 58%);
  opacity: 0.84;
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--sunset-300);
  font-size: 12px;
  font-weight: 800;
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

.movie-card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.movie-card-meta span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 3.9em;
  margin: 0 0 13px;
  color: var(--white-70);
  font-size: 13px;
  line-height: 1.55;
}

.movie-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

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

.category-card {
  padding: 24px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--white-70);
  line-height: 1.7;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.category-samples a {
  color: var(--twilight-300);
  font-size: 14px;
}

.filter-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 28px;
}

.no-results {
  display: none;
  padding: 24px;
  color: var(--white-70);
  text-align: center;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.rank-number {
  color: var(--sunset-300);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

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

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

.rank-main h2,
.rank-main h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.rank-main p {
  margin: 0;
  color: var(--white-70);
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  min-height: 54vh;
  margin-top: -72px;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

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

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(59, 7, 100, 1) 0%, rgba(59, 7, 100, 0.82) 40%, rgba(59, 7, 100, 0.2) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent 70%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 54vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.08;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.18);
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.22));
}

.big-play {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 0 34px rgba(168, 85, 247, 0.55);
  font-size: 34px;
}

.detail-panel {
  padding: 26px;
}

.detail-panel h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-panel p {
  color: var(--white-80);
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
}

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

.related-panel {
  margin-top: 28px;
  padding: 22px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.related-list img {
  width: 56px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

.related-list strong {
  display: block;
  margin-bottom: 4px;
}

.related-list span {
  color: var(--white-70);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(59, 7, 100, 0.55);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 10px;
  color: var(--white-70);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.5);
}

.fade-in {
  animation: fadeIn 0.55s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--twilight-950);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--twilight-700);
}

@media (max-width: 1120px) {
  .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;
  }

  .side-poster {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-track {
    min-height: 74vh;
  }

  .hero-content {
    min-height: 74vh;
    padding: 128px 0 86px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-item .btn-secondary {
    grid-column: 1 / -1;
  }

  .section-heading,
  .page-heading {
    display: block;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  .logo-text {
    font-size: 16px;
  }

  .main-wrap {
    width: min(100% - 24px, 1280px);
    padding-top: 40px;
  }

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

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

  .movie-card p {
    font-size: 12px;
  }

  .detail-hero-content {
    width: min(100% - 24px, 1280px);
  }

  .detail-panel,
  .related-panel {
    padding: 18px;
  }
}
