:root {
  --bg: #090111;
  --bg-soft: #160423;
  --grape-950: #3b0764;
  --grape-900: #581c87;
  --grape-800: #6b21a8;
  --grape-700: #7e22ce;
  --grape-600: #9333ea;
  --grape-500: #a855f7;
  --grape-400: #c084fc;
  --grape-300: #d8b4fe;
  --gold-500: #f59e0b;
  --gold-400: #fbbf24;
  --gold-300: #fcd34d;
  --text: #ffffff;
  --muted: #d8b4fe;
  --muted-dark: #a78bfa;
  --line: rgba(216, 180, 254, 0.2);
  --shadow-purple: 0 0 28px rgba(168, 85, 247, 0.28);
  --shadow-gold: 0 0 20px rgba(251, 191, 36, 0.35);
  --silk: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.28), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.12), transparent 24rem),
    linear-gradient(180deg, #100018 0%, #07010c 54%, #000000 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: var(--silk);
  pointer-events: none;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(59, 7, 100, 0.96), rgba(88, 28, 135, 0.94), rgba(59, 7, 100, 0.96));
  border-bottom: 1px solid rgba(216, 180, 254, 0.18);
  box-shadow: 0 12px 30px rgba(10, 1, 18, 0.5);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--grape-400), var(--gold-400));
  color: #160423;
  font-weight: 900;
  box-shadow: var(--shadow-purple);
}

.logo-text strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--grape-300), var(--gold-300), var(--grape-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  display: block;
  margin-top: 2px;
  color: var(--grape-400);
  font-size: 0.75rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav a,
.mobile-panel a {
  padding: 9px 14px;
  border-radius: 14px;
  color: var(--grape-300);
  transition: 0.25s ease;
}

.primary-nav a:hover,
.primary-nav a.active,
.mobile-panel a:hover {
  color: var(--gold-300);
  background: rgba(126, 34, 206, 0.65);
  box-shadow: var(--shadow-gold);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
}

.header-search input,
.hero-search input,
.filter-bar input,
.filter-bar select,
.search-main input {
  width: 100%;
  border: 1px solid rgba(216, 180, 254, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(12, 2, 20, 0.72);
  color: #fff;
  padding: 10px 14px;
  transition: 0.2s ease;
}

.header-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-main input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.btn,
.header-search button,
.hero-search button,
.search-main button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  padding: 10px 16px;
  color: #2b1000;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: 0.25s ease;
}

.btn:hover,
.header-search button:hover,
.hero-search button:hover,
.search-main button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn.ghost {
  color: var(--grape-100, #f3e8ff);
  background: rgba(126, 34, 206, 0.42);
  border: 1px solid rgba(216, 180, 254, 0.25);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 14px;
  color: var(--grape-300);
  background: rgba(12, 2, 20, 0.68);
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.header-search-mobile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.header-search-mobile input {
  width: 100%;
  border: 1px solid rgba(216, 180, 254, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(12, 2, 20, 0.72);
  color: #fff;
  padding: 10px 14px;
}

.header-search-mobile button {
  border: 0;
  border-radius: 15px;
  padding: 10px 16px;
  color: #2b1000;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  border-bottom: 1px solid rgba(216, 180, 254, 0.15);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.12) contrast(1.05);
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 72% 28%, rgba(251, 191, 36, 0.22), transparent 18rem),
    linear-gradient(90deg, rgba(9, 1, 17, 0.96) 0%, rgba(26, 4, 44, 0.78) 42%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(0deg, rgba(9, 1, 17, 1) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 44px;
  min-height: 70vh;
  padding-block: 60px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  color: var(--gold-300);
  background: rgba(251, 191, 36, 0.1);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 {
  animation: float 4s ease-in-out infinite;
}

.hero p {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--grape-300);
  font-size: clamp(1rem, 2.1vw, 1.24rem);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}

.pill,
.tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--grape-200, #e9d5ff);
  background: rgba(126, 34, 206, 0.45);
  border: 1px solid rgba(216, 180, 254, 0.2);
  font-size: 0.84rem;
}

.pill.gold,
.meta-chip.gold {
  color: #1e0b02;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-color: transparent;
  font-weight: 800;
}

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

.hero-search {
  display: flex;
  gap: 10px;
  width: min(640px, 100%);
  margin-top: 28px;
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(59, 7, 100, 0.72), rgba(9, 1, 17, 0.82));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), var(--shadow-purple);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  opacity: 0.94;
}

.hero-poster-card .poster-info {
  position: absolute;
  inset-inline: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(216, 180, 254, 0.2);
  border-radius: 20px;
  background: rgba(9, 1, 17, 0.74);
  backdrop-filter: blur(12px);
}

.poster-info strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
}

.poster-info span {
  display: block;
  color: var(--grape-300);
  font-size: 0.9rem;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(216, 180, 254, 0.4);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--gold-400);
  box-shadow: var(--shadow-gold);
}

.section {
  padding: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--grape-300);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border: 1px solid rgba(216, 180, 254, 0.18);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.72), rgba(26, 4, 44, 0.72));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26);
  transition: 0.25s ease;
}

.category-tile::after {
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 96px;
  height: 96px;
  content: "";
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: var(--shadow-purple);
}

.category-tile strong {
  display: block;
  font-size: 1.16rem;
}

.category-tile span {
  display: block;
  margin-top: 7px;
  color: var(--grape-300);
  font-size: 0.92rem;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(59, 7, 100, 0.84), rgba(12, 2, 20, 0.92));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: var(--shadow-purple);
}

.movie-card a {
  display: grid;
  height: 100%;
}

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(9, 1, 17, 0.88);
}

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

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

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  border-radius: 999px;
  padding: 4px 8px;
  color: #1b0c00;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  font-size: 0.76rem;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.9em;
  margin: 0;
  color: var(--grape-300);
  font-size: 0.88rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: 0;
  gap: 6px;
}

.card-meta span {
  color: var(--grape-300);
  font-size: 0.78rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(216, 180, 254, 0.15);
  border-radius: 22px;
  padding: 12px;
  background: linear-gradient(90deg, rgba(59, 7, 100, 0.72), rgba(12, 2, 20, 0.86));
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateX(6px);
  border-color: rgba(251, 191, 36, 0.36);
}

.rank-no {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #1b0c00;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
}

.rank-cover img {
  width: 92px;
  height: 122px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0;
  font-size: 1.18rem;
}

.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  max-width: 740px;
  margin: 6px 0 0;
  color: var(--grape-300);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 68px 0 34px;
  background:
    radial-gradient(circle at 15% 20%, rgba(168, 85, 247, 0.22), transparent 20rem),
    linear-gradient(180deg, rgba(59, 7, 100, 0.46), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--grape-300);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--gold-300);
}

.filter-bar,
.search-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 0.25fr));
  gap: 12px;
  margin: 26px 0;
}

.search-main {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 36px;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(4px) saturate(1.15);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(9, 1, 17, 0.98), rgba(26, 4, 44, 0.82), rgba(9, 1, 17, 0.9));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(216, 180, 254, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow-purple);
}

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

.detail-title p {
  max-width: 820px;
  color: var(--grape-300);
  font-size: 1.08rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 26px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(216, 180, 254, 0.16);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(59, 7, 100, 0.76), rgba(10, 1, 18, 0.9));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.panel p {
  color: var(--grape-200, #e9d5ff);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: 0.25s ease;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button-core {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #1b0c00;
  box-shadow: var(--shadow-gold);
  font-size: 2rem;
  font-weight: 900;
  transform: translateZ(0);
}

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

.related-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: rgba(12, 2, 20, 0.55);
  border: 1px solid rgba(216, 180, 254, 0.13);
  transition: 0.2s ease;
}

.related-card:hover {
  border-color: rgba(251, 191, 36, 0.36);
  transform: translateY(-2px);
}

.related-card img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.related-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card span {
  display: block;
  color: var(--grape-300);
  font-size: 0.84rem;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(216, 180, 254, 0.14);
  background: linear-gradient(180deg, rgba(59, 7, 100, 0.54), rgba(0, 0, 0, 0.94));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 28px;
  padding: 40px 0;
}

.footer-grid p,
.footer-grid a {
  color: var(--grape-300);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.copyright {
  border-top: 1px solid rgba(216, 180, 254, 0.12);
  padding: 18px 0;
  color: var(--grape-400);
  font-size: 0.9rem;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(216, 180, 254, 0.28);
  border-radius: 22px;
  padding: 26px;
  color: var(--grape-300);
  text-align: center;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 980px) {
  .primary-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-inner {
    min-height: 66px;
  }

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

  .hero-content {
    padding-block: 42px 82px;
  }

  .hero-poster-card {
    max-width: 360px;
  }

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

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

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

@media (max-width: 680px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .logo-text span {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    min-height: 78vh;
    gap: 26px;
  }

  .hero-search,
  .hero-actions,
  .section-head,
  .search-main {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .card-body {
    padding: 11px;
  }

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

  .rank-item .btn {
    grid-column: 2 / -1;
    width: 100%;
  }

  .rank-no {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .rank-cover img {
    width: 72px;
    height: 96px;
  }
}
