:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --rose: #fb7185;
  --amber: #fbbf24;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --radius-sm: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 80%);
  z-index: -1;
}

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

img {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(15, 23, 42, 0.92));
}

button,
input,
select {
  font: inherit;
}

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

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

.site-logo,
.footer-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: grid;
  place-items: center;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 42%, #0ea5e9);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

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

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

.nav-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: #e2e8f0;
  border-radius: 999px;
}

main {
  overflow: hidden;
}

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

.hero-slide {
  min-height: 620px;
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 42px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 64px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.65s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.35)), var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
  transform: scale(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 7% -18% 20%;
  height: 260px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
  filter: blur(30px);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-heading span,
.sub-hero span {
  display: inline-flex;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 720px;
  color: var(--muted-strong);
  font-size: 19px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-row span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.15);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.sub-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 45%, #0ea5e9);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.25);
}

.primary-button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-button,
.sub-hero-actions a {
  color: #e0f2fe;
  border: 1px solid rgba(103, 232, 249, 0.2);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.sub-hero-actions a:hover {
  transform: translateY(-2px);
}

.hero-poster {
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

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

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

.hero-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

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

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

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px 0;
}

.section-heading {
  margin-bottom: 28px;
}

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

.section-heading h2,
.sub-hero h1,
.detail-content h1,
.detail-content h2,
.side-card h2 {
  margin: 8px 0 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.sub-hero p,
.detail-content p,
.side-card p,
.category-tile p,
.movie-card p,
.top-rank-card p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading.with-link a {
  color: var(--cyan);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 55px rgba(6, 182, 212, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  color: #001018;
  background: var(--cyan);
  padding: 7px 11px;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  padding: 8px 10px;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-top: 0;
  margin-bottom: 12px;
}

.card-meta span {
  color: #bae6fd;
  padding: 4px 8px;
  font-size: 11px;
}

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

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

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 50px;
  margin: 10px 0 12px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  font-size: 11px;
  padding: 4px 8px;
}

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

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

.compact-card p {
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #0f172a;
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.5s ease;
}

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

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 24px;
}

.category-tile p {
  margin: 8px 0 0;
  font-size: 14px;
}

.sub-hero {
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 70px 24px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 34px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72)),
    radial-gradient(circle at 82% 10%, rgba(34, 211, 238, 0.3), transparent 34rem);
  box-shadow: var(--shadow);
}

.sub-hero h1 {
  max-width: 880px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
}

.sub-hero p {
  max-width: 760px;
  font-size: 18px;
}

.preview-list {
  display: grid;
  gap: 48px;
}

.category-preview {
  border-bottom: 1px solid var(--border);
  padding-bottom: 48px;
}

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

.top-rank-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--border);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.top-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(2, 6, 23, 0.96));
}

.top-rank-card span,
.top-rank-card strong,
.top-rank-card p {
  position: relative;
  z-index: 2;
}

.top-rank-card span {
  width: fit-content;
  color: #020617;
  background: var(--amber);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.top-rank-card strong {
  margin-top: 12px;
  font-size: 28px;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #fff;
  background: #020617;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 35%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
}

.player-cover strong,
.play-icon {
  position: relative;
  z-index: 2;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.28);
}

.player-cover strong {
  margin-top: 106px;
  font-size: 22px;
}

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

.detail-content,
.side-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.detail-content h1 {
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.12;
}

.detail-content h2,
.side-card h2 {
  margin-top: 28px;
  font-size: 24px;
}

.lead-text {
  color: #e0f2fe !important;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-tags a {
  color: #cffafe;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.poster-card img {
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.poster-card strong {
  display: block;
  margin-top: 14px;
  font-size: 22px;
}

.side-related {
  display: grid;
  gap: 14px;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 18px;
}

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

.side-related .card-body {
  padding: 12px;
}

.side-related .card-meta,
.side-related .tag-row,
.side-related .movie-card p {
  display: none;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
}

.empty-state.is-visible {
  display: block;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 24px;
}

.footer-logo {
  font-size: 22px;
}

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

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: var(--muted);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .detail-sidebar {
    position: static;
  }
}

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

  .site-nav {
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-slide {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 32px;
  }

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

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

  .movie-grid,
  .home-grid,
  .category-movie-grid,
  .compact-grid,
  .ranking-grid,
  .category-grid,
  .top-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .header-inner,
  .hero-slider,
  .section-block,
  .detail-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-logo span:last-child {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-slide,
  .sub-hero,
  .detail-content,
  .side-card {
    border-radius: 22px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-copy p,
  .sub-hero p {
    font-size: 16px;
  }

  .movie-grid,
  .home-grid,
  .category-movie-grid,
  .compact-grid,
  .ranking-grid,
  .category-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

  .detail-title-row,
  .section-heading.with-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .side-related .movie-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
