:root {
  --bg: #090a14;
  --panel: rgba(18, 21, 38, 0.86);
  --panel-strong: #15182a;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #a7b0c2;
  --soft: #d9e1f2;
  --brand: #ff3d8b;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --gold: #f8c14a;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 6%, rgba(124, 58, 237, 0.35), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(255, 61, 139, 0.30), transparent 30rem),
    linear-gradient(180deg, #090a14 0%, #111427 48%, #080914 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(8, 10, 22, 0.74);
  border-bottom: 1px solid var(--line);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 36px rgba(255, 61, 139, 0.36);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.nav-links a,
.header-cta,
.btn,
.hero-dot,
.play-btn,
.search-button {
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.nav-links a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.header-cta {
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.22);
  white-space: nowrap;
}

.header-cta:hover,
.btn:hover,
.play-btn:hover,
.search-button:hover {
  transform: translateY(-2px);
}

.main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 61, 139, 0.16), rgba(124, 58, 237, 0.13), rgba(6, 182, 212, 0.10));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 73% 35%, rgba(255, 255, 255, 0.15), transparent 25rem);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: center;
  gap: 38px;
  padding: 58px;
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe3f0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.85;
  max-width: 720px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 40px rgba(255, 61, 139, 0.25);
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster::after,
.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 6, 14, 0.62), transparent 55%);
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
}

.hero-dot.is-active {
  width: 54px;
  background: #fff;
}

.search-panel {
  margin-top: -38px;
  position: relative;
  z-index: 8;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(12, 14, 27, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px 130px;
  gap: 12px;
}

.search-row input,
.search-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
  outline: none;
}

.search-row select option {
  color: #111827;
}

.search-button {
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.section {
  margin-top: 52px;
}

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

.section h2,
.page-head h1,
.detail-title {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section p,
.page-head p,
.category-intro,
.detail-lead,
.prose p {
  color: var(--muted);
  line-height: 1.85;
}

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

.category-tile {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  bottom: -36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 61, 139, 0.38), rgba(124, 58, 237, 0.18));
}

.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p,
.category-tile span {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.20);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.08);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}

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

.poster-mask {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #2b1600;
  font-weight: 900;
  background: linear-gradient(135deg, #fff2a6, var(--gold));
}

.movie-info {
  padding: 15px;
}

.movie-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.movie-info h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info p {
  min-height: 52px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  color: #f7d7e6;
  font-size: 12px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-weight: 900;
  color: #261100;
  background: linear-gradient(135deg, #fff2a6, var(--gold));
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

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

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.rank-hot {
  color: #ffe8ad;
  white-space: nowrap;
}

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

.player-card,
.detail-side,
.prose,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #050612;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(5, 6, 18, 0.72), rgba(5, 6, 18, 0.26));
}

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

.play-btn {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 60px rgba(124, 58, 237, 0.40);
  font-size: 28px;
}

.detail-copy {
  padding: 24px;
}

.detail-title {
  margin-bottom: 12px;
}

.detail-side {
  overflow: hidden;
}

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

.side-copy {
  padding: 20px;
}

.prose {
  margin-top: 22px;
  padding: 24px;
}

.prose h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.related-panel {
  margin-top: 26px;
  padding: 24px;
}

.no-results {
  display: none;
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 10, 22, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
}

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 24px 76px;
  }

  .hero-poster {
    width: min(300px, 70vw);
    justify-self: center;
  }

  .hero-controls {
    left: 24px;
  }

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

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

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

  .rank-hot {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .main {
    width: min(100% - 22px, 1180px);
    padding-top: 20px;
  }

  .logo {
    font-size: 18px;
  }

  .hero {
    border-radius: 24px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-head,
  .footer-inner {
    display: block;
  }

  .detail-side {
    display: block;
  }
}
