:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #b45309;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.nav-shell {
  max-width: var(--max);
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #111827;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-more {
  position: relative;
}

.nav-more-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-more-panel {
  position: absolute;
  right: 0;
  top: 30px;
  width: 170px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-more:hover .nav-more-panel,
.nav-more:focus-within .nav-more-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-more-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: #cbd5e1;
}

.nav-more-panel a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.header-search {
  width: 250px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.42);
  border-radius: 14px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: none;
  color: #fff;
  background: transparent;
}

.header-search input {
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #111827;
  background: var(--accent);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav a {
  padding: 10px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mobile-search input {
  padding: 12px;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.02);
}

.hero-slide.active .hero-image {
  animation: heroZoom 9s ease both;
}

@keyframes heroZoom {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.09);
  }
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

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

.hero-badge,
.kicker,
.card-meta span:first-child,
.detail-chip,
.category-card strong {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-badge {
  padding: 7px 12px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
}

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

.hero p {
  max-width: 610px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

.hero-meta span {
  padding: 7px 11px;
  font-size: 14px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(245, 158, 11, 0.42);
}

.btn-primary {
  border-color: transparent;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-dot {
  width: 46px;
  height: 4px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(25px, 4vw, 38px);
}

.section-head p,
.page-title p,
.category-card p,
.card-body p,
.detail-title p,
.detail-text p,
.footer-shell p {
  color: var(--muted);
  line-height: 1.75;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
}

.section-head > a {
  color: var(--accent-light);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.86));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent),
    #0f172a;
}

.compact-card .card-media {
  aspect-ratio: 3 / 4;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.poster-img.is-hidden,
.rank-img.is-hidden,
.hero-image.is-hidden {
  opacity: 0;
}

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

.card-media::after,
.rank-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.05) 58%, transparent);
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: var(--accent);
  z-index: 3;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  min-width: 42px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.95);
  color: #111827;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.card-body h3 a:hover,
.rank-item:hover strong {
  color: var(--accent-light);
}

.card-body p {
  min-height: 50px;
  margin: 0 0 12px;
  font-size: 14px;
}

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

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

.feature-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.9fr);
  gap: 24px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.panel.pad {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(30, 41, 59, 0.8);
}

.list-rank {
  width: 34px;
  color: var(--accent-light);
  font-weight: 900;
  font-size: 18px;
}

.rank-poster {
  position: relative;
  width: 58px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.score {
  color: var(--accent-light);
  font-weight: 900;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 218px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 54%),
    var(--bg-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card strong {
  width: fit-content;
  padding: 6px 10px;
  font-size: 13px;
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 26px;
}

.category-card p {
  margin: 0;
}

.category-card .btn {
  margin-top: auto;
  width: fit-content;
}

.page-title,
.detail-title {
  padding: 52px 0 28px;
}

.page-title h1,
.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 190px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar label,
.search-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
}

.filter-bar select,
.search-panel select {
  color: #fff;
  appearance: none;
}

.empty-state {
  padding: 26px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #020617;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 21%),
    rgba(2, 6, 23, 0.16);
  color: #111827;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.36);
  font-size: 34px;
  transform: translateX(2px);
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  padding: 22px;
}

.detail-meta span,
.detail-chip {
  padding: 7px 10px;
  font-size: 13px;
}

.detail-text {
  margin-top: 24px;
}

.detail-text h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.detail-text p {
  margin: 0;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
}

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

.detail-side .card-media {
  aspect-ratio: 3 / 4;
  border-radius: 18px 0 0 18px;
}

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

.detail-side .card-body p,
.detail-side .tag-row {
  display: none;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.search-results {
  display: grid;
  gap: 18px;
}

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

.footer-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 20px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 34px;
}

.footer-brand {
  font-size: 22px;
  color: #fff;
}

.footer-shell h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.footer-links a:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fff;
}

@media (max-width: 1060px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-shell {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .movie-grid,
  .movie-grid.six,
  .category-grid,
  .feature-layout,
  .detail-layout,
  .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .hero {
    height: 560px;
  }

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .shell {
    padding: 38px 16px;
  }

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

  .movie-grid,
  .movie-grid.six,
  .category-grid,
  .filter-bar,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .rank-item .score {
    grid-column: 3;
    justify-self: start;
  }

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