:root {
  --night-950: #050607;
  --night-900: #0d0f12;
  --night-850: #14171c;
  --night-800: #1a1d23;
  --night-700: #212529;
  --night-500: #6c757d;
  --night-400: #adb5bd;
  --night-300: #ced4da;
  --night-200: #e9ecef;
  --blood-700: #b91f2d;
  --blood-600: #e63946;
  --blood-500: #ff4d5c;
  --gold-500: #eab308;
  --panel: rgba(26, 29, 35, 0.84);
  --border: rgba(255, 255, 255, 0.08);
  --glow: 0 0 20px rgba(255, 77, 77, 0.3);
  --glow-soft: 0 0 10px rgba(255, 77, 77, 0.2);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 18% 0%, rgba(230, 57, 70, 0.12), transparent 34%), var(--night-900);
  color: var(--night-200);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 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);
}

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

.site-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #fff;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blood-600), var(--blood-700));
  box-shadow: var(--glow-soft);
  color: #fff;
  font-weight: 900;
}

.logo-text {
  font-size: 20px;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.site-brand:hover .logo-text {
  color: var(--blood-500);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--night-300);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--blood-600);
  color: #fff;
  box-shadow: var(--glow-soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--night-800);
  cursor: pointer;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #000;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--night-900) 0%, rgba(13, 15, 18, 0.72) 42%, rgba(13, 15, 18, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 56px 0 72px;
}

.hero-inner {
  max-width: 840px;
}

.eyebrow,
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blood-600);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--glow-soft);
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

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

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-ghost,
.card-action,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  padding: 12px 24px;
  background: var(--blood-600);
  color: #fff;
  box-shadow: var(--glow-soft);
}

.btn-primary:hover,
.card-action:hover,
.section-more:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--glow);
}

.btn-ghost {
  padding: 11px 22px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: var(--night-800);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.78);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.page-hero {
  padding: 68px 0 34px;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.16), rgba(5, 6, 7, 0));
}

.page-hero h1 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.16;
}

.page-hero p {
  max-width: 820px;
  color: var(--night-300);
  font-size: 18px;
  line-height: 1.75;
}

.content-section {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 30px;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--night-400);
}

.section-more,
.card-action {
  padding: 9px 14px;
  background: rgba(230, 57, 70, 0.18);
  color: var(--blood-500);
  border: 1px solid rgba(230, 57, 70, 0.28);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 29, 35, 0.94), rgba(13, 15, 18, 0.94));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--night-800);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--blood-600);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--glow-soft);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--night-400);
  font-size: 13px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--night-300);
  line-height: 1.65;
}

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

.tag-list span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.14);
  color: #ffb0b7;
  font-size: 13px;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card-horizontal .poster-link {
  min-height: 100%;
  aspect-ratio: auto;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(230, 57, 70, 0.16), rgba(26, 29, 35, 0.92));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.42);
}

.category-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
}

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

.category-card span {
  margin-top: 18px;
  color: var(--blood-500);
  font-weight: 700;
}

.search-panel {
  padding: 34px 0 0;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.search-box h2 {
  margin: 0 0 8px;
  color: #fff;
}

.search-box p {
  margin: 0;
  color: var(--night-400);
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--night-950);
  color: #fff;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--blood-600);
  box-shadow: var(--glow-soft);
}

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

.watch-section {
  padding: 34px 0 64px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(230, 57, 70, 0.22);
  border-radius: 22px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover {
  width: 100%;
  height: 100%;
}

.player-shell video {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blood-600);
  color: #fff;
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: var(--glow);
}

.detail-panel,
.side-panel,
.text-panel {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.detail-panel {
  margin-top: 24px;
  padding: 26px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.18;
}

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

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

.detail-panel p,
.text-panel p,
.side-panel p {
  color: var(--night-300);
  line-height: 1.85;
}

.text-panel {
  margin-top: 24px;
  padding: 26px;
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
}

.side-panel {
  padding: 22px;
}

.side-panel + .side-panel {
  margin-top: 22px;
}

.side-poster {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 16px;
  aspect-ratio: 16 / 11;
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.25s ease, transform 0.25s ease;
}

.related-item:hover {
  background: rgba(230, 57, 70, 0.14);
  transform: translateX(3px);
}

.related-item img {
  width: 82px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong {
  display: block;
  color: #fff;
  line-height: 1.4;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--night-400);
  font-size: 13px;
}

.breadcrumb {
  margin-bottom: 16px;
  color: var(--night-400);
}

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

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--night-800);
  background: var(--night-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 34px 0;
}

.footer-grid p {
  max-width: 620px;
  color: var(--night-400);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--night-300);
}

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

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid var(--night-800);
  color: var(--night-500);
  text-align: center;
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--night-300);
  text-align: center;
  background: var(--panel);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

.hero-inner,
.page-hero .container-custom,
.movie-card,
.category-card {
  animation: slideUp 0.55s ease both;
}

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

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

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

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(13, 15, 18, 0.98);
    box-shadow: var(--shadow-card);
  }

  .site-nav.is-open {
    display: flex;
    animation: fadeIn 0.25s ease;
  }

  .nav-link {
    width: 100%;
  }

  .hero-slider {
    height: 68vh;
    min-height: 500px;
  }

  .hero-control {
    display: none;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal {
    display: block;
  }

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

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

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 22px, 1280px);
  }

  .logo-text {
    font-size: 16px;
  }

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

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

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

  .detail-panel,
  .text-panel,
  .side-panel {
    padding: 18px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
