:root {
  --dark-950: #060913;
  --dark-900: #0b101b;
  --dark-850: #101827;
  --dark-800: #121a2a;
  --dark-700: #1d293b;
  --dark-600: #29384d;
  --primary-600: #0056e0;
  --primary-500: #1a75ff;
  --accent-500: #ffc61a;
  --accent-400: #ffd866;
  --text: #ffffff;
  --muted: #aab4c3;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(26, 117, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 4%, rgba(255, 198, 26, 0.15), transparent 24rem),
    linear-gradient(180deg, var(--dark-900), var(--dark-800) 45%, var(--dark-950));
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 19, 0.88);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 22px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 12px 30px rgba(26, 117, 255, 0.3);
  font-size: 14px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: #d1d7e3;
  font-weight: 650;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-400);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: var(--dark-700);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 76vh;
  margin-bottom: 42px;
  background: var(--dark-900);
  overflow: hidden;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.78);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 19, 0.95) 0%, rgba(6, 9, 19, 0.72) 42%, rgba(6, 9, 19, 0.18) 100%),
    linear-gradient(180deg, rgba(6, 9, 19, 0.26), var(--dark-900));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 98px;
  padding-bottom: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 380px);
  align-items: end;
  gap: 54px;
}

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

.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.filter-chip {
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.72);
  color: #d7dfec;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
}

.hero-tags span:first-child,
.filter-chip.active {
  border-color: rgba(255, 198, 26, 0.72);
  background: rgba(255, 198, 26, 0.16);
  color: var(--accent-400);
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.hero p,
.page-hero p,
.section-head p,
.movie-card p,
.detail-one-line,
.detail-block p,
.category-card-large p,
.rank-card p {
  color: var(--muted);
}

.hero p {
  max-width: 680px;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  box-shadow: 0 14px 34px rgba(26, 117, 255, 0.34);
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(18, 26, 42, 0.65);
  color: #f5f7fb;
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-8deg) rotateX(2deg);
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.hero-nav.prev {
  left: 24px;
}

.hero-nav.next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 30px;
  background: var(--accent-500);
}

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: min(880px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 5;
}

.hero-category-strip a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9e1ee;
  background: rgba(18, 26, 42, 0.72);
  padding: 8px 14px;
  font-size: 13px;
}

.section,
.search-panel,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 34px 0 58px;
}

.search-panel {
  margin-top: 24px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.72);
  border-radius: 28px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow);
}

.search-panel.compact-panel {
  display: block;
}

.movie-search {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  outline: none;
  color: #fff;
  background: rgba(6, 9, 19, 0.55);
  padding: 0 18px;
}

.movie-search:focus {
  border-color: rgba(255, 198, 26, 0.78);
  box-shadow: 0 0 0 4px rgba(255, 198, 26, 0.1);
}

.filter-row {
  margin-top: 16px;
}

.filter-chip {
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-400);
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

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

.section-head h2,
.search-panel h2,
.page-hero h1,
.detail-info h1,
.detail-block h2,
.side-panel h2,
.category-card-large h2,
.rank-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-head h2,
.search-panel h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.section-head p,
.search-panel p {
  margin: 8px 0 0;
}

.section-more,
.text-link {
  color: var(--accent-400);
  font-weight: 800;
}

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

.movie-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(29, 41, 59, 0.78), rgba(18, 26, 42, 0.72));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 198, 26, 0.5);
}

.movie-card.is-hidden,
.rank-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(6, 9, 19, 0.86));
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 198, 26, 0.92);
  color: #0b101b;
  font-size: 14px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
}

.card-meta span {
  padding: 4px 9px;
}

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

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 9px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  border-radius: 24px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  background: var(--dark-800);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(6, 9, 19, 0.9));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.7);
  border-radius: 18px;
  padding: 10px;
}

.rank-num {
  color: var(--accent-400);
  font-size: 22px;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-heat {
  color: var(--accent-400);
  font-weight: 900;
}

.page-main {
  padding-top: 98px;
}

.page-hero {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(26, 117, 255, 0.18), rgba(255, 198, 26, 0.08)),
    rgba(18, 26, 42, 0.78);
  box-shadow: var(--shadow);
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 34px;
  align-items: center;
  overflow: hidden;
}

.page-hero.slim {
  display: block;
  min-height: auto;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.page-hero img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.category-list-large {
  display: grid;
  gap: 18px;
  padding: 34px 0 58px;
}

.category-card-large {
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.74);
  border-radius: 28px;
  padding: 22px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.rank-page-list {
  display: grid;
  gap: 16px;
  padding-bottom: 58px;
}

.rank-card {
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.72);
  border-radius: 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.rank-card-poster {
  position: relative;
}

.rank-card-poster span {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-500);
  color: var(--dark-950);
  font-weight: 950;
  z-index: 1;
}

.rank-card-poster img {
  width: 120px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.detail-main {
  padding-top: 92px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  padding: 18px 0;
  font-size: 14px;
}

.breadcrumb a {
  color: #e6ebf3;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  min-height: 420px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.player-shell video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  z-index: 1;
  background: #000;
}

.player-cover {
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  color: #fff;
  background: #000;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.7;
  filter: brightness(0.72);
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-ring {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: auto;
  top: calc(50% - 46px);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-size: 28px;
}

.detail-info {
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.72);
  border-radius: 28px;
  padding: 30px;
}

.detail-info h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  margin: 8px 0 14px;
}

.detail-one-line {
  font-size: 17px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 26px;
}

.detail-block,
.side-panel {
  border: 1px solid var(--line);
  background: rgba(18, 26, 42, 0.72);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
}

.detail-block p {
  margin-bottom: 0;
  font-size: 16px;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.side-panel a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.side-panel a:last-child {
  border-bottom: 0;
}

.side-panel span,
.side-panel em {
  display: block;
}

.side-panel em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.related-section {
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  background: rgba(6, 9, 19, 0.72);
}

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

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

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

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

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

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

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(6, 9, 19, 0.96);
  }

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

  .nav-link {
    padding: 12px 10px;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 100px;
    padding-bottom: 132px;
  }

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

  .hero-nav {
    display: none;
  }

  .search-panel,
  .category-card-large,
  .rank-card {
    grid-template-columns: 1fr;
  }

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

  .category-cover-stack {
    grid-template-columns: repeat(4, 1fr);
  }

  .player-shell {
    min-height: 260px;
  }

  .detail-info,
  .page-hero {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-heat {
    display: none;
  }

  .hero-category-strip {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}
