:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-hover: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 32rem), var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text strong,
.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  font-weight: 650;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
}

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

.mobile-link {
  display: block;
  padding: 12px 16px;
}

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

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

.hero-slide::before {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.18));
}

.hero-slide::after {
  background: linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0) 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  padding: 88px 0 138px;
}

.eyebrow,
.movie-tags span,
.info-pill,
.cat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.88);
  font-weight: 750;
}

.eyebrow {
  padding: 9px 15px;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 640px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.8;
}

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

.hero-actions {
  margin-top: 32px;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--amber-dark);
}

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

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.15);
}

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

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

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

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0));
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc,
.page-lead {
  color: var(--muted);
  line-height: 1.8;
  max-width: 740px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.two-col {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
}

.movie-card,
.row-card,
.category-tile,
.detail-panel,
.filter-panel,
.player-card,
.breadcrumbs,
.rank-list,
.meta-box {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.row-card:hover,
.category-tile:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(245, 158, 11, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 9;
}

.poster-link img,
.row-poster img,
.category-tile img,
.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.row-card:hover img,
.category-tile:hover img,
.related-card:hover img {
  transform: scale(1.07);
}

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

.poster-link b {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: #fff;
}

.movie-info {
  padding: 18px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.movie-tags span,
.info-pill,
.cat-pill {
  padding: 5px 9px;
  font-size: 0.78rem;
  background: rgba(245, 158, 11, 0.17);
  color: #fbbf24;
}

.movie-info h3,
.row-content h3,
.related-card h3 {
  margin: 0;
  color: #fff;
  font-weight: 850;
  line-height: 1.35;
}

.movie-info h3 {
  font-size: 1.08rem;
}

.movie-info h3 a:hover,
.row-content h3 a:hover,
.related-card h3 a:hover {
  color: #fbbf24;
}

.movie-info p,
.row-content p {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.movie-meta {
  margin-top: 14px;
}

.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  min-width: 320px;
  scroll-snap-align: start;
}

.row-list {
  display: grid;
  gap: 16px;
}

.row-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  transition: 0.28s ease;
}

.row-poster {
  min-height: 126px;
  background: #0f172a;
  overflow: hidden;
}

.row-content {
  padding: 18px;
}

.row-head {
  gap: 10px;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.row-rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--amber);
}

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: 0.28s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.94));
}

.category-tile > * {
  position: relative;
  z-index: 1;
}

.category-tile h2,
.category-tile h3 {
  margin: 14px 0 8px;
  font-size: 1.35rem;
}

.category-tile p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

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

.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.breadcrumbs {
  margin: 26px 0;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: #fbbf24;
}

.filter-panel {
  padding: 18px;
  margin: 24px 0 28px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.cover-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48));
  color: #fff;
  cursor: pointer;
}

.cover-play span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: var(--amber);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.38);
  font-size: 2rem;
}

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

.detail-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.detail-panel h1 {
  margin: 12px 0 18px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-panel h2,
.meta-box h2,
.rank-list h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.detail-panel p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-text {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.meta-box,
.rank-list {
  padding: 22px;
  margin-bottom: 24px;
}

.meta-list {
  display: grid;
  gap: 12px;
  color: var(--soft);
}

.meta-list span {
  color: var(--muted);
  margin-right: 8px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid var(--line);
}

.related-card a:first-child {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.related-card div {
  padding: 14px;
}

.related-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

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

.rank-mini a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  color: var(--soft);
}

.rank-mini a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fff;
}

.rank-mini b {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(245, 158, 11, 0.7);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

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

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

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

.footer-links a:hover,
.footer-brand:hover {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 18px 0;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 70px 0 120px;
  }

  .hero-slide::before {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.8));
  }

  .section {
    padding: 46px 0;
  }

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

  .movie-grid,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .row-card {
    grid-template-columns: 126px minmax(0, 1fr);
  }

  .row-poster {
    min-height: 118px;
  }

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

  .detail-panel,
  .meta-box,
  .rank-list {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .btn,
  .btn-ghost {
    width: 100%;
  }

  .rail .movie-card {
    min-width: 82vw;
  }

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