:root{
  --bg: #0b0c0f;
  --bg-alt: #131519;
  --card: #16181d;
  --text: #eceef1;
  --muted: #8b909c;
  --accent: #e8b04b;      /* amber gold */
  --accent-2: #ff5d5d;    /* coral */
  --border: #24262c;
  --radius: 10px;
  --maxw: 1200px;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  opacity: 0;
  animation: bodyFadeIn .5s ease forwards;
}
@keyframes bodyFadeIn{ to{ opacity: 1; } }

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.logo{
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}
.logo span{ color: var(--accent); }

/* ---------- Header ---------- */
.site-header{
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top{
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
}

.main-nav{
  display: flex;
  gap: 1.6rem;
  flex: 1;
  justify-content: center;
}

.main-nav a{
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active{
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions{ display: flex; align-items: center; gap: 0.8rem; }

.search-box{
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem;
}
.search-box input{
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.85rem;
  width: 160px;
}
.search-box input::placeholder{ color: var(--muted); }
.search-box button{
  background: var(--accent);
  color: #1a1a1a;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.menu-toggle span{
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.ticker{
  background: #1c1300;
  color: var(--accent);
  font-size: 0.78rem;
  padding: 0.4rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker span{
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 22s linear infinite;
}
@keyframes scroll-left{
  from{ transform: translateX(0); }
  to{ transform: translateX(-100%); }
}

/* ---------- Hero ---------- */
.hero{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 1.5rem;
}
.eyebrow{
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.hero h1{
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 700px;
}
.hero h1 span{
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift{
  to{ background-position: 200% center; }
}
.hero-sub{
  color: var(--muted);
  margin-top: 1rem;
  font-size: 1rem;
  max-width: 480px;
}

/* ---------- Filters ---------- */
.filters{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.5rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.chip{
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all .2s;
}
.chip:hover{ color: var(--text); border-color: var(--accent); }
.chip.active{
  background: var(--accent);
  color: #1a1400;
  border-color: var(--accent);
}

/* ---------- Movie grid ---------- */
.movies-section{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}
.section-title{
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  padding-left: 0.6rem;
  border-left: 4px solid var(--accent-2);
}

.movie-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.4rem;
}

.movie-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  display: block;
}
.movie-card:hover{
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6);
}

.poster-wrap{
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #000;
}
.poster-wrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .4s ease;
}
.movie-card:hover .poster-wrap img{
  transform: scale(1.07);
  opacity: 0.55;
}

.play-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.movie-card:hover .play-overlay{ opacity: 1; }
.play-overlay .play-btn{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e8b04b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 10px 40px rgb(255, 254, 254); 
    /* box-shadow: 0 8px 20px rgb(255, 254, 254);  */
}

.badge{
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.7);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-body{ padding: 0.75rem 0.85rem 0.95rem; }
.card-title{
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta{
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-meta .rating{ color: var(--accent); font-weight: 600; }

.empty-state{
  grid-column: 1/-1;
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

/* ---------- Year section ---------- */
.year-section{
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 2rem 1.5rem 1rem;
}
.section-sub{
  color: var(--muted);
  font-size: 0.85rem;
  margin: -0.6rem 0 1.3rem 0.6rem;
}
.year-tabs{
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.year-tab{
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.55rem 1.3rem;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all .2s;
}
.year-tab:hover{ color: var(--text); border-color: var(--accent); }
.year-tab.active{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.year-search-box{
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  max-width: 380px;
  margin-bottom: 1.5rem;
}
.year-search-box input{
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
}
.year-search-box input::placeholder{ color: var(--text;) }
.year-search-box button{
  background: var(--text);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Scroll reveal animations (driven by IntersectionObserver in JS) ---------- */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.21,.6,.35,1), transform .65s cubic-bezier(.21,.6,.35,1);
}
.reveal.visible{
  opacity: 1;
  transform: translateY(0);
}

.movie-card.reveal{
  transition-delay: var(--reveal-delay, 0ms);
}

.hero-compact{
  padding-top: 2.6rem;
  padding-bottom: 0.5rem;
}

/* subtle looping pulse on the play button so cards feel alive, not static */
@keyframes pulse-ring{
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,1); }
  70%  { box-shadow: 0 0 0 12px rgba(255,93,93,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,93,93,0); }
}
.movie-card:hover .play-btn{
  animation: pulse-ring 1.4s ease-out infinite;
}

/* logo micro-interaction */
.logo{ transition: opacity .2s ease; }
.logo:hover{ opacity: 0.8; }

/* chip / tab press feedback */
.chip, .year-tab{ transition: all .2s ease, transform .1s ease; }
.chip:active, .year-tab:active{ transform: scale(0.95); }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Pagination ---------- */
.pagination{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination button{
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0.6rem;
}
.pagination button:hover{ border-color: var(--accent); color: var(--text); }
.pagination button.active{
  background: var(--accent);
  color: #1a1400;
  border-color: var(--accent);
}
.pagination button:disabled{ opacity: 0.4; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-top{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p{
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.9rem 0 1.2rem;
  max-width: 320px;
}
.yt-btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-2);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
}
.footer-links h4{
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.footer-links a{
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 0.65rem;
}
.footer-links a:hover{ color: var(--accent); }

.footer-bottom{
  border-top: 1px solid var(--border);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px){
  .movie-grid{ grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px){
  .movie-grid{ grid-template-columns: repeat(3, 1fr); }
  .footer-top{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1/-1; }
}

@media (max-width: 700px){
  .main-nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    display: none;
    gap: 0.9rem;
  }
  .main-nav.open{ display: flex; }
  .menu-toggle{ display: flex; }
  .search-box{ display: none; }
  .hero{ padding-top: 2rem; }
}

@media (max-width: 560px){
  .movie-grid{ grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-top{ grid-template-columns: 1fr; }
  .year-search-box{ max-width: 100%; }
}

@media (max-width: 380px){
  .movie-grid{ grid-template-columns: 1fr 1fr; }
  .card-title{ font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  body{ opacity: 1 !important; }
}