:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-strong: rgba(30, 41, 59, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #ea580c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.78));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.36);
}

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

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

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

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

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

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

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

.hero {
  position: relative;
  min-height: 80vh;
  padding-top: 104px;
  display: grid;
  align-items: center;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 40px;
  align-items: center;
  padding: 58px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.018);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.7) 43%, rgba(2, 6, 23, 0.38) 100%),
    var(--hero-bg) center / cover no-repeat;
  z-index: -2;
}

.hero-slide::after {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  right: 9%;
  top: 12%;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.24);
  filter: blur(66px);
  z-index: -1;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.11);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.34);
  font-weight: 800;
}

.btn-primary:hover {
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.5);
}

.hero-poster {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

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

.hero-thumbs {
  position: absolute;
  left: 58px;
  bottom: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 3;
}

.hero-thumb {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

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

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--amber-light);
}

.section {
  padding: 64px 0 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--amber-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.section-desc,
.page-desc {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.84);
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  opacity: 0.78;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

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

.card-year {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-content {
  padding: 16px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--subtle);
  font-size: 12px;
}

.meta-line span {
  overflow: hidden;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.movie-card h3 a:hover {
  color: var(--amber-light);
}

.movie-card p {
  margin: 0;
  min-height: 66px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

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

.tag-list span,
.detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 13rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.45);
}

.category-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.ranking-panel,
.info-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 24px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 66px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(251, 191, 36, 0.35);
  transform: translateX(4px);
}

.compact-card img {
  width: 66px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.84);
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card em {
  margin-top: 5px;
  color: var(--subtle);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.rank-num {
  min-width: 38px;
  color: var(--amber-light);
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  padding: 124px 0 28px;
}

.page-hero-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 32px;
  padding: 40px;
  background:
    radial-gradient(circle at 85% 25%, rgba(245, 158, 11, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.86));
  box-shadow: var(--shadow);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--subtle);
  background: rgba(2, 6, 23, 0.5);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  outline: 0;
}

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

.breadcrumbs a:hover {
  color: var(--amber-light);
}

.detail-hero {
  padding: 124px 0 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
  background: rgba(15, 23, 42, 0.84);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.detail-lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.player-section {
  padding-top: 44px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 46px rgba(245, 158, 11, 0.45);
  font-size: 30px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding-top: 34px;
}

.article-body,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.article-body {
  padding: 28px;
}

.article-body h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.9;
}

.side-panel {
  padding: 18px;
  align-self: start;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 34px 0;
  color: var(--muted);
}

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

.footer-inner p {
  margin: 0;
  line-height: 1.8;
}

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

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

.footer-links a:hover {
  color: #fff;
  border-color: rgba(251, 191, 36, 0.38);
}

.hidden-by-filter {
  display: none !important;
}

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

  .hero-slide,
  .detail-hero-grid,
  .content-layout,
  .ranking-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .content-layout {
    gap: 20px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 86px;
  }

  .hero-stage {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide {
    display: block;
    padding: 34px 24px 100px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(34px, 13vw, 56px);
  }

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

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

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

  .section-head {
    display: block;
  }

  .page-hero,
  .detail-hero {
    padding-top: 92px;
  }

  .page-hero-card {
    padding: 28px;
    border-radius: 24px;
  }

  .detail-hero-grid {
    gap: 22px;
  }

  .detail-cover {
    max-width: 280px;
  }

  .article-body {
    padding: 22px;
  }

  .compact-card {
    grid-template-columns: auto 58px 1fr;
  }

  .compact-card img {
    width: 58px;
    height: 78px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  main,
  .nav-shell,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

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

  .btn,
  .filter-select {
    width: 100%;
  }
}
