:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.17), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(234, 88, 12, 0.12), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell,
.mobile-panel,
.hero-inner,
.section,
.footer-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(234, 88, 12, 0.28);
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link,
.footer-links a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.42) 100%),
    var(--hero-bg);
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  align-items: center;
  gap: 52px;
  padding: 72px 0 86px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-weight: 700;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.25);
}

.btn-secondary,
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-poster-card {
  position: relative;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

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

.hero-poster-card figcaption {
  position: absolute;
  inset: auto 18px 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

.hero-poster-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

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

.hero-control,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--accent);
  border-color: var(--accent);
}

.section {
  padding: 64px 0;
}

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

.section-title h2,
.section-title h1,
.detail-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-title p,
.detail-copy p,
.category-lead,
.footer-shell p {
  margin: 0;
  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: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.54);
  background: rgba(30, 41, 59, 0.82);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.quality-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.quality-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(245, 158, 11, 0.86);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

.movie-card h3 a {
  color: #fff;
  text-decoration: none;
}

.card-text {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span,
.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 9rem),
    rgba(15, 23, 42, 0.76);
}

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

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

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-4px);
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-copy strong {
  display: block;
  font-size: 17px;
}

.filter-copy span {
  color: var(--muted);
  font-size: 14px;
}

.filter-fields {
  display: flex;
  gap: 12px;
  flex: 1;
  max-width: 620px;
}

.filter-fields input,
.filter-fields select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.filter-fields input:focus,
.filter-fields select:focus {
  border-color: rgba(245, 158, 11, 0.72);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 74px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 98px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  text-decoration: none;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.78);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-weight: 950;
}

.rank-item img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy strong,
.rank-copy small {
  display: block;
}

.rank-copy strong {
  margin-bottom: 8px;
  font-size: 17px;
}

.rank-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.category-block h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
}

.category-block p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

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

.mini-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  text-decoration: none;
  background: rgba(2, 6, 23, 0.56);
}

.mini-links a:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.5);
}

.detail-top {
  padding: 52px 0 32px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0)),
    var(--bg);
}

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

.breadcrumb a {
  color: var(--soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 34px 0 70px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #fff;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.56));
}

.play-control {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.38);
  font-size: 28px;
}

.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.content-card {
  padding: 26px;
  margin-top: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--soft);
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 18px;
  height: fit-content;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.side-list img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
}

.side-list strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.side-list small {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-brand {
  font-size: 18px;
  font-weight: 900;
}

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

.footer-links a:hover {
  color: #fff;
}

[hidden] {
  display: none !important;
}

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

  .hero-poster-card {
    max-width: 380px;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .hero-slider,
  .hero-inner {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 0 92px;
  }

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

  .section {
    padding: 42px 0;
  }

  .section-header,
  .filter-panel,
  .footer-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-fields {
    flex-direction: column;
    max-width: none;
  }

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

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

  .card-text {
    min-height: 0;
  }

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

  .rank-item {
    grid-template-columns: 44px 58px minmax(0, 1fr);
  }

  .rank-item img {
    width: 58px;
    height: 58px;
  }

  .detail-top {
    padding-top: 34px;
  }

  .detail-content {
    padding-bottom: 44px;
  }

  .content-card {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .nav-shell,
  .mobile-panel,
  .hero-inner,
  .section,
  .footer-shell,
  .detail-shell {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1,
  .detail-copy h1 {
    letter-spacing: -0.03em;
  }
}
