:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.22);
  --cyan: #22d3ee;
  --blue: #2563eb;
  --amber: #fbbf24;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
}

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: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.24);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hero-carousel {
  position: relative;
  min-height: clamp(620px, 78vh, 840px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.42)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.1);
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 40%, rgba(34, 211, 238, 0.22), transparent 20rem),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(620px, 78vh, 840px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 56px;
  padding: 80px 0 96px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  color: #dffafe;
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(226, 232, 240, 0.35);
  background: rgba(15, 23, 42, 0.45);
}

.ghost-btn:hover,
.text-btn:hover {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.24);
  transform: perspective(1100px) rotateY(-7deg) rotateX(2deg);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(226, 232, 240, 0.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 36px;
  line-height: 0;
}

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

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

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

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

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

.section-block {
  margin-top: 68px;
}

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 46px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-band.thin {
  margin-top: 28px;
}

.search-band h2,
.section-heading h2,
.panel-title span,
.text-panel h2,
.info-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-search,
.site-filter {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
}

.site-search {
  width: min(340px, 70vw);
}

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

.section-heading a,
.panel-title a {
  color: var(--cyan);
  font-weight: 700;
}

.featured-grid,
.movie-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 12px 38px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 20px 58px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
}

.poster-link img,
.category-tile img,
.category-cover img,
.detail-poster img,
.poster-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.55s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.72));
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  border: 1px solid rgba(226, 232, 240, 0.22);
  backdrop-filter: blur(8px);
  font-weight: 800;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

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

.card-body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.movie-card.featured .card-body h3 {
  font-size: 24px;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.54;
  filter: saturate(1.1);
  transition: transform 0.55s ease;
}

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

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

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

.category-tile em {
  margin-top: 8px;
  color: var(--soft);
  font-style: normal;
}

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

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

.rank-panel,
.info-card,
.text-panel,
.player-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 20px;
}

.sticky-panel {
  position: sticky;
  top: 94px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank-item:first-of-type {
  border-top: 0;
}

.rank-num {
  color: var(--amber);
  font-weight: 900;
}

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

.rank-text strong,
.rank-text em {
  display: block;
}

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    radial-gradient(circle at 16% 12%, rgba(34, 211, 238, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
  padding: clamp(34px, 7vw, 72px);
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
}

.poster-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.poster-stack a {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4.2;
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.poster-stack a:nth-child(2) {
  transform: translateY(-22px);
}

.category-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-cover {
  overflow: hidden;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
}

.category-overview-card p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.mini-links a {
  color: var(--soft);
}

.ranking-featured .movie-card.wide {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.ranking-featured .poster-link {
  aspect-ratio: 3 / 4;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 48px minmax(160px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.64);
}

.detail-main {
  padding-bottom: 40px;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.detail-backdrop {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.5)),
    var(--detail-image) center / cover no-repeat;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: end;
  gap: 42px;
  min-height: 520px;
  padding: 80px 0 54px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4.25;
  border-radius: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.24);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--soft);
  margin-bottom: 16px;
}

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

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

.detail-content {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  padding: 0;
}

.player-shell {
  position: relative;
  min-height: 420px;
  background: #000;
}

.video-player {
  width: 100%;
  height: min(62vw, 560px);
  min-height: 420px;
  display: block;
  background: #000;
}

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.6));
}

.play-button.hidden {
  display: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.35);
  font-size: 34px;
}

.text-panel,
.info-card {
  padding: 24px;
}

.text-panel p {
  color: var(--soft);
  line-height: 1.95;
  font-size: 17px;
}

.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.detail-sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.info-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.info-card li {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-card li span {
  color: var(--muted);
}

.info-card li strong {
  text-align: right;
}

.site-footer {
  margin-top: 84px;
  background: rgba(2, 6, 23, 0.92);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 30px;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 18px 0 30px;
}

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

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

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

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

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

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

  .rank-panel,
  .sticky-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .container,
  .header-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .hero-content {
    gap: 28px;
    padding-top: 50px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band,
  .section-heading,
  .rank-item,
  .ranking-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-bar,
  .site-search,
  .site-filter {
    width: 100%;
  }

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

  .category-overview-card,
  .ranking-featured .movie-card.wide {
    grid-template-columns: 1fr;
  }

  .poster-stack {
    display: none;
  }

  .detail-hero-inner {
    padding-top: 44px;
  }

  .player-shell,
  .video-player {
    min-height: 280px;
  }

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

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

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }
}
