:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --bg: #0a0a12;
  --bg2: #12121f;
  --bg3: #1a1a2e;
  --text: #fff;
  --text-muted: #a0aec0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 3rem;
  height: 62px;
  background: linear-gradient(to bottom, rgba(0,0,0,.85) 0%, transparent 100%);
  backdrop-filter: blur(4px);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 2px;
  text-decoration: none;
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: #ddd;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .4px;
  transition: color .2s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a.active { color: #a78bfa; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  border-radius: 2px;
}

.nav-links a:hover { color: #fff; }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-icon-btn {
  background: none;
  border: none;
  color: #ddd;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: color .2s, background .2s;
}
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

.nav-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ── SEARCH OVERLAY ── */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(10,10,18,.97);
  padding: 0 3rem;
  height: 62px;
  display: flex;
  align-items: center;
  transform: translateY(-100%);
  transition: transform .25s ease;
  pointer-events: none;
}
.search-overlay.active { transform: translateY(0); pointer-events: auto; }

.search-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.2);
  padding-bottom: 4px;
}

.search-box svg { color: #a78bfa; flex-shrink: 0; }

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}
.search-box input::placeholder { color: rgba(255,255,255,.35); }

.search-close {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color .2s;
}
.search-close:hover { color: #fff; }

/* ── HERO ── */
.hero {
  position: relative;
  height: 95vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  display: flex;
  align-items: flex-end;
  padding: 0 4rem 5rem;
}
.hero-slide.active { opacity: 1; }

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,.85) 40%, transparent 100%),
    linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 50%);
  z-index: 1;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(.75);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-figure {
  position: absolute;
  right: 5%;
  bottom: 0;
  height: 92%;
  width: 50%;
  z-index: 1;
  background: radial-gradient(ellipse at 60% 30%, rgba(124,58,237,.15) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-figure-inner {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(160deg, rgba(37,99,235,.1) 0%, transparent 40%),
    radial-gradient(ellipse at 55% 20%, rgba(124,58,237,.12) 0%, transparent 55%);
  position: relative;
}

.hero-mountains {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to bottom, rgba(37,99,235,.25) 0%, rgba(20,10,50,.6) 100%);
  clip-path: polygon(0% 80%, 8% 55%, 18% 70%, 30% 40%, 42% 60%, 55% 25%, 68% 50%, 80% 30%, 92% 45%, 100% 20%, 100% 100%, 0% 100%);
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  animation: heroFadeIn .8s ease both;
}

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

.hero-badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: .6rem;
  animation: shimmer 2s ease infinite;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: .93;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,.5);
}

.hero-subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-desc {
  color: #ccc;
  font-size: .98rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  max-width: 380px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-play {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #fff;
  border: none;
  padding: .75rem 1.8rem;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  text-decoration: none;
}
.btn-play:hover { opacity: .85; transform: scale(1.03); }

.btn-info {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  padding: .75rem 1.8rem;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.btn-info:hover { background: rgba(255,255,255,.25); }

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: .5rem;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.hero-dot.active { background: #7c3aed; transform: scale(1.2); }

/* ── SECTIONS ── */
section.row-section {
  padding: 2.5rem 3rem;
}

.section-title {
  font-family: 'Barlow', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: .3px;
}

/* ── CATEGORIES ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.category-card:hover { transform: scale(1.03); box-shadow: 0 8px 32px rgba(0,0,0,.5); }

.cat-bg { position: absolute; inset: 0; }

.cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
}

.cat-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  font-size: 3.5rem;
  opacity: .8;
}

.cat-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .9rem 1rem;
}

.cat-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cat-sub {
  font-size: .76rem;
  color: #bbb;
  margin-top: .1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.cat-mesh {
  position: absolute;
  top: -20px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: .25;
  filter: blur(30px);
}

/* ── CARDS ROW ── */
.cards-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
  position: relative;
}

.cards-row::-webkit-scrollbar { height: 4px; }
.cards-row::-webkit-scrollbar-track { background: transparent; }
.cards-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.movie-card {
  flex: 0 0 calc((100% - 5rem) / 6);
  min-width: 160px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.movie-card:hover { transform: scale(1.07) translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.6); z-index: 10; }

.movie-thumb {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.movie-thumb-bg {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.movie-thumb-bg img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.netflix-badge {
  position: absolute;
  top: 8px; left: 8px;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  z-index: 2;
}

.movie-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(124,58,237,.2);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
}
.movie-card:hover .movie-hover-overlay { opacity: 1; }

.play-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: #000;
}

.movie-info {
  padding: .5rem .6rem .6rem;
  background: var(--bg2);
}

.movie-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: .3rem;
}

.movie-tags { font-size: .7rem; color: var(--text-muted); }

.row-wrapper { position: relative; }
.row-arrow {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.row-arrow:hover { background: rgba(255,255,255,.25); }

/* ── FOOTER ── */
footer {
  padding: 2rem 3rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer .footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

footer p { font-size: .8rem; color: var(--text-muted); }

svg { display: block; }

@keyframes shimmer {
  0% { opacity: 1; }
  50% { opacity: .6; }
  100% { opacity: 1; }
}

.nav-hamburger { display: none; }

@media (max-width: 900px) {
  nav { padding: 0 1.2rem; gap: 1rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: rgba(10,10,18,.98);
    flex-direction: column;
    gap: 0;
    padding: .5rem 0;
    z-index: 99;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: block;
    padding: .85rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .nav-hamburger { display: flex; }

  .hero { height: 56vw; min-height: 240px; max-height: 360px; margin-top: 62px; }
  .hero-figure { display: none; }
  .hero-bg {
    background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.5) 45%, transparent 75%);
  }
  .hero-slide { padding: 0 1rem 2.2rem; }
  .hero-badge { font-size: .68rem; margin-bottom: .25rem; }
  .hero-title { font-size: 1.5rem; line-height: 1.1; }
  .hero-btns { gap: .5rem; margin-top: .5rem; }
  .btn-play, .btn-info { padding: .45rem .9rem; font-size: .8rem; gap: .35rem; }
  .hero-dots { bottom: .6rem; gap: .35rem; }
  .hero-dot { width: 5px; height: 5px; }
  section.row-section { padding: 2rem 1.2rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .category-card { aspect-ratio: 3/2; }
  .cat-icon { font-size: 2.5rem; top: 35%; }
  .cat-name { font-size: .95rem; letter-spacing: 1px; }
  .cat-sub { font-size: .68rem; }
  .cat-content { padding: .6rem .8rem; }
  .movie-card { flex: 0 0 calc((100% - 2rem) / 3); }
  footer { padding: 1.5rem 1.2rem; flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
}

/* ── SEARCH ── */
.search-wrap {
  padding: 80px 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.search-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 1.5rem;
}

.search-heading span { color: #a855f7; }

.search-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.search-grid .movie-thumb { aspect-ratio: 16/9; }

.no-results {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 2rem;
}

/* ── DETAIL ── */
.detail-wrap { padding-top: 62px; }

.player-section { background: #000; width: 100%; }

.player-container {
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16/9;
}

.player-container video { width: 100%; height: 100%; display: block; }

.info-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.8rem 1.5rem 2.5rem;
}

.info-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 2px;
  line-height: 1;
  color: #fff;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 1100px;
  margin: 0 auto;
}

.more-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.more-section .movie-thumb { aspect-ratio: 16/9; }

.row-sentinel { flex: 0 0 1px; height: 1px; align-self: stretch; }

.hidden-card { display: none; }

@media (max-width: 900px) {
  .player-container { max-width: 100%; }
  .info-section { padding: 1.2rem 1.2rem 2rem; }
  .more-section { padding: 1.5rem 1.2rem 2.5rem; }
  .search-wrap { padding-top: 80px; overflow-x: hidden; }
  .search-grid { grid-template-columns: repeat(2, 1fr); }
  .search-grid .movie-card { min-width: 0; }
}

/* ── SUBSCRIBE POPUP ── */
.subscribe-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.subscribe-overlay.active { display: flex; }

.subscribe-box {
  background: var(--bg2);
  border: 1px solid rgba(124,58,237,.35);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.subscribe-box .sub-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.subscribe-box h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 1px;
  margin-bottom: .6rem;
}

.subscribe-box p {
  color: var(--text-muted);
  font-size: .93rem;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.btn-subscribe {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: .75rem 2.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s;
  width: 100%;
}

.btn-subscribe:hover { opacity: .85; }

.btn-sub-close {
  display: block;
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  transition: color .2s;
}

.btn-sub-close:hover { color: var(--text); }
