:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.38);
  font-size: 18px;
}

.brand-text strong,
.footer-logo {
  display: block;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.nav-links a {
  padding: 11px 16px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-links a:hover {
  transform: translateY(-1px);
}

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

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-current {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.52) 48%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 76px;
  width: min(680px, calc(100% - 48px));
}

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

.hero-tags span,
.tag-cloud span,
.movie-chip,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.72);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 16px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  color: #cbd5e1;
  font-size: 14px;
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 64px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 40px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-dot.is-current {
  width: 62px;
  background: var(--amber);
}

.search-band {
  width: min(1280px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
}

.search-panel,
.content-section,
.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 0 14px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.58);
  outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 26px 60px rgba(245, 158, 11, 0.12);
}

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

.featured-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.92) 100%);
}

.movie-chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  max-width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  display: block;
  padding: 14px;
}

.movie-info strong {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info em {
  display: -webkit-box;
  min-height: 40px;
  margin-top: 8px;
  overflow: hidden;
  color: #94a3b8;
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
}

.rank-row b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 13px;
}

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

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

.rank-row strong {
  color: #fff;
  font-size: 16px;
}

.rank-row em {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-row i {
  color: #fbbf24;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.22), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #020617 75%);
}

.page-hero {
  padding: 92px 0 74px;
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.1);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-covers img {
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.category-card strong {
  display: block;
  font-size: 20px;
}

.category-card em {
  display: block;
  min-height: 72px;
  margin: 10px 0 16px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.category-card span:last-child {
  color: #fbbf24;
  font-weight: 800;
}

.page-filter {
  margin-bottom: 22px;
}

.filter-empty {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.68);
}

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

.is-hidden {
  display: none !important;
}

.detail-hero {
  min-height: 640px;
  display: flex;
  align-items: end;
  padding: 44px 0 72px;
}

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

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68)),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.detail-shell {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-intro h1 {
  max-width: 920px;
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-intro .lead {
  max-width: 820px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
}

.detail-intro .primary-button {
  margin-top: 24px;
}

.detail-section {
  padding-top: 64px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.72) 58%);
  cursor: pointer;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.34);
  font-size: 28px;
}

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

.player-card.is-active .play-layer {
  opacity: 0;
  pointer-events: none;
}

.copy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 18px;
}

.copy-grid article,
.meta-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.copy-grid h2,
.meta-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.copy-grid p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.meta-card dl {
  margin: 0;
}

.meta-card dt {
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.meta-card dd {
  margin: 4px 0 0;
  color: #fff;
  line-height: 1.6;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), #020617);
}

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

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

.footer-grid h3 {
  margin: 0 0 16px;
}

.footer-grid a {
  display: block;
  margin-top: 10px;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

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

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

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

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

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

  .nav-links a {
    width: 100%;
  }

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

  .hero-content {
    bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 36px;
  }

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

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 12px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 62px 1fr;
  }

  .rank-row i {
    display: none;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }

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

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 18px;
  }

  .hero-content h1,
  .detail-intro h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .library-grid,
  .category-grid {
    gap: 12px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info strong {
    font-size: 14px;
  }

  .movie-info em {
    display: none;
  }

  .player-card {
    border-radius: 18px;
  }
}
