:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(34, 211, 238, 0.18);
  --line-strong: rgba(34, 211, 238, 0.36);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 28px 80px rgba(8, 145, 178, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.18), transparent 32rem),
    var(--bg);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.36);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  color: rgba(34, 211, 238, 0.72);
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-links a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan);
}

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

.nav-search input,
.inline-filter input,
.hero-search input {
  width: 220px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.8);
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.inline-filter input:focus,
.hero-search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.nav-search button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  padding: 11px 18px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  color: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 8px 10px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(34, 211, 238, 0.9) 2px, rgba(34, 211, 238, 0.9) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(34, 211, 238, 0.9) 2px, rgba(34, 211, 238, 0.9) 4px);
  background-size: 54px 54px;
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.32;
}

.hero-glow.one {
  top: 8%;
  left: 8%;
  background: var(--cyan);
}

.hero-glow.two {
  right: 3%;
  bottom: 10%;
  background: var(--blue);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 48px;
  align-items: center;
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(34, 211, 238, 0.82);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-main-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-main-copy p,
.page-hero p,
.detail-copy p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 17px;
}

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

.btn,
.primary-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary,
.primary-link {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.18);
}

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

.btn:hover,
.primary-link:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  max-width: 520px;
}

.hero-search input {
  flex: 1;
  width: auto;
  border-radius: 18px;
}

.hero-search button {
  border-radius: 18px;
}

.hero-carousel {
  position: relative;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.2)),
              linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent 65%);
}

.hero-slide-copy {
  position: absolute;
  z-index: 3;
  left: 32px;
  right: 32px;
  bottom: 32px;
}

.hero-slide-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.08;
}

.hero-slide-copy p {
  max-width: 620px;
  color: #dbeafe;
  line-height: 1.7;
}

.chip-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row span,
.detail-meta span,
.card-tags span,
.tag-cloud span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 145, 178, 0.16);
  padding: 6px 10px;
  font-size: 12px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan);
}

.page-stack,
.inner-page {
  padding-top: 56px;
}

.content-section {
  margin-bottom: 72px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title span {
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-soft);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.13);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.large .card-cover {
  aspect-ratio: 21 / 9;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent 62%);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-genre,
.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border-radius: 10px;
  color: white;
  background: rgba(251, 146, 60, 0.92);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  top: 12px;
  right: 12px;
  bottom: auto;
  background: rgba(34, 211, 238, 0.92);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 12px;
}

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 12px;
}

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

.category-card,
.overview-card,
.text-panel,
.rank-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 52px rgba(2, 6, 23, 0.24);
}

.category-card {
  min-height: 160px;
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover,
.overview-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-card span,
.overview-card h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.overview-card p,
.text-panel p {
  color: #cbd5e1;
  line-height: 1.8;
}

.rank-panel {
  padding: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #cbd5e1;
}

.rank-row:hover {
  color: white;
  background: rgba(34, 211, 238, 0.1);
}

.rank-row span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-row em {
  color: #facc15;
  font-style: normal;
  font-weight: 800;
}

.page-hero.compact {
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent),
    rgba(15, 23, 42, 0.62);
  padding: clamp(28px, 6vw, 58px);
  box-shadow: var(--shadow);
}

.page-hero.compact h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.inline-filter {
  margin-top: 24px;
}

.inline-filter input {
  width: min(520px, 100%);
  border-radius: 16px;
}

.overview-card {
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.overview-links {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.overview-links a {
  color: #bae6fd;
  font-size: 14px;
}

.text-link {
  color: white;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid var(--line);
  padding: 10px 14px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  filter: blur(6px);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg), rgba(2, 6, 23, 0.84)), linear-gradient(to top, var(--bg), transparent);
}

.detail-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.detail-poster {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.detail-copy h1 {
  color: white;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  font-size: clamp(32px, 5vw, 58px);
}

.detail-meta {
  margin-top: 18px;
}

.watch-section,
.detail-content {
  padding-top: 56px;
}

.player-module {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-module video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.6));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 48px rgba(34, 211, 238, 0.38);
  font-size: 28px;
}

.play-overlay strong {
  font-size: 18px;
}

.player-module.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.text-panel h2:first-child {
  margin-top: 0;
}

.tag-cloud,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

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

.footer-grid p,
.footer-links a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  color: #64748b;
  text-align: center;
  padding: 18px;
  font-size: 13px;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  padding: 22px;
  text-align: center;
}

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

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

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

@media (max-width: 820px) {
  .nav-shell {
    min-height: 66px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    padding: 18px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 46px;
  }

  .hero-carousel {
    min-height: 420px;
  }

  .movie-grid.two-cols,
  .movie-grid.three-cols,
  .movie-grid.four-cols,
  .category-grid,
  .overview-grid,
  .footer-grid,
  .detail-head {
    grid-template-columns: 1fr;
  }

  .detail-head {
    padding: 42px 0;
  }

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

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

  .brand-text em {
    display: none;
  }

  .hero-main-copy h1 {
    font-size: 42px;
  }

  .hero-search,
  .hero-actions {
    flex-direction: column;
  }

  .hero-search button,
  .btn {
    width: 100%;
  }

  .hero-carousel {
    min-height: 430px;
    border-radius: 24px;
  }

  .hero-slide-copy {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

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

  .section-title::after {
    width: 100%;
    flex: none;
  }

  .card-body p {
    min-height: auto;
  }

  .player-module {
    border-radius: 20px;
  }
}
