:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-strong: rgba(31, 41, 55, 0.86);
  --line: rgba(34, 211, 238, 0.25);
  --muted-line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --pink: #f472b6;
  --pink-strong: #ec4899;
  --purple: #a78bfa;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(244, 114, 182, 0.14), transparent 30rem),
    linear-gradient(180deg, #030712 0%, #07111f 45%, #030712 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  height: 70px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--pink-strong), var(--purple));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.38);
}

.brand-text,
.footer-brand {
  font-size: 26px;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.25s ease, transform 0.25s ease;
}

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

.header-search,
.mobile-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.filter-bar input {
  width: 250px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  background: rgba(31, 41, 55, 0.62);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan-strong), var(--pink-strong));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.28);
}

.secondary-button {
  background: rgba(17, 24, 39, 0.74);
  border: 1px solid var(--line);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--cyan);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.98);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

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

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.82) 36%, rgba(3, 7, 18, 0.2) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.94) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  padding-top: 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(90deg, var(--cyan-strong), var(--pink-strong));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.22);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 650px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.8;
  margin: 0 0 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta,
.detail-meta,
.card-meta,
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.76);
  border: 1px solid var(--muted-line);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 26px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(6, 182, 212, 0.5);
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

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

.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.section {
  margin-top: 58px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.section-heading p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 780px;
}

.section-more {
  color: var(--cyan);
  font-weight: 850;
}

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

.movie-card,
.category-card,
.info-panel,
.player-panel,
.movie-row {
  background: var(--panel);
  border: 1px solid var(--muted-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.movie-row:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.poster-link,
.row-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(244, 114, 182, 0.12));
}

.poster-link {
  aspect-ratio: 2 / 3;
}

.poster-link img,
.row-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.25s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.8), transparent 48%);
  opacity: 0.88;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--pink-strong));
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge,
.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  background: rgba(6, 182, 212, 0.86);
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 16px;
}

.card-title,
.row-title {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title:hover,
.row-title:hover {
  color: var(--cyan);
}

.card-desc {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.65;
  min-height: 52px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  font-size: 13px;
}

.chip-row,
.tag-line,
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.tag-line span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 13px;
  font-weight: 750;
}

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

.category-card {
  padding: 22px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.16), transparent 11rem),
    var(--panel);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: var(--cyan);
  font-weight: 850;
  margin-top: 18px;
}

.rank-list,
.row-list {
  display: grid;
  gap: 16px;
}

.movie-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 12px;
}

.row-poster {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
}

.row-body {
  padding: 4px 0;
  min-width: 0;
}

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

.page-title {
  padding: 54px 0 26px;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid var(--muted-line);
  border-radius: var(--radius);
  background: var(--panel);
}

.filter-bar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.filter-bar input {
  width: min(100%, 440px);
}

.no-results {
  display: none;
  margin-top: 26px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--muted-line);
}

.no-results.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  padding-top: 34px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 28px;
  margin-top: 26px;
}

.player-panel {
  padding: 18px;
  border-color: rgba(34, 211, 238, 0.3);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.28));
  cursor: pointer;
  z-index: 3;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--pink-strong));
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.36);
  transform: translateZ(0);
}

.detail-title {
  margin-top: 28px;
}

.detail-meta {
  margin: 18px 0 22px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.info-panel {
  padding: 24px;
  margin-top: 22px;
}

.info-panel h2,
.sidebar h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.info-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.95;
  text-align: justify;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.92);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 720px;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--muted-line);
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
}

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

@media (max-width: 960px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

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

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

  .hero-arrow {
    display: none;
  }
}

@media (max-width: 700px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content,
  .content-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy {
    padding-top: 78px;
  }

  .hero-actions,
  .section-heading,
  .filter-bar,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading,
  .footer-inner {
    display: flex;
  }

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

  .movie-row {
    grid-template-columns: 92px 1fr;
  }

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    min-height: 48px;
    font-size: 14px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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