:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --muted: #9ca3af;
  --text: #f9fafb;
  --line: rgba(148, 163, 184, 0.18);
  --orange: #fb923c;
  --orange-strong: #f97316;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #030712 46%, #050816 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

img,
video {
  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: rgba(3, 7, 18, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  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-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.22);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 13px;
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, #fb923c, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.8);
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 99px;
  background: #e5e7eb;
}

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

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

.mobile-nav-link {
  padding: 10px 12px;
  color: #d1d5db;
  border-radius: 12px;
}

.mobile-nav-link:hover {
  background: rgba(251, 146, 60, 0.1);
  color: var(--orange);
}

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

.hero {
  position: relative;
  margin-top: 28px;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 30px;
  padding: 54px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.22) 100%),
    radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.28), transparent 28rem),
    radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.18), transparent 28rem);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.1) contrast(1.05);
}

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

.hero-copy {
  align-self: center;
  max-width: 680px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0 0 22px;
  max-width: 640px;
  color: #d1d5db;
  font-size: 17px;
}

.hero-tags,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-tags span,
.chips span,
.detail-tags span {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.08);
  font-size: 13px;
  font-weight: 650;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary,
.btn-ghost,
.section-action,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary,
.play-button {
  color: #111827;
  background: linear-gradient(135deg, #fb923c, #22d3ee);
  box-shadow: 0 18px 38px rgba(251, 146, 60, 0.22);
}

.btn-ghost,
.section-action {
  color: #e5e7eb;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-poster {
  align-self: center;
  justify-self: end;
  width: min(390px, 100%);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.hero-controls {
  position: absolute;
  left: 54px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.section {
  margin-top: 64px;
}

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

.section-head h1,
.section-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 750;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.58);
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(17, 24, 39, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #22d3ee);
  font-size: 12px;
  font-weight: 900;
}

.card-content {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  font-weight: 850;
}

.card-title:hover {
  color: var(--orange);
}

.card-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.2), transparent 18rem),
    radial-gradient(circle at 10% 20%, rgba(251, 146, 60, 0.18), transparent 16rem),
    rgba(15, 23, 42, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2 {
  margin: 8px 0 10px;
  font-size: 28px;
}

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

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-links span {
  max-width: 170px;
  padding: 7px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(2, 6, 23, 0.28);
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 80px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  color: #fb923c;
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  margin-top: 34px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 25rem),
    radial-gradient(circle at bottom left, rgba(251, 146, 60, 0.18), transparent 24rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--line);
}

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

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

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: 17px;
}

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

.player-section {
  margin-top: 38px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.68));
  pointer-events: none;
}

.play-button {
  border: 0;
  cursor: pointer;
  pointer-events: auto;
}

.player-panel.is-playing .play-layer {
  display: none;
}

.article-panel {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.76);
}

.article-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-panel p {
  margin: 0 0 16px;
  color: #d1d5db;
}

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

.compact-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

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

.compact-card span {
  display: block;
  padding: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 800;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 80px auto 0;
  padding: 34px 0 26px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.site-footer p {
  max-width: 470px;
  color: var(--muted);
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #9ca3af;
}

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

.copyright {
  margin-top: 24px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.hide-card {
  display: none !important;
}

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
    padding: 38px;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px;
  }

  .hero-poster {
    justify-self: start;
    width: min(230px, 60vw);
  }

  .hero-controls {
    left: 30px;
    bottom: 24px;
  }

  .filter-panel,
  .detail-hero,
  .footer-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 52px 62px minmax(0, 1fr);
  }

  .rank-row .btn-ghost {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  main,
  .site-footer,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .section-head {
    display: grid;
  }

  .movie-grid,
  .related-grid {
    gap: 12px;
  }

  .card-content {
    padding: 11px;
  }

  .detail-hero,
  .article-panel {
    padding: 20px;
  }
}
