:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --card: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(217, 119, 6, 0.18), transparent 28rem),
    linear-gradient(180deg, #111827 0%, #020617 54%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(146, 64, 14, 0.96), rgba(180, 83, 9, 0.96), rgba(120, 53, 15, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #451a03;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.34);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(120, 53, 15, 0.72));
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42), rgba(146, 64, 14, 0.42)),
    radial-gradient(circle at 68% 24%, rgba(245, 158, 11, 0.5), transparent 19rem),
    radial-gradient(circle at 20% 80%, rgba(251, 191, 36, 0.18), transparent 22rem);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 40px;
  padding: 56px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  padding: 6px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p,
.detail-info .lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 760px;
}

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

.hero-tags span,
.tag-row span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.18);
  font-size: 13px;
}

.tag-row.large span {
  padding: 7px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.btn.primary {
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 32px;
  transform: rotate(2deg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #0f172a);
}

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.dot.is-active {
  width: 34px;
  background: #f59e0b;
}

.quick-search,
.category-strip,
.content-section,
.rank-preview,
.page-hero,
.category-overview,
.rank-full,
.filter-bar,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
}

.quick-search form,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 16px;
}

.quick-search button,
.filter-bar a {
  border: 0;
  border-radius: 16px;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 13px 20px;
  font-weight: 800;
}

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

.section-head.compact {
  margin-bottom: 14px;
}

.section-head h2,
.story-section h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p,
.story-section p,
.site-footer p {
  margin: 5px 0 0;
  color: var(--muted);
}

.section-head a {
  color: #fde68a;
}

.category-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.category-tile,
.category-panel,
.movie-card,
.rank-row,
.rank-card,
.story-section,
.watch-panel,
.detail-nav a {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.category-tile {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border-radius: 22px;
}

.category-tile img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  opacity: 0.52;
  transition: 0.3s ease;
}

.category-tile span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 18px;
  font-weight: 800;
}

.category-tile:hover img {
  opacity: 0.72;
  transform: scale(1.05);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #78350f, #0f172a);
  transition: 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #451a03;
  background: #fbbf24;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 800;
  font-size: 12px;
}

.movie-card-body {
  padding: 15px;
}

.movie-title {
  display: block;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
}

.movie-card p {
  margin: 8px 0 12px;
  min-height: 64px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 13px;
}

.meta-row a {
  color: #fde68a;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
}

.rank-row span {
  color: #fbbf24;
  font-weight: 900;
  font-size: 20px;
}

.rank-row em {
  color: var(--soft);
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(146, 64, 14, 0.68)),
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.35), transparent 18rem);
  box-shadow: var(--shadow);
}

.page-hero.slim h1 {
  font-size: clamp(34px, 5vw, 56px);
}

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

.category-panel {
  border-radius: 22px;
  padding: 22px;
}

.category-panel span {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

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

.no-top {
  margin-top: 18px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 70px 96px 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 22px;
}

.rank-card span {
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #78350f, #0f172a);
}

.rank-card strong {
  font-size: 19px;
}

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

.rank-card em {
  color: var(--soft);
  font-style: normal;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 34px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  background: linear-gradient(135deg, #78350f, #0f172a);
  box-shadow: var(--shadow);
}

.back-link {
  color: #fde68a;
  font-weight: 800;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.info-grid span {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
}

.detail-info .btn {
  margin-top: 24px;
}

.watch-panel {
  border-radius: 30px;
  padding: 14px;
  margin-top: 34px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.25s ease;
}

.play-layer span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #451a03;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.36);
  font-size: 26px;
}

.play-layer strong {
  font-size: 22px;
}

.watch-panel.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-section {
  border-radius: 26px;
  padding: 26px;
  margin-top: 22px;
}

.story-section p {
  font-size: 17px;
}

.detail-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.detail-nav a {
  border-radius: 18px;
  padding: 16px;
  color: #fde68a;
}

.site-footer {
  margin-top: 60px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.96));
  border-top: 1px solid var(--line);
}

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

.site-footer a {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
  margin: 0 0 10px;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--soft);
  border-top: 1px solid var(--line);
  padding: 18px 0 24px;
}

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

  .hero {
    min-height: 760px;
  }

  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    padding: 34px;
  }

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

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

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

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

@media (max-width: 720px) {
  .nav-wrap {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(120, 53, 15, 0.98);
    padding: 10px;
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .hero,
  .page-hero {
    border-radius: 24px;
  }

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

  .hero-slide {
    padding: 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 22px;
  }

  .quick-search form,
  .filter-bar,
  .section-head,
  .rank-row,
  .rank-card,
  .detail-nav {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-overview {
    grid-template-columns: 1fr;
  }

  .rank-card {
    display: grid;
    grid-template-columns: 54px 82px 1fr;
  }

  .rank-card img {
    width: 82px;
    height: 110px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.small {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }
}
