:root {
  --bg: #060712;
  --panel: rgba(19, 24, 48, 0.78);
  --panel-strong: rgba(25, 31, 60, 0.95);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f8ff;
  --muted: #a9b0c7;
  --soft: #d8dcff;
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-3: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(139, 92, 246, 0.28), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.20), transparent 30%),
    linear-gradient(180deg, #090b1b 0%, #060712 42%, #080a14 100%);
}

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.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 80%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 18, 0.78);
  backdrop-filter: blur(22px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.36);
}

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

.main-nav a,
.nav-more > button,
.menu-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.main-nav a,
.nav-more > button {
  padding: 10px 15px;
}

.main-nav a:hover,
.main-nav a.active,
.nav-more:hover > button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-more {
  position: relative;
}

.nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  display: none;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 8px;
  min-width: 290px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 16, 34, 0.96);
  box-shadow: var(--shadow);
}

.nav-more:hover .nav-panel {
  display: grid;
}

.menu-toggle {
  display: none;
  padding: 10px 13px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.page-wrap {
  width: min(1220px, calc(100% - 34px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  display: grid;
  align-items: center;
  margin: 28px auto 42px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.30), rgba(6, 182, 212, 0.15));
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: clamp(22px, 5vw, 72px);
  min-height: 660px;
  padding: clamp(28px, 6vw, 72px);
}

.hero-slide.active {
  display: grid;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.75;
}

.hero::before {
  width: 360px;
  height: 360px;
  left: -110px;
  bottom: -120px;
  background: rgba(139, 92, 246, 0.34);
}

.hero::after {
  width: 320px;
  height: 320px;
  right: -90px;
  top: -110px;
  background: rgba(6, 182, 212, 0.26);
}

.hero-copy,
.hero-media {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 13px;
  margin: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e9e9ff;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  line-height: 1.03;
  font-size: clamp(38px, 7vw, 82px);
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  color: var(--soft);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.9;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.23);
}

.hero-media {
  transform: rotate(2deg);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    linear-gradient(160deg, rgba(139,92,246,0.45), rgba(6,182,212,0.22));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

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

.image-miss {
  opacity: 0;
}

.poster-glow {
  position: absolute;
  inset: auto 20px 20px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(6, 7, 18, 0.72);
  backdrop-filter: blur(18px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 6vw, 72px);
  bottom: 28px;
  display: flex;
  gap: 9px;
}

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

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

.section {
  margin: 46px 0;
}

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

.section-title,
.page-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.9;
}

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

.category-card {
  min-height: 130px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card span,
.meta-line,
.movie-desc,
.rank-meta,
.detail-meta,
.detail-text,
.site-footer p {
  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: 24px;
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(139,92,246,0.36), rgba(6,182,212,0.16)),
    #11162a;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.36;
}

.meta-line,
.movie-desc {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
}

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

.tag-row span,
.detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbe5ff;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 22px;
}

.rank-list,
.search-box,
.detail-panel,
.player-panel,
.catalog-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.rank-list {
  overflow: hidden;
}

.rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:last-child {
  border-bottom: 0;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  font-weight: 900;
}

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

.search-box {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin-bottom: 22px;
}

.search-box input,
.search-box select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.search-box option {
  color: #111827;
}

.catalog-list {
  overflow: hidden;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 110px 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.catalog-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.catalog-row:last-child {
  border-bottom: 0;
}

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

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(6, 182, 212, 0.18));
  box-shadow: var(--shadow);
}

.detail-panel {
  padding: clamp(22px, 4vw, 42px);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-meta {
  margin: 0 0 18px;
  font-size: 16px;
}

.detail-text {
  font-size: 17px;
  line-height: 2;
}

.player-panel {
  overflow: hidden;
  margin: 36px 0;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.52));
  pointer-events: none;
}

.play-layer button {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.30);
  font-size: 30px;
  cursor: pointer;
}

.player-panel.playing .play-layer {
  display: none;
}

.player-caption {
  padding: 18px 22px;
  color: var(--soft);
}

.text-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 34px 0;
}

.text-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-card p {
  color: var(--soft);
  line-height: 2;
}

.site-footer {
  width: min(1220px, calc(100% - 34px));
  margin: 60px auto 0;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--soft);
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1020px) {
  .hero-slide,
  .detail-hero,
  .rank-layout,
  .text-section {
    grid-template-columns: 1fr;
  }

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

  .hero-media {
    max-width: 420px;
    transform: none;
  }
}

@media (max-width: 740px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(9, 11, 27, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-panel {
    position: static;
    display: grid;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 28px 20px 74px;
  }

  .hero-dots {
    left: 22px;
  }

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

  .section-head,
  .page-hero,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-hero {
    gap: 18px;
  }

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

@media (max-width: 480px) {
  .site-header {
    padding: 13px 14px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

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

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

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