:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --cyan: #22d3ee;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.14), transparent 28%), linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.3);
  font-size: 14px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--red);
  transition: width 0.25s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.92);
}

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

.mobile-nav-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 5%, rgba(2, 6, 23, 0.86) 38%, rgba(2, 6, 23, 0.28) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.4) 55%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: 24px;
  bottom: 88px;
  width: min(720px, calc(100% - 48px));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.62);
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #d1d5db;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.8;
}

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

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

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

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.28);
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-ghost {
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--red);
}

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

.section.alt {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.72));
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  font-weight: 900;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.more-link {
  min-width: max-content;
  color: #f87171;
  font-weight: 750;
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 28px 70px rgba(239, 68, 68, 0.15);
  transform: translateY(-6px);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #1e293b;
}

.movie-card-small .poster-wrap,
.movie-grid.compact .poster-wrap {
  height: 210px;
}

.movie-card-large .poster-wrap {
  height: 310px;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 62%);
}

.year-badge,
.card-labels span,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-labels {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-labels span {
  position: static;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.card-labels span + span {
  background: rgba(15, 23, 42, 0.9);
}

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #f87171;
}

.card-body em {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-tags span {
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.42);
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.78));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.36);
  transform: translateY(-4px);
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.66);
  color: #f8fafc;
  padding: 0 14px;
}

.filter-empty {
  display: none;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
}

.filter-empty.show {
  display: block;
}

.page-hero {
  padding: 136px max(16px, calc((100vw - 1180px) / 2)) 60px;
  background: radial-gradient(circle at 14% 20%, rgba(239, 68, 68, 0.18), transparent 30%), linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.88));
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.035em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fca5a5;
  font-size: 14px;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 24px;
}

.rank-list,
.side-panel {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.72);
  transform: translateX(4px);
}

.rank-number {
  color: #f87171;
  font-size: 24px;
  font-weight: 900;
}

.rank-row img {
  width: 92px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy strong {
  color: #fff;
  font-weight: 800;
}

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-copy small {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
  color: #fff;
  cursor: pointer;
}

.player-cover span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.94);
  box-shadow: 0 24px 60px rgba(239, 68, 68, 0.28);
  font-size: 34px;
}

.player-cover.hide {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  margin-top: 28px;
}

.detail-card {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 22px;
}

.meta-line span,
.detail-tags span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.48);
  font-size: 13px;
}

.detail-card h2,
.side-panel h2 {
  margin: 30px 0 12px;
  font-size: 22px;
  font-weight: 850;
}

.detail-card p {
  margin: 0 0 16px;
  color: #d1d5db;
  font-size: 16px;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-panel h2 {
  margin-top: 0;
}

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

.side-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 112px;
  height: 72px;
  object-fit: cover;
  border-radius: 13px;
  background: #1e293b;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.footer-logo .logo-mark {
  width: 30px;
  height: 30px;
}

.footer-logo .logo-text {
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

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

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

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

@media (max-width: 760px) {
  .site-nav {
    width: min(100% - 24px, 1180px);
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 78vh;
    min-height: 520px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 76px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .section,
  .detail-main {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 54px 0;
  }

  .section.alt {
    padding: 54px 12px;
  }

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

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

  .poster-wrap,
  .movie-card-small .poster-wrap,
  .movie-card-large .poster-wrap,
  .movie-grid.compact .poster-wrap {
    height: 210px;
  }

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

  .page-hero {
    padding: 112px 14px 46px;
  }

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

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

  .detail-card,
  .side-panel {
    padding: 20px;
  }

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

@media (max-width: 460px) {
  .logo-text {
    font-size: 18px;
  }

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

  .poster-wrap,
  .movie-card-small .poster-wrap,
  .movie-card-large .poster-wrap,
  .movie-grid.compact .poster-wrap {
    height: 260px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
