:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --yellow: #facc15;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(34, 211, 238, 0.16), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.14), transparent 34%),
    var(--page-bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #67e8f9 45%, #a5f3fc);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.9s ease;
  pointer-events: none;
  background-image:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.88) 30%, rgba(2, 6, 23, 0.42) 64%, rgba(2, 6, 23, 0.22) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 130px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 36px;
  align-items: end;
}

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

.hero-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
  margin: 0 0 16px;
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.eyebrow,
.poster-badge,
.poster-score {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(8, 145, 178, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #a5f3fc);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.search-panel label,
.filter-panel label {
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.search-line,
.filter-line {
  display: flex;
  gap: 10px;
}

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

.search-line button,
.filter-line button {
  min-width: 88px;
  color: #001018;
  border: 0;
  border-radius: 14px;
  background: var(--cyan);
  font-weight: 800;
  cursor: pointer;
}

.hero-thumbs {
  display: grid;
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.5);
  cursor: pointer;
  text-align: left;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 145, 178, 0.18);
}

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

.hero-thumb strong,
.hero-thumb span {
  display: block;
}

.hero-thumb strong {
  color: white;
  margin-bottom: 4px;
}

.hero-thumb span {
  color: var(--muted);
  font-size: 12px;
}

.page-main,
.content-section,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-main {
  padding: 56px 0 80px;
}

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

.section-heading,
.page-heading,
.category-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.section-heading h2,
.page-heading h1,
.category-title-row h1,
.detail-title h1 {
  margin: 10px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.section-heading p,
.page-heading p,
.category-title-row p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  flex: none;
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 26px 70px rgba(8, 145, 178, 0.18);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  color: white;
  background: rgba(6, 182, 212, 0.88);
}

.poster-score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  color: #111827;
  background: var(--yellow);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-desc {
  margin-top: 8px;
  min-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

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

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.13), transparent 46%),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.category-card span {
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.68);
}

.filter-line {
  margin-top: 10px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.7fr);
  gap: 28px;
}

.rank-feature {
  display: grid;
  grid-template-columns: 38% 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.rank-feature img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.rank-feature-copy {
  padding: 32px;
}

.rank-feature-copy h2 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 4vw, 50px);
}

.rank-feature-copy p {
  color: var(--soft);
  line-height: 1.85;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-number {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 62px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  margin-bottom: 6px;
}

.rank-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-main {
  padding: 28px 0 78px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.player-backdrop {
  z-index: 2;
  object-fit: cover;
  opacity: 0.68;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #001018;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #a5f3fc);
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.38);
  cursor: pointer;
}

.play-trigger span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #001018;
}

.player-shell.is-playing .player-backdrop,
.player-shell.is-playing .play-trigger {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.detail-title h1 {
  margin-top: 0;
}

.detail-title p,
.detail-copy p {
  color: var(--soft);
  line-height: 1.85;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.detail-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.46);
}

.detail-facts span,
.detail-facts strong {
  display: block;
}

.detail-facts span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-copy {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.66);
}

.detail-copy h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-copy p + h2 {
  margin-top: 26px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 28px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 32px;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
}

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

.site-footer h3 {
  margin: 0 0 14px;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  body.nav-open .mobile-nav {
    display: grid;
  }

  .hero-content,
  .detail-hero,
  .rank-layout,
  .rank-feature,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 12vw, 68px);
  }

  .rank-feature img {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .header-inner {
    height: 64px;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 46px;
  }

  .section-heading,
  .page-heading,
  .category-title-row,
  .search-line,
  .filter-line {
    display: grid;
  }

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

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

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

  .movie-desc,
  .tag-row {
    display: none;
  }

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

  .play-trigger {
    width: 68px;
    height: 68px;
  }
}
