:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #0f172a;
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --subtext: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --accent-strong: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.12), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  line-height: 1.6;
}

body.locked {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #facc15);
  color: #111827;
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.35);
}

.brand-name {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #d1d5db;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent-strong);
}

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 14px;
}

.nav-search button,
.hero-search button,
.filter-panel button,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  padding: 10px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.filter-panel button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(15, 23, 42, 0.98);
  padding: 12px 20px 20px;
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

main {
  padding-top: 68px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06);
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slide::before {
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 38%, rgba(2, 6, 23, 0.22) 72%, rgba(2, 6, 23, 0.06) 100%);
}

.hero-slide::after {
  background: linear-gradient(0deg, #020617 0%, transparent 48%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-inner {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(1240px, calc(100% - 32px));
  transform: translate(-50%, -48%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
}

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

.eyebrow,
.detail-eyebrow,
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

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

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta-line span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 6px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.secondary-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-search {
  display: flex;
  max-width: 560px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 15px 18px;
  color: var(--text);
  background: transparent;
}

.hero-card {
  align-self: stretch;
  min-height: 460px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent-strong);
}

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

.content-section,
.page-section {
  padding: 62px 0 0;
}

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

.section-head h2,
.page-head h1,
.detail-title,
.search-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head p,
.page-head p,
.search-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--accent-strong);
  font-weight: 800;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 42%);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.96);
  color: #111827;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .poster-frame img,
.wide-card:hover img,
.related-item:hover img {
  transform: scale(1.08);
}

.movie-card:hover .poster-shade,
.movie-card:hover .card-play {
  opacity: 1;
}

.movie-card:hover .card-play {
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  display: block;
  padding: 12px 2px 0;
}

.movie-info strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong,
.wide-card:hover strong,
.related-item:hover strong {
  color: var(--accent-strong);
}

.movie-info em,
.movie-info p,
.wide-card em,
.wide-card small,
.related-item em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.movie-info p {
  margin: 8px 0 0;
}

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

.tag-row span,
.detail-tags a,
.filter-chip {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  padding: 4px 8px;
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 52%),
    rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.46);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: 0;
  background: rgba(2, 6, 23, 0.64);
  color: var(--text);
  padding: 12px 14px;
}

.filter-panel button {
  border-radius: 14px;
}

.no-results {
  display: none;
  padding: 36px;
  text-align: center;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.no-results.show {
  display: block;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.wide-card img {
  width: 128px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.detail-wrap {
  padding: 42px 0 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--accent-strong);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.04));
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.32);
  font-size: 28px;
}

.detail-panel,
.side-panel {
  margin-top: 20px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.detail-panel h1,
.detail-panel h2,
.side-panel h2 {
  margin-top: 0;
}

.detail-panel p {
  color: var(--subtext);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 116px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.related-item strong,
.related-item em {
  display: block;
}

.search-wrap {
  padding: 46px 0 0;
}

.search-box-large {
  display: flex;
  margin: 28px 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.78);
}

.search-box-large input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 18px 20px;
}

.search-box-large button {
  border: 0;
  color: #111827;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  padding: 0 28px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.5);
}

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

.footer-grid p,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-card {
    display: none;
  }

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

  .category-grid,
  .wide-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .page-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    width: min(100% - 24px, 1240px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-search,
  .search-box-large {
    flex-direction: column;
  }

  .hero-search button,
  .search-box-large button {
    padding: 13px 18px;
  }

  .related-item,
  .wide-card {
    grid-template-columns: 96px 1fr;
  }

  .related-item img,
  .wide-card img {
    width: 96px;
  }
}
