:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(251, 191, 36, 0.18);
  --text: #fff7ed;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --amber: #fbbf24;
  --amber-strong: #f59e0b;
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}

* {
  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(124, 58, 237, 0.32), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(76, 29, 149, 0.9), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 0 34px rgba(251, 191, 36, 0.42);
}

.logo-text {
  background: linear-gradient(90deg, #fde68a, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.quick-search input {
  width: min(220px, 28vw);
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 6px 8px 12px;
}

.quick-search input::placeholder {
  color: rgba(253, 230, 138, 0.72);
}

.quick-search button,
.mobile-menu-toggle,
.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.quick-search button {
  padding: 8px 14px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.mobile-menu-toggle,
.mobile-nav {
  display: none;
}

main {
  position: relative;
  z-index: 1;
}

.hero-section {
  position: relative;
  min-height: 720px;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  padding: 42px 24px 72px;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.7;
  pointer-events: none;
}

.hero-glow-one {
  top: 120px;
  left: -70px;
  width: 260px;
  height: 260px;
  background: rgba(251, 191, 36, 0.18);
}

.hero-glow-two {
  right: 4%;
  bottom: 90px;
  width: 340px;
  height: 340px;
  background: rgba(124, 58, 237, 0.3);
}

.hero-slide {
  position: absolute;
  inset: 42px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 42px;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.38), rgba(2, 6, 23, 0.9));
  box-shadow: var(--shadow);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at 28% 12%, rgba(251, 191, 36, 0.18), transparent 30rem);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.15) contrast(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 58px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.detail-meta span,
.rank-meta span {
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.7);
  padding: 5px 10px;
  font-size: 13px;
}

.hero-actions,
.detail-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 20px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

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

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

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 10;
  left: 82px;
  bottom: 104px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 156px;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover img {
  opacity: 0.56;
  transform: scale(1.08);
}

.category-card span,
.category-card small {
  position: absolute;
  left: 18px;
  z-index: 2;
}

.category-card span {
  bottom: 42px;
  font-size: 22px;
  font-weight: 900;
}

.category-card small {
  bottom: 18px;
  color: #fde68a;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(30, 41, 59, 0.88);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(251, 191, 36, 0.12));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.year-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #111827;
  background: var(--amber);
  font-size: 12px;
}

.play-badge {
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #111827;
  background: rgba(253, 230, 138, 0.92);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
}

.card-tags {
  margin-top: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.ranking-panel,
.player-panel,
.story-block,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.ranking-panel h2 {
  margin: 0;
  font-size: 30px;
}

.ranking-panel p {
  color: var(--muted-2);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  width: 74px;
  height: 104px;
  object-fit: cover;
}

.rank-info h3,
.rank-info p {
  margin: 0;
}

.rank-info p {
  color: var(--muted-2);
  font-size: 14px;
}

.rank-meta {
  margin-top: 8px;
}

.mini-ranking .ranking-item {
  grid-template-columns: 42px minmax(0, 1fr);
}

.mini-ranking .rank-thumb {
  display: none;
}

.page-hero {
  max-width: 1280px;
  margin: 26px auto 0;
  padding: 64px 24px;
}

.page-hero > div,
.detail-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(76, 29, 149, 0.42));
  box-shadow: var(--shadow);
}

.page-hero > div {
  padding: 48px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-cover {
  overflow: hidden;
  border-radius: 22px;
}

.category-cover img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  color: var(--muted-2);
}

.category-overview-card ul {
  margin: 12px 0;
  padding-left: 18px;
  color: var(--muted);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.filter-toolbar input,
.filter-toolbar select {
  min-height: 44px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 999px;
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.56);
  padding: 0 16px;
}

.filter-toolbar input {
  flex: 1;
}

.filter-toolbar select {
  color: #fde68a;
}

.filter-toolbar span {
  color: var(--amber);
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: 34px;
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-main {
  align-self: center;
}

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

.breadcrumb a {
  color: #fde68a;
}

.detail-meta,
.detail-tags {
  margin-top: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  width: 100%;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 54px rgba(245, 158, 11, 0.4);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 20px;
}

.player-panel {
  padding: 18px;
}

.player-panel.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted-2);
}

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

.story-block {
  padding: 28px;
}

.story-block h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.story-block p {
  margin: 0;
  color: var(--muted);
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  color: var(--muted-2);
}

.footer-inner strong {
  color: #fff;
  font-size: 20px;
}

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

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

[data-card].is-hidden {
  display: none;
}

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

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

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

  .ranking-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 860px) {
  .header-inner {
    padding: 0 16px;
  }

  .main-nav,
  .quick-search {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
    padding: 9px 13px;
    color: #111827;
    font-weight: 900;
    background: var(--amber);
  }

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

  .hero-section {
    min-height: 760px;
    padding: 20px 16px 58px;
  }

  .hero-slide {
    inset: 20px 16px 58px;
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-content {
    padding: 32px 24px;
  }

  .hero-poster {
    display: none;
  }

  .hero-dots {
    left: 42px;
    bottom: 82px;
  }

  .content-section,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head,
  .footer-inner,
  .filter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-thumb img {
    width: 64px;
    height: 90px;
  }
}

@media (max-width: 520px) {
  .hero-content h1,
  .page-hero h1,
  .detail-main h1 {
    font-size: 36px;
  }

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

  .page-hero > div,
  .detail-hero,
  .story-block {
    padding: 22px;
  }
}
