:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(31, 41, 55, 0.56);
  --panel-strong: rgba(17, 24, 39, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --red-soft: rgba(220, 38, 38, 0.22);
  --yellow: #facc15;
  --green: #22c55e;
  --blue: #60a5fa;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(127, 29, 29, 0.28), transparent 34rem), linear-gradient(180deg, #030712 0%, #111827 48%, #030712 100%);
  color: var(--text);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #991b1b 0%, #b91c1c 52%, #991b1b 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

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

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--yellow), var(--red));
  color: white;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  background: linear-gradient(90deg, #fef08a, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  color: #fecaca;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  position: relative;
  color: #fee2e2;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fef08a;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.55);
  padding: 10px;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #070b14;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(127, 29, 29, 0.68), rgba(3, 7, 18, 0.72)), linear-gradient(0deg, #030712 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 44px;
  padding: 72px 0;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.08);
  color: #fef3c7;
  font-size: 13px;
}

.hero-actions,
.detail-info .btn {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  background: var(--red);
  color: white;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.32);
}

.btn.primary:hover {
  background: #b91c1c;
}

.btn.secondary {
  background: rgba(31, 41, 55, 0.85);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 45%);
}

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.section {
  padding: 58px 0;
}

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

.section-head.centered {
  display: block;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.section-head h2,
.sub-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  color: white;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.section-head p,
.sub-hero p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.more-link {
  color: #f87171;
  font-weight: 800;
  white-space: nowrap;
}

.more-link:hover {
  color: #fecaca;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  gap: 14px;
  padding: 16px;
  background: rgba(31, 41, 55, 0.44);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 48px;
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.58);
  border: 1px solid var(--line);
}

.search-box span {
  color: var(--yellow);
  font-weight: 900;
}

.search-box input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: none;
  color: white;
  background: transparent;
}

.filter-bar select {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.58);
  border: 1px solid var(--line);
}

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

.category-tile,
.category-panel {
  display: block;
  min-height: 180px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.36), rgba(31, 41, 55, 0.58));
  border: 1px solid rgba(248, 113, 113, 0.16);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.34);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.48), rgba(31, 41, 55, 0.72));
}

.category-tile span,
.category-panel span {
  color: var(--yellow);
  font-size: 14px;
  font-weight: 900;
}

.category-tile strong,
.category-panel h2 {
  display: block;
  margin: 16px 0 10px;
  color: white;
  font-size: 22px;
}

.category-tile em,
.category-panel p {
  color: var(--soft);
  font-style: normal;
  line-height: 1.7;
}

.category-panel .sample-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  color: #fecaca;
  font-size: 14px;
}

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: rgba(31, 41, 55, 0.9);
  box-shadow: 0 20px 45px rgba(127, 29, 29, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

.poster-wrap img {
  transition: transform 0.45s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: white;
  font-size: 34px;
  background: rgba(0, 0, 0, 0.32);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-card h3 a:hover {
  color: #f87171;
}

.card-body p {
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(31, 41, 55, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(248, 113, 113, 0.32);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--red));
  color: #111827;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.sub-hero {
  position: relative;
  padding: 76px 0;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.45), rgba(153, 27, 27, 0.22)), radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 30rem);
  border-bottom: 1px solid var(--line);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #030712 0%, rgba(3, 7, 18, 0.88) 46%, rgba(127, 29, 29, 0.58) 100%), linear-gradient(0deg, #030712 0%, transparent 50%);
}

.detail-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 70px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: #fca5a5;
}

.breadcrumbs em {
  color: #e5e7eb;
  font-style: normal;
}

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(42px, 7vw, 72px);
}

.one-line {
  margin: 18px 0;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.75);
  color: #d1d5db;
  font-size: 13px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.24), rgba(0, 0, 0, 0.58));
}

.play-cover span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: rgba(220, 38, 38, 0.94);
  color: white;
  font-size: 38px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.play-cover:hover span {
  transform: scale(1.08);
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.text-card {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(31, 41, 55, 0.52);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.text-card p {
  margin: 0 0 18px;
  color: var(--soft);
  line-height: 2;
  font-size: 16px;
}

.text-card h2 {
  margin: 24px 0 12px;
  font-size: 26px;
}

.site-footer {
  margin-top: 48px;
  padding: 48px 0 24px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9), #000000);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a:hover {
  color: #f87171;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--red);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(31, 41, 55, 0.42);
}

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

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

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

  .hero-poster {
    max-width: 330px;
  }

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

@media (max-width: 780px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(127, 29, 29, 0.98);
    box-shadow: var(--shadow);
  }

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

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

  .nav-link.active::after {
    display: none;
  }

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

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

  .hero p,
  .one-line {
    font-size: 17px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .rank-card {
    grid-template-columns: 44px 86px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-card h3 {
    font-size: 16px;
  }

  .rank-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .detail-poster {
    max-width: 260px;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
