:root {
  --night-950: #050607;
  --night-900: #0d0f12;
  --night-850: #14171c;
  --night-800: #1a1d23;
  --night-700: #2a2f38;
  --night-500: #6c757d;
  --night-400: #adb5bd;
  --night-200: #e9ecef;
  --blood-700: #b00020;
  --blood-600: #e63946;
  --blood-500: #ff4d4d;
  --gold: #f5c542;
  --shadow-glow: 0 0 24px rgba(255, 77, 77, 0.28);
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night-900);
  color: var(--night-200);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blood-600), var(--blood-700));
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.24);
  color: #ffffff;
  font-size: 14px;
}

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

.nav-links a,
.quick-cats a {
  padding: 10px 14px;
  color: var(--night-400);
  border-radius: 10px;
  transition: 0.25s ease;
}

.nav-links a:hover,
.quick-cats a:hover {
  color: #ffffff;
  background: var(--night-800);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--night-800);
  color: #ffffff;
  font-size: 22px;
}

.quick-cats {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--night-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--night-900), rgba(13, 15, 18, 0.62), rgba(13, 15, 18, 0.1)),
    radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.34), transparent 36%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  background: var(--blood-600);
  color: #ffffff;
  border-radius: 8px;
  font-size: 14px;
}

.hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: var(--night-200);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.25s ease;
}

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

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

.btn-secondary {
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  background: var(--night-800);
  color: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 28px;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition: 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--blood-600);
}

.content-stack {
  padding: 64px 0;
}

.content-stack > section {
  margin-bottom: 72px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--night-400);
  line-height: 1.7;
}

.section-more {
  color: var(--blood-500);
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--night-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  transition: 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(230, 57, 70, 0.38);
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.poster-wrap {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: var(--night-950);
}

.movie-card-wide .poster-wrap {
  height: 100%;
  min-height: 220px;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 58%);
}

.duration,
.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  font-size: 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.duration {
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
}

.score {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.52);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--blood-600);
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blood-600);
  color: #ffffff;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: 0.25s ease;
  box-shadow: var(--shadow-glow);
}

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

.card-body {
  padding: 18px;
}

.card-meta,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--night-500);
  font-size: 13px;
}

.card-meta span:first-child {
  padding: 4px 8px;
  color: var(--blood-500);
  background: rgba(230, 57, 70, 0.14);
  border-radius: 7px;
}

.card-body h3 {
  min-height: 48px;
  margin: 12px 0 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  transition: 0.25s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-body p {
  min-height: 46px;
  margin: 0 0 18px;
  color: var(--night-400);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  display: block;
  min-height: 170px;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(230, 57, 70, 0.24), transparent 35%),
    linear-gradient(135deg, var(--night-800), var(--night-950));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.4);
  box-shadow: var(--shadow-glow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 22px;
}

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

.page-hero {
  padding: 60px 0 36px;
  background:
    radial-gradient(circle at 20% 0%, rgba(230, 57, 70, 0.22), transparent 34%),
    linear-gradient(to bottom, var(--night-850), var(--night-900));
}

.page-hero h1 {
  max-width: 980px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 900px;
  margin: 0;
  color: var(--night-400);
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--night-400);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  background: var(--night-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--night-950);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blood-600);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

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

.detail-main,
.detail-side,
.player-card,
.text-card {
  background: var(--night-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.detail-main {
  overflow: hidden;
}

.player-card {
  padding: 14px;
  margin-bottom: 20px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 14px;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28)),
    radial-gradient(circle, rgba(230, 57, 70, 0.22), transparent 44%);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-cover strong {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blood-600);
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
  font-size: 26px;
}

.play-cover span {
  font-size: 18px;
  font-weight: 700;
}

.text-card {
  padding: 24px;
  margin-top: 20px;
}

.text-card h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 24px;
}

.text-card p {
  margin: 0 0 18px;
  color: var(--night-200);
  line-height: 1.9;
}

.movie-info {
  padding: 24px;
}

.movie-info h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.movie-info .lead {
  margin: 0 0 18px;
  color: var(--night-200);
  font-size: 18px;
  line-height: 1.8;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.info-list div {
  padding: 12px;
  background: var(--night-950);
  border-radius: 12px;
  color: var(--night-400);
}

.info-list strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

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

.tag-list span {
  padding: 7px 10px;
  color: var(--blood-500);
  background: rgba(230, 57, 70, 0.13);
  border-radius: 999px;
  font-size: 13px;
}

.detail-side {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 94px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px;
  background: var(--night-950);
  border-radius: 14px;
  transition: 0.25s ease;
}

.side-item:hover {
  background: #11151b;
  box-shadow: var(--shadow-glow);
}

.side-item img {
  width: 84px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
}

.side-item h3 {
  margin: 4px 0 8px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.side-item p {
  margin: 0;
  color: var(--night-500);
  font-size: 13px;
  line-height: 1.5;
}

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

.site-footer {
  padding: 46px 0 28px;
  background: var(--night-950);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.site-footer p,
.site-footer a {
  color: var(--night-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
}

.copyright {
  width: min(var(--container), calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 24px;
  color: var(--night-500);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hidden-card {
  display: none !important;
}

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--night-850);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
  }

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

  .quick-cats {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

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