:root {
  color-scheme: dark;
  --bg: #080b16;
  --bg-2: #101427;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f7f8ff;
  --muted: #aeb7d7;
  --subtle: #7e88ad;
  --brand: #ff4fd8;
  --brand-2: #7c4dff;
  --brand-3: #27d6ff;
  --gold: #ffd166;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 79, 216, 0.24), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(39, 214, 255, 0.22), transparent 35rem),
    linear-gradient(180deg, #090b18 0%, #0d1022 48%, #070914 100%);
}

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

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

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

.header-inner {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
}

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

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

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 30vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  color: #fff;
  outline: none;
  background: transparent;
}

.header-search button,
.button,
.hero-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 34px rgba(124, 77, 255, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.header-search button {
  padding: 10px 18px;
}

.button,
.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
}

.button.secondary,
.hero-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  border: 1px solid var(--line);
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

main {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 79, 216, 0.32), rgba(124, 77, 255, 0.22) 42%, rgba(39, 214, 255, 0.18)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  gap: 42px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 22, 0.88) 0%, rgba(8, 11, 22, 0.62) 48%, rgba(8, 11, 22, 0.25) 100%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 30rem);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-bg.is-missing {
  opacity: 0;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 13px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.11);
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(135deg, #ffffff 10%, #ffd9f7 48%, #9fefff 95%);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d8def6;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  color: #e9edff;
  background: rgba(255, 255, 255, 0.09);
}

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

.hero-poster {
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  margin-left: auto;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.44);
}

.hero-poster.is-missing {
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(39, 214, 255, 0.34));
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 64px;
  bottom: 36px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: #fff;
}

.section {
  margin: 58px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.055));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.30);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.145), rgba(255, 255, 255, 0.075));
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.20), transparent 7rem),
    linear-gradient(135deg, rgba(255, 79, 216, 0.58), rgba(124, 77, 255, 0.46), rgba(39, 214, 255, 0.34));
}

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

.poster-img.is-missing {
  opacity: 0;
}

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

.poster-badge,
.poster-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
}

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

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

.movie-card h3 a:hover {
  color: #ffe4fb;
}

.movie-meta,
.movie-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-desc {
  min-height: 42px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #dfe5ff;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.09);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 185px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.20), transparent 9rem),
    linear-gradient(135deg, rgba(255, 79, 216, 0.20), rgba(39, 214, 255, 0.12));
}

.category-card h3 {
  margin: 0;
  font-size: 23px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-count {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #1b1024;
  font-weight: 900;
  background: linear-gradient(135deg, #fff2a6, #ff77dc);
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 26px 0 16px;
  color: var(--muted);
}

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

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

.detail-hero {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 79, 216, 0.24), transparent 26rem),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.detail-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-intro {
  color: #d8def6;
  font-size: 17px;
  line-height: 1.85;
}

.player-shell {
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: #02040a;
}

.player {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(255, 79, 216, 0.20), rgba(39, 214, 255, 0.10)),
    #050711;
}

.player video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-start {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 12px;
  min-width: 180px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.92), rgba(124, 77, 255, 0.90));
  box-shadow: 0 20px 54px rgba(124, 77, 255, 0.46);
}

.player-start.hidden {
  display: none;
}

.player-note {
  padding: 14px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.content-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
}

.content-card + .content-card {
  margin-top: 18px;
}

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

.content-card p {
  color: #dce2f8;
  line-height: 1.9;
}

.side-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.5), rgba(39, 214, 255, 0.28));
}

.side-poster img.is-missing {
  opacity: 0.08;
}

.side-poster-body {
  padding: 18px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
}

.info-list dt {
  color: var(--subtle);
}

.info-list dd {
  margin: 0;
  color: #fff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  min-width: 180px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.filter-bar select option {
  color: #0d1022;
}

.filter-button {
  min-height: 44px;
  padding: 0 18px;
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 22px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.footer-inner {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

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

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

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    position: fixed;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(8, 11, 22, 0.96);
  }

  .main-nav.open {
    display: flex;
  }

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

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    order: 4;
    margin-bottom: 12px;
  }

  .hero {
    min-height: 760px;
  }

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

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

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

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

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

  .rank-meta {
    grid-column: 2;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1380px);
  }

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

  .detail-hero,
  .content-card {
    padding: 18px;
    border-radius: 22px;
  }

  .filter-bar input,
  .filter-bar select {
    min-width: 100%;
  }
}
