:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.header-shell {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.brand-copy small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-weight: 600;
}

.desktop-nav a {
  position: relative;
  transition: color 0.25s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  border-radius: 99px;
  background: var(--cyan);
  transition: right 0.25s ease;
}

.desktop-nav a:hover {
  color: #fff;
}

.desktop-nav a:hover::after {
  right: 0;
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 20px 20px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
}

.mobile-nav.is-open {
  display: block;
}

.hero-slider {
  padding: 34px 24px 18px;
}

.hero-shell {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.hero-slides {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 40px;
  align-items: center;
  padding: 72px;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.26;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.42)),
    radial-gradient(circle at 72% 30%, rgba(34, 211, 238, 0.22), transparent 28rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

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

.hero-content h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-intro {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.86;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
  background: #0f172a;
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 32px;
  border-radius: 999px;
  background: var(--cyan);
}

.hero-category-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px auto 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.hero-category-strip span {
  color: var(--muted);
  font-weight: 800;
}

.hero-category-strip a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  transition: background 0.25s ease, color 0.25s ease;
}

.hero-category-strip a:hover {
  background: rgba(34, 211, 238, 0.18);
  color: #fff;
}

.section-shell,
.page-hero,
.breadcrumb,
.detail-hero {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-shell {
  padding-top: 54px;
  padding-bottom: 18px;
}

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

.section-intro h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.section-intro p,
.page-hero p,
.category-overview-head p {
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card,
.category-overview-card,
.filter-panel,
.player-card,
.detail-content article,
.detail-content aside,
.rank-aside {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

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

.category-card:hover,
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

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

.filter-panel {
  margin: 24px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
}

.search-box input,
.filter-selects select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.44);
  color: #fff;
  outline: none;
}

.search-box input {
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 128px;
  padding: 0 12px;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.watch-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.watch-chip {
  left: 12px;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #022c22;
  background: linear-gradient(135deg, #a7f3d0, #22d3ee);
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p {
  min-height: 58px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.page-hero {
  padding-top: 76px;
  padding-bottom: 42px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero p {
  max-width: 760px;
}

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

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

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 28px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: rgba(34, 211, 238, 0.12);
  transform: translateX(3px);
}

.rank-row img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row strong {
  color: var(--cyan);
  font-size: 18px;
}

.rank-row h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 15px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.rank-aside {
  position: sticky;
  top: 100px;
  padding: 20px;
  max-height: calc(100vh - 122px);
  overflow: auto;
}

.rank-aside h2 {
  margin: 0 0 16px;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-hero {
  padding-top: 34px;
  padding-bottom: 38px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

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

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

.detail-one-line {
  margin: 22px 0;
  max-width: 820px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.85;
}

.player-section {
  padding-top: 10px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #020617;
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(2px) saturate(1.12);
  transform: scale(1.02);
}

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

.big-play {
  position: absolute;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 22px 70px rgba(34, 211, 238, 0.36);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.detail-content article,
.detail-content aside {
  padding: 24px;
}

.detail-content article:first-child {
  grid-column: 1 / 2;
}

.detail-content article h2,
.detail-content aside h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-content article p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-content aside {
  grid-row: span 2;
}

.detail-content dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-content dl div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.detail-content dt {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
}

.detail-content dd {
  margin: 5px 0 0;
  color: #e2e8f0;
}

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.96));
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
  gap: 48px;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.footer-links h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-links a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

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

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

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

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

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

  .rank-aside {
    position: static;
    max-height: none;
  }
}

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

  .menu-button {
    display: flex;
  }

  .hero-slides {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 26px 92px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .hero-controls {
    left: 22px;
    right: 22px;
  }

  .category-grid,
  .category-overview,
  .detail-content,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-shell {
    height: 66px;
    padding: 0 16px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-slider,
  .section-shell,
  .page-hero,
  .breadcrumb,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slides {
    min-height: 690px;
    border-radius: 26px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-intro,
  .detail-one-line {
    font-size: 16px;
  }

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

  .section-intro,
  .section-heading,
  .category-overview-head {
    align-items: start;
    flex-direction: column;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-slides {
    min-height: 760px;
  }
}
