:root {
  --night-950: #050607;
  --night-900: #0d0f12;
  --night-850: #12151a;
  --night-800: #1a1d23;
  --night-700: #212529;
  --night-500: #495057;
  --night-400: #6c757d;
  --night-300: #adb5bd;
  --night-200: #dee2e6;
  --blood-800: #9d0208;
  --blood-700: #c1121f;
  --blood-600: #e63946;
  --blood-500: #ff4d4d;
  --gold-500: #eab308;
  --white: #ffffff;
  --shadow-glow: 0 0 20px rgba(255, 77, 77, 0.3);
  --shadow-glow-sm: 0 0 10px rgba(255, 77, 77, 0.2);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(230, 57, 70, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 18%, rgba(36, 59, 83, 0.24), transparent 38rem),
    var(--night-900);
  color: var(--night-200);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 18, 0.95);
  border-bottom: 1px solid var(--night-700);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blood-600), var(--blood-800));
  color: var(--white);
  box-shadow: var(--shadow-glow-sm);
}

.brand:hover .brand-mark {
  box-shadow: var(--shadow-glow);
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--night-300);
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  background: var(--blood-600);
  color: var(--white);
  box-shadow: var(--shadow-glow-sm);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--night-800);
  color: var(--white);
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--night-700);
}

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

.hero {
  position: relative;
  height: min(760px, 72vh);
  min-height: 560px;
  overflow: hidden;
  background: var(--night-950);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.05) brightness(0.78);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.96), rgba(13, 15, 18, 0.70) 42%, rgba(13, 15, 18, 0.18)),
    linear-gradient(0deg, var(--night-900), transparent 42%),
    radial-gradient(circle at 18% 36%, rgba(230, 57, 70, 0.28), transparent 34rem);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding-top: 36px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--blood-500);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.54);
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--night-200);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(230, 57, 70, 0.28);
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.16);
  color: var(--blood-500);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn-primary {
  background: var(--blood-600);
  color: var(--white);
  box-shadow: var(--shadow-glow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--blood-700);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(26, 29, 35, 0.86);
  color: var(--white);
}

.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 77, 0.5);
  color: var(--white);
}

.btn-ghost {
  border: 1px solid rgba(230, 57, 70, 0.24);
  color: var(--night-200);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  transition: 0.25s ease;
}

.hero-arrow:hover {
  background: var(--blood-600);
  box-shadow: var(--shadow-glow-sm);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: 0.25s ease;
}

.hero-dot.is-active {
  background: var(--blood-500);
  box-shadow: var(--shadow-glow-sm);
}

.quick-search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: center;
  margin-top: -44px;
  position: relative;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(26, 29, 35, 0.92);
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.content-card h2,
.side-panel h2,
.detail-info-card h1,
.category-overview-card h2,
.footer-grid h2 {
  margin: 0;
  color: var(--white);
}

.quick-search-panel p,
.page-hero p,
.category-overview-card p,
.content-card p,
.detail-info-card p,
.spotlight-card p,
.site-footer p {
  margin: 10px 0 0;
  color: var(--night-300);
}

.site-search-form,
.filter-panel {
  display: flex;
  gap: 12px;
}

.site-search-form input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--night-700);
  border-radius: 12px;
  outline: 0;
  background: var(--night-900);
  color: var(--white);
  padding: 13px 14px;
}

.filter-panel {
  grid-template-columns: 1fr 240px;
  margin-top: 24px;
}

.section-block {
  padding: 68px 0 0;
}

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

.section-heading.tight {
  margin-bottom: 18px;
}

.section-heading a {
  color: var(--blood-500);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  background: var(--night-800);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 77, 77, 0.3);
  box-shadow: var(--shadow-glow);
}

.movie-poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  background: var(--night-950);
}

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

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

.play-dot,
.player-play-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blood-600);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blood-600), var(--blood-800));
  color: var(--white);
  padding: 6px 10px;
  text-align: center;
  font-weight: 900;
  box-shadow: var(--shadow-glow-sm);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.movie-meta-row,
.movie-info-line,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-card h2 {
  margin: 12px 0 0;
  color: var(--white);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--blood-500);
}

.movie-card p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--night-300);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rating {
  color: var(--gold-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-info-line {
  margin-top: auto;
  padding-top: 14px;
  color: var(--night-400);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--night-800);
  box-shadow: var(--shadow-card);
}

.category-card img,
.category-overview-cover img,
.spotlight-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.category-card:hover img,
.category-overview-card:hover img,
.spotlight-card:hover img {
  transform: scale(1.08);
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 6, 7, 0.94), rgba(5, 6, 7, 0.14));
}

.category-card strong,
.category-card small {
  position: absolute;
  right: 18px;
  left: 18px;
}

.category-card strong {
  bottom: 64px;
  color: var(--white);
  font-size: 24px;
}

.category-card small {
  bottom: 18px;
  color: var(--night-300);
}

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

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

.movie-list-item {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(26, 29, 35, 0.78);
  padding: 10px;
  transition: 0.25s ease;
}

.movie-list-item:hover {
  border-color: rgba(255, 77, 77, 0.32);
  background: var(--night-800);
  transform: translateX(3px);
}

.movie-list-item img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.list-rank {
  width: 32px;
  color: var(--blood-500);
  font-weight: 900;
  text-align: center;
}

.movie-list-title {
  display: block;
  overflow: hidden;
  color: var(--white);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-list-meta {
  display: block;
  overflow: hidden;
  color: var(--night-400);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-card,
.side-panel,
.content-card,
.detail-info-card,
.category-overview-card,
.hero-stat-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(26, 29, 35, 0.88);
  box-shadow: var(--shadow-card);
}

.spotlight-card {
  display: grid;
  align-self: start;
}

.spotlight-card img {
  height: 380px;
}

.spotlight-card div {
  padding: 22px;
}

.spotlight-card span {
  color: var(--blood-500);
  font-weight: 800;
}

.spotlight-card h2 {
  margin: 8px 0 0;
  color: var(--white);
}

.spotlight-card .btn-primary {
  margin-top: 20px;
}

.page-main {
  padding-bottom: 72px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 300px;
  padding: 64px 0 24px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
}

.small-hero {
  min-height: 240px;
}

.category-hero {
  border-bottom: 1px solid var(--night-700);
}

.hero-stat-card {
  min-width: 180px;
  padding: 28px;
  text-align: center;
}

.hero-stat-card strong {
  display: block;
  color: var(--white);
  font-size: 52px;
  line-height: 1;
}

.hero-stat-card span {
  color: var(--night-300);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill {
  border: 1px solid var(--night-700);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--night-300);
  font-weight: 800;
}

.category-pill:hover,
.category-pill.is-active {
  border-color: rgba(255, 77, 77, 0.5);
  background: rgba(230, 57, 70, 0.18);
  color: var(--blood-500);
}

.side-panel {
  padding: 20px;
}

.sticky-panel {
  position: sticky;
  top: 92px;
  align-self: start;
}

.compact-list {
  margin-top: 16px;
}

.overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.category-overview-cover {
  min-height: 360px;
  overflow: hidden;
  background: var(--night-950);
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body .btn-secondary {
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  color: var(--night-400);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--blood-500);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  padding-top: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-card);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(5, 6, 7, 0.82), rgba(5, 6, 7, 0.28));
  color: var(--white);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.player-overlay:hover .player-play-icon {
  transform: scale(1.08);
}

.detail-info-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.detail-info-card img {
  width: 150px;
  height: 220px;
  border-radius: 14px;
  object-fit: cover;
}

.detail-info-card h1 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.detail-meta-grid {
  margin-top: 16px;
  color: var(--night-300);
  font-size: 14px;
}

.detail-meta-grid span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding-top: 30px;
}

.content-card {
  padding: 24px;
}

.content-card p {
  font-size: 17px;
}

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

.movie-card-compact p {
  -webkit-line-clamp: 2;
}

.filter-count {
  margin-bottom: 18px;
  color: var(--night-300);
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--night-700);
  background: var(--night-950);
  padding: 42px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 30px;
}

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

.footer-links a {
  border: 1px solid var(--night-700);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--night-300);
  font-size: 14px;
}

.footer-links a:hover {
  border-color: rgba(255, 77, 77, 0.45);
  color: var(--blood-500);
}

.copyright {
  margin-top: 34px;
  color: var(--night-500);
  font-size: 13px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.65s ease both;
}

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

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

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

  .sticky-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-block;
  }

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

  .hero-content {
    align-items: flex-end;
    padding-bottom: 82px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .filter-panel,
  .detail-content-grid,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .site-search-form,
  .filter-panel {
    flex-direction: column;
  }

  .category-overview-cover {
    min-height: 280px;
  }
}

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

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

  .hero {
    min-height: 640px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-actions,
  .section-heading,
  .page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }

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

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

  .movie-card h2 {
    font-size: 16px;
  }

  .detail-info-card {
    grid-template-columns: 1fr;
  }

  .detail-info-card img {
    width: 100%;
    height: auto;
    max-height: 420px;
  }

  .movie-list-item {
    grid-template-columns: auto 50px minmax(0, 1fr);
  }

  .movie-list-item img {
    width: 50px;
    height: 64px;
  }
}

@media (max-width: 460px) {
  .movie-grid-home,
  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
