:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --card: #111827;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

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

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-toggle {
  display: none;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  color: #e2e8f0;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--amber);
  transform: translateY(-1px);
}

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

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  isolation: isolate;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.74) 43%, rgba(2, 6, 23, 0.38) 100%), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding: 72px 0 92px;
}

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

.hero-kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  color: var(--amber);
  font-size: clamp(1.55rem, 3.2vw, 2.7rem);
  letter-spacing: -0.03em;
  margin-top: 8px;
}

.hero-copy p {
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  max-width: 680px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  color: white;
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 600px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search input {
  min-width: 0;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 14px;
  font: inherit;
}

.hero-search button,
.filter-bar button {
  cursor: pointer;
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
}

.hero-side {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-side img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 16px;
}

.hero-side h2 {
  margin: 0 0 6px;
  font-size: 1.42rem;
}

.hero-side p {
  margin: 0 0 12px;
  color: var(--muted);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pills span,
.tag-list span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

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

.main-space {
  padding: 56px 0 86px;
}

.content-section {
  margin: 0 0 70px;
}

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

.section-head h2,
.page-head h1 {
  margin: 10px 0 0;
  font-size: clamp(1.72rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.section-more {
  flex: 0 0 auto;
  color: var(--amber);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

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

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

.compact-card .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82) 100%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: white;
  background: rgba(245, 158, 11, 0.94);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #020617;
  background: #fbbf24;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  font-weight: 850;
  font-size: 1.05rem;
  line-height: 1.35;
  color: white;
  margin-bottom: 5px;
}

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--soft);
  font-size: 0.88rem;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  margin-top: 9px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

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

.category-tile {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.23), transparent 42%), rgba(15, 23, 42, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong {
  font-size: 1.2rem;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-tile span {
  color: var(--amber);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 170px)) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  color: white;
  background: rgba(2, 6, 23, 0.66);
  padding: 11px 12px;
  outline: 0;
  font: inherit;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: 22px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-num {
  color: #020617;
  background: #fbbf24;
  border-radius: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.rank-row img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 13px;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 4px;
  font-size: 1.06rem;
}

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

.page-hero {
  padding: 54px 0 28px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 32%);
}

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

.breadcrumb a {
  color: #fcd34d;
}

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

.watch-panel,
.info-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--amber), var(--amber-strong));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.42);
}

.watch-caption,
.info-panel {
  padding: 22px;
}

.watch-caption h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.18;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-panel {
  margin-top: 22px;
}

.info-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 1.38rem;
}

.info-panel p {
  margin: 0 0 18px;
  color: #dbeafe;
}

.side-panel {
  padding: 18px;
}

.side-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.side-card:last-child {
  border-bottom: 0;
}

.side-card img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.side-card strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.side-card span {
  color: var(--soft);
  font-size: 0.8rem;
}

.next-prev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.next-prev a {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.42);
  color: #fcd34d;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--muted);
}

.footer-wrap strong {
  display: block;
  color: white;
  font-size: 1.25rem;
}

.footer-wrap p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #fcd34d;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 48px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .filter-bar,
  .rank-row,
  .footer-wrap,
  .next-prev {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-head,
  .footer-wrap {
    display: block;
  }

  .rank-row {
    display: grid;
  }
}

@media (max-width: 480px) {
  .container,
  .nav-wrap,
  .footer-wrap,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-text small {
    display: none;
  }
}

.category-wide {
  min-height: 230px;
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0;
}

.mini-posters img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}
