:root {
  color-scheme: dark;
  --site-bg: #020617;
  --site-panel: rgba(15, 23, 42, 0.78);
  --site-panel-strong: rgba(15, 23, 42, 0.94);
  --site-border: rgba(34, 211, 238, 0.18);
  --site-text: #f8fafc;
  --site-muted: #94a3b8;
  --site-cyan: #22d3ee;
  --site-blue: #3b82f6;
  --site-orange: #fb923c;
  --site-pink: #f472b6;
  --site-emerald: #34d399;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.16), transparent 36rem),
    radial-gradient(circle at 85% 24%, rgba(59, 130, 246, 0.14), transparent 34rem),
    var(--site-bg);
}

img {
  background: rgba(15, 23, 42, 0.8);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--site-border);
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(34, 211, 238, 0.06);
}

.site-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: fit-content;
}

.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: #001018;
  font-weight: 900;
  background: linear-gradient(135deg, var(--site-cyan), var(--site-blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.32);
}

.brand-title {
  display: block;
  font-size: 1.22rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #e0faff, var(--site-cyan), #dbeafe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: rgba(34, 211, 238, 0.66);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.62rem 0.9rem;
  border-radius: 0.85rem;
  color: #cbd5e1;
  font-size: 0.92rem;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.search-form {
  position: relative;
  flex: 1;
  max-width: 30rem;
}

.search-input,
.filter-input {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 0.8rem 3.1rem 0.8rem 1.1rem;
  color: var(--site-text);
  background: rgba(15, 23, 42, 0.7);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-input:focus,
.filter-input:focus {
  border-color: var(--site-cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-button {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.75rem;
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.mobile-toggle {
  display: none;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 0.9rem;
  padding: 0.55rem 0.75rem;
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.08);
}

.mobile-panel {
  display: none;
  padding: 0 0 1rem;
  border-top: 1px solid rgba(34, 211, 238, 0.14);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel .nav-link {
  display: block;
  margin-top: 0.35rem;
}

.page-main {
  min-height: 68vh;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 680ms ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 52rem;
  padding: 6rem 0 5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  color: var(--site-cyan);
  font-weight: 700;
}

.hero-title {
  margin: 0 0 1.2rem;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #ffffff, #cffafe, #e0f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 42rem;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.75;
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.hero-meta {
  margin: 1.5rem 0 2rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.82rem;
}

.meta-pill.accent {
  border-color: rgba(34, 211, 238, 0.32);
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cta-primary {
  color: white;
  background: linear-gradient(90deg, var(--site-cyan), var(--site-blue));
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.25);
}

.cta-secondary {
  border: 1px solid rgba(34, 211, 238, 0.24);
  color: #dffbff;
  background: rgba(15, 23, 42, 0.72);
}

.cta-primary:hover,
.cta-secondary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

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

.hero-dot {
  width: 0.6rem;
  height: 0.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 2.4rem;
  background: var(--site-cyan);
}

.section-block {
  padding: 3.2rem 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  margin-top: 0.45rem;
  color: var(--site-muted);
  line-height: 1.75;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  padding: 0.72rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 22px 45px rgba(34, 211, 238, 0.1);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #0f172a;
}

.poster-frame.portrait {
  aspect-ratio: 2 / 3;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms ease;
}

.movie-card:hover .poster-frame img,
.rank-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

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

.badge,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.badge {
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.26rem 0.55rem;
  color: white;
  background: rgba(2, 6, 23, 0.86);
}

.rank-badge {
  left: 0.55rem;
  top: 0.55rem;
  padding: 0.26rem 0.58rem;
  color: #08111d;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(34, 211, 238, 0.85);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.movie-title {
  margin: 0.8rem 0 0.3rem;
  color: white;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.36;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .movie-title {
  color: var(--site-cyan);
}

.movie-card .movie-meta {
  color: var(--site-muted);
  font-size: 0.78rem;
}

.movie-one-line {
  margin-top: 0.55rem;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.horizontal-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(17rem, 22rem);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scroll-snap-type: x proximity;
}

.horizontal-scroller > * {
  scroll-snap-align: start;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 1.2rem;
  padding: 1.1rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.35));
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
}

.category-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-count {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.category-card p {
  color: var(--site-muted);
  line-height: 1.65;
}

.page-hero {
  padding: 5rem 0 2.2rem;
  background:
    linear-gradient(180deg, rgba(8, 47, 73, 0.22), transparent),
    radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.16), transparent 22rem);
}

.page-title {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--site-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--site-cyan);
}

.filter-panel {
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 1.2rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.62);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  font-size: 0.85rem;
}

.filter-tag:hover,
.filter-tag.is-active {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--site-cyan);
  background: rgba(34, 211, 238, 0.1);
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.rank-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  padding: 0.7rem;
  background: rgba(15, 23, 42, 0.76);
}

.rank-card .poster-frame {
  aspect-ratio: 16 / 10;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 2.5rem;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.23;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 58%, rgba(2, 6, 23, 0.42) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2rem;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 1.2rem;
  background: #0f172a;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.42);
}

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

.detail-title {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 1.15rem;
  background: black;
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.12);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5rem;
  height: 5rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(34, 211, 238, 0.86);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.big-play:hover {
  background: rgba(34, 211, 238, 1);
  transform: translate(-50%, -50%) scale(1.06);
}

.video-shell.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-state {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  right: 1rem;
  border-radius: 0.8rem;
  padding: 0.72rem 0.9rem;
  color: #dbeafe;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.42));
  font-size: 0.86rem;
}

.info-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1.15rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.74);
}

.info-panel h2,
.side-panel h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.info-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-item {
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.08);
  font-size: 0.8rem;
}

.related-list {
  display: grid;
  gap: 0.75rem;
}

.related-card {
  display: grid;
  grid-template-columns: 5.8rem 1fr;
  gap: 0.75rem;
  align-items: center;
  border-radius: 0.9rem;
  padding: 0.55rem;
  background: rgba(2, 6, 23, 0.36);
}

.related-card .poster-frame {
  aspect-ratio: 16 / 10;
  border-radius: 0.65rem;
}

.related-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.related-card p {
  color: var(--site-muted);
  font-size: 0.78rem;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(2, 6, 23, 0.94);
}

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

.footer-title {
  margin: 0 0 0.8rem;
  font-weight: 900;
  font-size: 1.1rem;
}

.footer-text,
.footer-links a {
  color: var(--site-muted);
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: var(--site-cyan);
}

.empty-state {
  display: none;
  border: 1px dashed rgba(34, 211, 238, 0.22);
  border-radius: 1rem;
  padding: 2rem;
  color: var(--site-muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (min-width: 1280px) {
  .movie-grid.compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .primary-nav,
  .desktop-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .site-nav-wrap {
    min-height: 4.2rem;
  }

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

@media (max-width: 767px) {
  .hero-carousel {
    min-height: 74vh;
  }

  .hero-content {
    padding: 5rem 0 4.5rem;
  }

  .section-head {
    display: block;
  }

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

  .detail-poster {
    max-width: 12rem;
  }

  .rank-card {
    grid-template-columns: 6rem 1fr;
  }

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