:root {
  --site-bg: #020617;
  --site-panel: rgba(15, 23, 42, 0.72);
  --site-panel-strong: rgba(15, 23, 42, 0.94);
  --site-border: rgba(148, 163, 184, 0.16);
  --site-red: #ef4444;
  --site-red-dark: #b91c1c;
  --site-text: #f8fafc;
  --site-muted: #94a3b8;
  --site-soft: #cbd5e1;
  --site-glow: 0 30px 80px rgba(239, 68, 68, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--site-text);
}

img {
  object-fit: cover;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 1280px;
  height: 5rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 0 34px rgba(239, 68, 68, 0.42);
  font-size: 0.95rem;
}

.brand-text {
  font-size: clamp(1.05rem, 1vw + 0.8rem, 1.55rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.quick-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-search input,
.mobile-search input,
.quick-search input,
.filter-panel input {
  width: min(20vw, 18rem);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  padding: 0.78rem 1rem;
  color: #ffffff;
  outline: none;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search input:focus,
.filter-panel input:focus {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.header-search button,
.mobile-search button,
.quick-search button,
.filter-panel button,
.primary-btn,
.ghost-btn,
.tile-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.quick-search button,
.primary-btn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(239, 68, 68, 0.26);
}

.header-search button:hover,
.mobile-search button:hover,
.quick-search button:hover,
.filter-panel button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.tile-more:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  gap: 0.35rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.82);
}

.menu-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0 auto;
  background: #ffffff;
}

.mobile-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.96);
  padding: 1rem;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  padding: 0.8rem 0;
}

.mobile-search {
  margin-top: 0.75rem;
}

.mobile-search input {
  width: 100%;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: clamp(680px, 82vh, 880px);
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-track,
.hero-slide,
.hero-backdrop,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop {
  background-position: center;
  background-size: cover;
  transform: scale(1.08);
  filter: blur(12px) saturate(1.12);
  opacity: 0.28;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.3), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.62fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 1280px;
  min-height: clamp(680px, 82vh, 880px);
  margin: 0 auto;
  padding: 7rem 1rem 4rem;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.13);
  padding: 0.35rem 0.8rem;
  color: #fecaca;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 7vw, 6.8rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 42rem;
  margin-top: 1.35rem;
  color: #cbd5e1;
  font-size: clamp(1rem, 1vw + 0.75rem, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags {
  margin-top: 1.5rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem 0.72rem;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.ghost-btn,
.filter-panel button,
.tile-more {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
}

.hero-poster {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2rem;
  box-shadow: var(--site-glow), 0 35px 95px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 56%, rgba(2, 6, 23, 0.6));
  pointer-events: none;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

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

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2.5rem;
  background: #ef4444;
}

.quick-search-section {
  max-width: 1280px;
  margin: -2rem auto 0;
  padding: 0 1rem 2rem;
  position: relative;
  z-index: 5;
}

.quick-search {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.92);
  padding: 0.7rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.quick-search input {
  flex: 1;
  width: auto;
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.86);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.category-pills a {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  padding: 0.62rem 1rem;
  color: #dbeafe;
  font-size: 0.92rem;
  font-weight: 700;
}

.category-pills a:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.8rem) 1rem;
}

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

.section-heading span {
  display: block;
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 2vw, 2.4rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #fca5a5;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 1.35rem;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(15, 23, 42, 0.9);
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.92));
}

.quality-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.quality-pill {
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(239, 68, 68, 0.95);
  padding: 0.24rem 0.55rem;
  font-size: 0.68rem;
}

.rank-badge {
  left: 0.7rem;
  top: 0.7rem;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #b91c1c);
  font-size: 0.78rem;
}

.card-body {
  padding: 0.95rem;
}

.card-body h2 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 850;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h2 a:hover {
  color: #fca5a5;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.35rem;
  color: #475569;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.8em;
  margin-top: 0.75rem;
  color: #aab6c8;
  font-size: 0.83rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 0.75rem;
}

.tag-row span {
  padding: 0.22rem 0.5rem;
  color: #fecaca;
  font-size: 0.68rem;
}

.horizontal-row {
  display: grid;
  grid-auto-columns: minmax(170px, 1fr);
  grid-auto-flow: column;
  gap: 1.1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scroll-snap-type: x mandatory;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.44);
}

.category-tile a {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 100%;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  padding: 0.75rem;
}

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0.85rem;
}

.category-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem;
}

.category-info h2 {
  font-size: 1.35rem;
  font-weight: 900;
}

.category-info p {
  margin-top: 0.55rem;
  color: #aab6c8;
  line-height: 1.65;
}

.category-info ul {
  margin-top: 0.8rem;
  color: #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.8;
}

.tile-more {
  align-self: flex-start;
  margin-top: 1rem;
  min-height: auto;
  padding: 0.55rem 0.9rem;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.slim-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.26), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
}

.page-hero-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 9rem 1rem 4rem;
}

.page-hero h1 {
  max-width: 18ch;
}

.filter-panel {
  max-width: 760px;
  margin-top: 2rem;
}

.filter-panel input {
  flex: 1;
  width: auto;
  border-radius: 1rem;
}

.search-page-panel {
  margin-top: 2rem;
}

.detail-hero {
  min-height: 660px;
  padding-top: 5rem;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(14px) saturate(1.08);
  opacity: 0.24;
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, #020617 0%, transparent 44%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.2rem 1rem 4rem;
}

.breadcrumb,
.breadcrumb-sep {
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 700;
}

.breadcrumb:hover {
  color: #ffffff;
}

.breadcrumb-sep {
  margin: 0 0.45rem;
  color: #64748b;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.8rem, 5vw, 4rem);
  margin-top: 2.2rem;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.6rem;
  box-shadow: var(--site-glow), 0 30px 90px rgba(0, 0, 0, 0.46);
}

.detail-poster img {
  width: 100%;
  height: 100%;
}

.detail-copy h1 {
  max-width: 16ch;
}

.detail-meta,
.detail-tags {
  margin-top: 1.15rem;
}

.detail-copy .primary-btn {
  margin-top: 1.8rem;
}

.detail-section {
  padding-top: 3.2rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.5rem;
  background: #000000;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.45);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: clamp(4.5rem, 9vw, 7rem);
  height: clamp(4.5rem, 9vw, 7rem);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.96), rgba(153, 27, 27, 0.96));
  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 24px 80px rgba(239, 68, 68, 0.34);
}

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

.story-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.72);
  padding: clamp(1.2rem, 2vw, 2rem);
}

.story-card h2 {
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.story-card p {
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.footer-brand {
  margin-bottom: 0.7rem;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

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

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

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

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 980px) {
  .header-search {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 6.5rem;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-main {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .header-inner {
    height: 4.2rem;
  }

  .brand-mark {
    width: 2.2rem;
    height: 2.2rem;
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.1rem, 13vw, 4rem);
  }

  .hero-actions,
  .quick-search,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-search input,
  .filter-panel input {
    width: 100%;
  }

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

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

  .card-body {
    padding: 0.75rem;
  }

  .card-body h2 {
    font-size: 0.92rem;
  }

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

  .category-tile a {
    grid-template-columns: 1fr;
  }

  .category-posters {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-hero-content {
    padding-top: 7rem;
  }

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

  .detail-poster {
    max-width: 240px;
  }
}

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tag-row span:nth-child(n + 3) {
    display: none;
  }
}
