* {
  box-sizing: border-box;
}

:root {
  --night-950: #08090b;
  --night-900: #0d0f12;
  --night-850: #11151a;
  --night-800: #1a1d23;
  --night-700: #212529;
  --night-500: #495057;
  --night-400: #6c757d;
  --night-300: #adb5bd;
  --night-200: #dee2e6;
  --blood-700: #9d0208;
  --blood-600: #c1121f;
  --blood-500: #e63946;
  --blood-400: #ff4d4d;
  --gold: #eab308;
  --glow: 0 0 20px rgba(255, 77, 77, 0.3);
  --glow-sm: 0 0 10px rgba(255, 77, 77, 0.2);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-900);
  color: var(--night-200);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 800;
}

.brand:hover .brand-text {
  color: var(--blood-400);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--blood-500), var(--blood-700));
  box-shadow: var(--glow-sm);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-top: 0.45rem solid transparent;
  border-bottom: 0.45rem solid transparent;
  border-left: 0.72rem solid #fff;
}

.brand-text {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a,
.mobile-panel a {
  color: var(--night-300);
  border-radius: 0.65rem;
  padding: 0.65rem 0.9rem;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.nav-links a.active,
.mobile-panel a.active {
  color: #fff;
  background: var(--blood-600);
  box-shadow: var(--glow-sm);
}

.mobile-menu-button {
  display: none;
  border: 0;
  border-radius: 0.65rem;
  background: var(--night-800);
  color: #fff;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 15, 18, 0.98);
}

.mobile-panel.open {
  display: flex;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 35rem;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18)), linear-gradient(0deg, var(--night-900), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 48rem;
  animation: slideUp 0.6s ease both;
}

.hero-kicker,
.detail-category {
  width: fit-content;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.18);
  color: var(--blood-400);
  padding: 0.42rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  margin: 1rem 0;
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.65);
}

.hero-content p {
  max-width: 46rem;
  margin: 0 0 1.25rem;
  color: var(--night-200);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.75;
}

.hero-tags,
.detail-tags,
.card-tags,
.card-meta,
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-tags span,
.detail-tags span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.35rem 0.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  min-height: 2.8rem;
  padding: 0.75rem 1.3rem;
  font-weight: 700;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.btn-primary {
  border: 0;
  background: var(--blood-500);
  color: #fff;
  box-shadow: 0 10px 28px rgba(230, 57, 70, 0.25);
  cursor: pointer;
}

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

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(230, 57, 70, 0.7);
  background: rgba(230, 57, 70, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-control:hover {
  background: rgba(193, 18, 31, 0.86);
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 2rem;
  background: var(--blood-500);
}

.home-search {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #12161d, var(--night-900));
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  padding: 2rem 0;
}

.search-panel h2,
.page-hero-small h1,
.section-heading h2,
.detail-info h1 {
  margin: 0;
  color: #fff;
}

.search-panel p,
.section-heading p,
.page-hero-small p,
.detail-info p,
.detail-section p,
.category-overview-card p,
.category-card p,
.site-footer p {
  color: var(--night-300);
  line-height: 1.75;
}

.search-form,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  outline: none;
  background: var(--night-800);
  color: #fff;
  padding: 0.85rem 1rem;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(230, 57, 70, 0.7);
  box-shadow: var(--glow-sm);
}

.category-chips a {
  border-radius: 999px;
  background: var(--night-800);
  color: var(--night-300);
  padding: 0.45rem 0.82rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.category-chips a:hover {
  background: var(--blood-600);
  color: #fff;
}

.page-sections,
.inner-page {
  padding-block: 3.5rem;
}

.page-sections {
  display: grid;
  gap: 4rem;
}

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

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-heading p {
  margin: 0.35rem 0 0;
}

.section-more {
  min-height: 2.4rem;
  background: rgba(230, 57, 70, 0.14);
  color: var(--blood-400);
  padding: 0.55rem 0.9rem;
}

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

.movie-list {
  display: grid;
  gap: 1.2rem;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  background: var(--night-800);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.movie-card:hover {
  border-color: rgba(230, 57, 70, 0.35);
  box-shadow: var(--shadow-xl), var(--glow-sm);
  transform: translateY(-0.25rem);
}

.movie-card-landscape {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
}

.card-image {
  position: relative;
  display: block;
  height: 17rem;
  overflow: hidden;
  background: #000;
}

.card-image-wide {
  height: 100%;
  min-height: 12rem;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .card-image img {
  transform: scale(1.08);
  filter: brightness(0.78);
}

.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
}

.duration-pill {
  right: 0.65rem;
  bottom: 0.65rem;
}

.rank-badge {
  left: 0.65rem;
  top: 0.65rem;
  min-width: 2rem;
  text-align: center;
  background: var(--blood-600);
  font-weight: 800;
  box-shadow: var(--glow-sm);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--blood-600);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  box-shadow: var(--glow);
}

.card-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.card-tags a,
.card-tags span {
  border-radius: 0.35rem;
  background: rgba(230, 57, 70, 0.14);
  color: var(--blood-400);
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
}

.card-tags span {
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold);
}

.card-body h3 {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--blood-400);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.2rem;
  overflow: hidden;
  margin: 0;
  color: var(--night-300);
  font-size: 0.92rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  justify-content: space-between;
  color: var(--night-400);
  font-size: 0.86rem;
}

.category-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.category-card,
.category-overview-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(26, 29, 35, 0.98), rgba(13, 15, 18, 0.96));
  padding: 1.2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: rgba(230, 57, 70, 0.42);
  box-shadow: var(--glow-sm);
  transform: translateY(-0.2rem);
}

.category-card span,
.category-title {
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  margin: 0.65rem 0 0;
}

.category-samples {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.category-samples a {
  color: var(--night-300);
}

.category-samples a:hover {
  color: var(--blood-400);
}

.inner-page {
  min-height: 60vh;
}

.page-hero-small {
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1.1rem;
  background: radial-gradient(circle at 20% 10%, rgba(230, 57, 70, 0.2), transparent 34%), linear-gradient(135deg, var(--night-800), var(--night-950));
  padding: clamp(1.5rem, 4vw, 3rem);
}

.page-hero-small h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.filter-panel {
  grid-template-columns: minmax(0, 1.5fr) minmax(11rem, 0.45fr) minmax(9rem, 0.35fr);
  margin-bottom: 1.8rem;
}

.movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.4rem;
  color: var(--night-400);
  font-size: 0.92rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.poster-box {
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
  box-shadow: var(--shadow-xl);
}

.poster-box img {
  aspect-ratio: 2 / 3;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: grid;
  gap: 1rem;
}

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.15;
}

.player-section {
  margin-bottom: 2rem;
}

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

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
  color: #fff;
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: var(--blood-600);
  box-shadow: var(--glow);
  font-size: 2rem;
  padding-left: 0.2rem;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-section {
  margin-top: 2.5rem;
}

.detail-section h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.75rem;
}

.detail-section p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--night-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-brand {
  margin-bottom: 1rem;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.1rem;
}

.footer-links {
  display: grid;
  gap: 0.65rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--night-400);
  padding: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hero-carousel {
    height: 68vh;
    min-height: 32rem;
  }

  .hero-control {
    display: none;
  }

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

  .movie-card-landscape,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-image-wide {
    height: 14rem;
  }

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

  .poster-box {
    max-width: 20rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 1rem, 80rem);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

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

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

  .card-image {
    height: 15rem;
  }

  .page-sections,
  .inner-page {
    padding-block: 2rem;
  }
}
