/* ============================================================
   NairaHD Frontend — Dark Cinema Theme
   ============================================================ */

:root {
  --gold:    #f5c518;
  --gold2:   #e6b800;
  --dark:    #050505;
  --surface: #0f0f0f;
  --card:    #161616;
  --border:  #222;
  --text:    #e8e8e8;
  --muted:   #888;
  --radius:  10px;
  --nav-h:   64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── NAVBAR ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  background: rgba(5,5,5,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -1px;
  flex-shrink: 0;
}
.nav-brand .play-icon { color: #fff; font-size: 1.2rem; margin-right: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  padding: .4rem .75rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.06); }

.nav-search {
  position: relative;
  flex-shrink: 0;
}

.nav-search input {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50px;
  padding: .45rem 1rem .45rem 2.5rem;
  font-size: .875rem;
  width: 220px;
  transition: width .3s, border-color .2s;
}
.nav-search input:focus { width: 300px; border-color: var(--gold); outline: none; background: var(--card); }
.nav-search input::placeholder { color: var(--muted); }
.nav-search .search-btn {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer; padding: 0;
}

#searchResults {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  max-height: 400px;
  overflow-y: auto;
  z-index: 999;
}

#searchResults .sr-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
#searchResults .sr-item:hover { background: rgba(255,255,255,.05); }
#searchResults .sr-item:last-child { border-bottom: none; }
#searchResults .sr-item img { width: 36px; height: 52px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
#searchResults .sr-type { font-size: .7rem; background: var(--gold); color: #000; padding: 1px 6px; border-radius: 3px; font-weight: 700; }

.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ── HERO / BANNER ────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(2px) brightness(.4);
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,5,5,.9) 0%, rgba(5,5,5,.5) 60%, transparent 100%);
}
.hero-overlay-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to top, var(--dark), transparent);
}

.hero-content {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 1.5rem 60px;
  max-width: 700px;
}

.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--gold); color: #000; font-size: .75rem; font-weight: 800; padding: .35rem .7rem; border-radius: 5px; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .5px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; letter-spacing: -1px; margin-bottom: 1rem; }
.hero-meta { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .875rem; margin-bottom: 1rem; flex-wrap: wrap; }
.hero-meta .rating { color: var(--gold); font-weight: 700; }
.hero-desc { color: #bbb; max-width: 520px; font-size: .95rem; margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn-hero-dl {
  background: var(--gold);
  color: #000;
  font-weight: 800;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .2s, transform .15s;
}
.btn-hero-dl:hover { background: var(--gold2); color: #000; transform: translateY(-1px); }

.btn-hero-info {
  background: rgba(255,255,255,.12);
  color: var(--text);
  font-weight: 700;
  padding: .75rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.15);
  display: inline-flex; align-items: center; gap: .5rem;
  transition: background .2s;
}
.btn-hero-info:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── SECTION ──────────────────────────────────────────────── */
.section { padding: 2.5rem 0; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.3px;
  display: flex; align-items: center; gap: .6rem;
}
.section-title .accent { color: var(--gold); }
.section-viewall { font-size: .8rem; color: var(--muted); font-weight: 600; transition: color .15s; }
.section-viewall:hover { color: var(--gold); }

/* ── MOVIE CARD ───────────────────────────────────────────── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  position: relative;
}
.movie-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.5); }

.movie-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.movie-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.movie-card:hover .movie-poster img { transform: scale(1.05); }

.movie-poster-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .2s;
  display: flex; align-items: center; justify-content: center;
}
.movie-card:hover .movie-poster-overlay { opacity: 1; }

.play-btn {
  width: 52px; height: 52px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: #000;
  transform: scale(.8);
  transition: transform .2s;
}
.movie-card:hover .play-btn { transform: scale(1); }

.movie-badge {
  position: absolute; top: .5rem; left: .5rem;
  font-size: .65rem; font-weight: 800;
  padding: .2rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-hd    { background: rgba(245,197,24,.9); color: #000; }
.badge-new   { background: rgba(239,68,68,.9);  color: #fff; }
.badge-trend { background: rgba(99,102,241,.9); color: #fff; }

.movie-rating {
  position: absolute; top: .5rem; right: .5rem;
  background: rgba(0,0,0,.75);
  font-size: .7rem; font-weight: 700; color: var(--gold);
  padding: .2rem .45rem;
  border-radius: 4px;
  display: flex; align-items: center; gap: .2rem;
}

.movie-info { padding: .6rem .75rem .75rem; }
.movie-title {
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .2rem;
}
.movie-meta { font-size: .72rem; color: var(--muted); display: flex; gap: .5rem; }

/* ── SKELETON ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, #1f1f1f 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.skeleton-card .movie-poster { background: var(--card); }
.skeleton-card .skeleton-title { height: 12px; margin: .6rem .75rem .3rem; border-radius: 4px; }
.skeleton-card .skeleton-meta  { height: 10px; width: 60%; margin: 0 .75rem .75rem; border-radius: 4px; }

/* ── GENRE PILLS ──────────────────────────────────────────── */
.genre-grid {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.genre-pill {
  padding: .5rem 1.1rem;
  border-radius: 50px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s;
}
.genre-pill:hover { border-color: var(--gold); color: var(--gold); background: rgba(245,197,24,.07); }

/* ── SINGLE MOVIE PAGE ────────────────────────────────────── */
.single-hero {
  position: relative;
  padding: 3rem 0 2rem;
  overflow: hidden;
}
.single-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(.25);
  transform: scale(1.1);
}
.single-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,5,.5), var(--dark));
}

.single-poster {
  width: 200px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  flex-shrink: 0;
}

.single-title { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 900; letter-spacing: -.5px; }
.single-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .875rem; align-items: center; }
.single-meta .rating-badge { background: var(--gold); color: #000; padding: .2rem .5rem; border-radius: 5px; font-weight: 800; }
.genre-tag { padding: .25rem .65rem; background: rgba(255,255,255,.07); border: 1px solid var(--border); border-radius: 50px; font-size: .75rem; color: var(--muted); }

.download-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.download-title { font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.quality-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
  transition: all .15s;
  cursor: pointer;
}
.quality-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(245,197,24,.06); }
.quality-btn.selected { background: var(--gold); color: #000; border-color: var(--gold); }

.btn-download-main {
  background: var(--gold);
  color: #000;
  font-weight: 800;
  padding: .8rem 2rem;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .2s, transform .15s;
  cursor: pointer;
}
.btn-download-main:hover { background: var(--gold2); transform: translateY(-1px); }

/* ── SERIES PAGE ──────────────────────────────────────────── */
.season-accordion .season-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  margin-bottom: .5rem;
  transition: border-color .15s;
}
.season-accordion .season-header:hover { border-color: var(--gold); }
.season-header .season-num { font-weight: 800; font-size: 1rem; }
.season-header .ep-count { font-size: .8rem; color: var(--muted); }

.episode-list { margin-bottom: .5rem; }
.episode-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.25rem;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: .35rem;
  transition: background .15s;
}
.episode-item:hover { background: rgba(255,255,255,.05); }
.ep-num { width: 36px; height: 36px; border-radius: 8px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; color: var(--gold); flex-shrink: 0; }
.ep-title { flex: 1; font-weight: 600; font-size: .875rem; }
.ep-dl-btn { padding: .35rem .8rem; background: var(--gold); color: #000; border-radius: 6px; font-size: .75rem; font-weight: 700; white-space: nowrap; transition: background .15s; }
.ep-dl-btn:hover { background: var(--gold2); color: #000; }

/* ── DOWNLOAD PAGE ────────────────────────────────────────── */
.download-page { max-width: 680px; margin: 3rem auto; padding: 0 1.5rem; }
.download-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.download-card-header { background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%); padding: 2rem; display: flex; gap: 1.5rem; align-items: flex-start; }
.dl-poster { width: 100px; border-radius: 10px; flex-shrink: 0; }
.dl-title { font-size: 1.35rem; font-weight: 800; margin-bottom: .4rem; }
.dl-meta { color: var(--muted); font-size: .85rem; }
.download-card-body { padding: 1.75rem; }
.dl-section-title { font-weight: 700; margin-bottom: .75rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.quality-option { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--surface); border: 2px solid var(--border); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; transition: border-color .15s; }
.quality-option:hover { border-color: rgba(245,197,24,.5); }
.quality-option.selected { border-color: var(--gold); background: rgba(245,197,24,.05); }
.quality-option input[type=radio] { accent-color: var(--gold); width: 18px; height: 18px; }
.quality-name { font-weight: 800; font-size: 1rem; color: var(--gold); }
.quality-size { font-size: .8rem; color: var(--muted); }

.btn-generate {
  width: 100%;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: 1.5rem;
}
.btn-generate:hover { background: var(--gold2); transform: translateY(-1px); }
.btn-generate:disabled { background: #555; color: #999; cursor: not-allowed; transform: none; }

/* ── SEARCH PAGE ──────────────────────────────────────────── */
.search-hero { padding: 3rem 0 2rem; text-align: center; }
.search-box-large { max-width: 600px; margin: 0 auto; }
.search-box-large input {
  width: 100%;
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 50px;
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: 1.05rem;
  outline: none;
  transition: border-color .2s;
}
.search-box-large input:focus { border-color: var(--gold); }
.search-box-large .search-icon { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  color: var(--muted);
  font-size: .85rem;
}

.footer-brand { font-size: 1.5rem; font-weight: 900; color: var(--gold); margin-bottom: .5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 1rem; }
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination .page-link {
  background: var(--card);
  border-color: var(--border);
  color: var(--muted);
  border-radius: 8px !important;
  min-width: 40px;
  text-align: center;
  margin: 0 2px;
}
.page-item.active .page-link { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 700; }
.page-link:hover { background: var(--surface); color: var(--text); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-search input { width: 160px; }
  .nav-search input:focus { width: 200px; }
  .single-hero { padding: 1.5rem 0; }
  .single-poster { width: 130px; }
}

@media (max-width: 575.98px) {
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
  .hero-content { padding: 50px 1.25rem 40px; }
  .hero-title { font-size: 1.75rem; }
  .download-card-header { flex-direction: column; }
}

/* ── UTILITIES ────────────────────────────────────────────── */
.text-gold { color: var(--gold) !important; }
.bg-gold   { background: var(--gold) !important; color: #000; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
