:root {
  color-scheme: dark;
  --dark: #0a0e1a;
  --dark-soft: #111827;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(12, 74, 110, 0.48);
  --line-bright: rgba(56, 189, 248, 0.42);
  --primary: #0ea5e9;
  --primary-light: #38bdf8;
  --primary-dark: #0284c7;
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --glow: 0 0 32px rgba(14, 165, 233, 0.34);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 14%, rgba(37, 99, 235, 0.16), transparent 30rem),
    var(--dark);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(12, 74, 110, 0.38);
  background: rgba(10, 14, 26, 0.76);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  box-shadow: var(--glow);
}

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

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

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(14, 165, 233, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 99px;
}

.hero-carousel {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #050812;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.96), rgba(10, 14, 26, 0.78) 42%, rgba(10, 14, 26, 0.28)),
    linear-gradient(0deg, var(--dark) 0%, rgba(10, 14, 26, 0.36) 42%, rgba(10, 14, 26, 0.54) 100%);
}

.hero-content {
  position: relative;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 56px;
  padding-top: 96px;
  padding-bottom: 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-copy h1,
.page-hero h1,
.detail-heading h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

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

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

.hero-tags {
  margin-top: 24px;
}

.tag,
.detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.14);
  color: #e0f2fe;
  font-size: 12px;
}

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

.primary-button,
.secondary-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  box-shadow: var(--glow);
}

.secondary-button,
.ghost-link {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-link:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  box-shadow: var(--glow);
}

.primary-button.full,
.secondary-button.full {
  width: 100%;
  margin-top: 12px;
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: var(--shadow), var(--glow);
  transform: perspective(900px) rotateY(-7deg) rotateX(2deg);
}

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

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 112px;
  z-index: 5;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.56);
  backdrop-filter: blur(16px);
}

.hero-controls button,
.hero-dot {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.hero-controls > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.18);
  font-size: 24px;
}

.hero-dots {
  display: inline-flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.5);
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--primary-light);
}

.hero-quick-links {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: auto;
  padding: 4px 0;
}

.hero-quick-links a,
.category-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  padding: 10px 14px;
  backdrop-filter: blur(12px);
}

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

.content-section {
  padding: 72px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--primary-light);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(12, 74, 110, 0.36);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.34));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.56);
  box-shadow: var(--shadow), var(--glow);
}

.movie-card-featured {
  grid-column: span 2;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.88);
}

.movie-card:not(.movie-card-featured) .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.88), transparent);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  font-weight: 900;
  box-shadow: var(--glow);
}

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

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card h3,
.ranking-info h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.movie-card p,
.ranking-info p,
.category-card p,
.site-footer p,
.detail-card p {
  color: var(--soft);
  line-height: 1.75;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 3.4em;
}

.tag-row {
  min-height: 28px;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.54);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: var(--glow);
}

.ranking-index {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.18);
  color: #e0f2fe;
  font-weight: 900;
}

.ranking-thumb {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(15, 23, 42, 0.88);
}

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

.ranking-info h3,
.ranking-info p {
  margin-top: 0;
}

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

.category-pill {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.category-pill strong {
  font-size: 20px;
}

.category-pill span {
  color: var(--muted);
  line-height: 1.55;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 64px;
  border-bottom: 1px solid rgba(12, 74, 110, 0.35);
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.22), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(10, 14, 26, 0.94));
}

.page-hero.small-hero,
.page-hero.category-hero {
  min-height: 360px;
  display: flex;
  align-items: end;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumbs a:hover {
  color: var(--primary-light);
}

.search-panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(850px, 100%);
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 24px;
  background: rgba(10, 14, 26, 0.64);
  backdrop-filter: blur(14px);
}

.search-icon {
  text-align: center;
  color: var(--primary-light);
  font-size: 22px;
}

.search-panel input {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search-panel input::placeholder {
  color: #64748b;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.54);
}

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.54);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: var(--glow);
}

.category-card-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 180px;
  background: rgba(15, 23, 42, 0.88);
}

.category-card-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.category-card h2 {
  margin: 0;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  padding-top: 118px;
  display: flex;
  align-items: end;
}

.detail-hero .container {
  position: relative;
  padding-bottom: 64px;
}

.detail-heading {
  max-width: 850px;
}

.detail-heading h1 {
  font-size: clamp(36px, 5.6vw, 72px);
}

.detail-content-section {
  padding-top: 42px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.62;
}

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

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  font-size: 32px;
  box-shadow: var(--glow);
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(12, 74, 110, 0.38);
  background: rgba(15, 23, 42, 0.58);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 24px;
  font-size: 16px;
}

.detail-card p:last-child {
  margin-bottom: 0;
}

.detail-side {
  position: sticky;
  top: 94px;
}

.detail-poster {
  width: 100%;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: var(--shadow);
}

.side-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0 0 18px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #fff;
}

.related-section {
  margin-top: 42px;
}

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

.compact-heading {
  margin-bottom: 20px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(12, 74, 110, 0.38);
  background: rgba(10, 14, 26, 0.82);
  padding: 46px 0 24px;
}

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

.footer-logo {
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--soft);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  margin-top: 28px;
  color: #64748b;
  font-size: 14px;
}

.is-hidden-by-search,
.is-hidden-by-filter {
  display: none !important;
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .side-card {
    margin-top: 0;
  }
}

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(10, 14, 26, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 16px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

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

  .hero-poster {
    display: none;
  }

  .hero-controls {
    bottom: 92px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-heading p {
    font-size: 16px;
  }

  .movie-grid,
  .related-grid,
  .category-card-grid,
  .category-strip,
  .ranking-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card-featured {
    grid-column: span 2;
  }

  .search-panel {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .filter-tabs {
    grid-column: 1 / -1;
  }

  .ranking-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .ranking-row .ghost-link {
    grid-column: 2 / -1;
    justify-self: start;
    min-height: 38px;
    padding: 8px 14px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 110px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-heading h1 {
    font-size: 40px;
  }

  .hero-quick-links {
    width: calc(100% - 24px);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section {
    padding: 52px 0;
  }

  .movie-grid,
  .related-grid,
  .category-card-grid,
  .category-strip,
  .ranking-list.compact {
    grid-template-columns: 1fr;
  }

  .movie-card-featured {
    grid-column: span 1;
  }

  .ranking-row {
    grid-template-columns: 40px 76px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-index {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

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

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

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