:root{--primary:#e50914;--bg:#0b0b0b;--card:#181818;--muted:#9ca3af}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Inter',sans-serif;background:var(--bg);color:#fff}
.hidden{display:none!important}

header{position:fixed;top:0;left:0;right:0;z-index:100;padding:1.1rem 2.5rem;
  background:linear-gradient(to bottom,rgba(0,0,0,.85),transparent)}
.logo{font-size:1.4rem;font-weight:800;color:var(--primary);cursor:pointer;
  text-shadow:0 2px 8px rgba(0,0,0,.7);width:max-content}

.hero{position:relative;height:100vh;min-height:600px;overflow:hidden;
  display:flex;align-items:center;justify-content:center}
.hero-bg{position:absolute;inset:0;background:#000 center top/cover no-repeat;
  transition:opacity 1.2s ease;opacity:0}
.hero-overlay{position:absolute;inset:0;
  background:linear-gradient(to top,var(--bg) 0%,rgba(11,11,11,.35) 50%,rgba(0,0,0,.55) 100%)}
.hero-content{position:relative;z-index:2;text-align:center;padding:0 1.2rem;max-width:950px;width:100%}
.hero-content h1{font-size:clamp(2rem,5vw,3.8rem);font-weight:800;text-shadow:0 4px 20px rgba(0,0,0,.8)}
.hero-tag{color:#d1d5db;margin:1rem auto 2.2rem;max-width:680px;line-height:1.5;min-height:1.6em;
  text-shadow:0 2px 8px rgba(0,0,0,.8)}

.hero-search{display:flex;gap:.5rem;max-width:720px;margin:0 auto;padding:.5rem;
  background:rgba(20,20,20,.75);backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.15);border-radius:60px;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.hero-search input{flex:1;background:transparent;border:none;outline:none;color:#fff;
  font-size:1.1rem;padding:.95rem 1.5rem;font-family:inherit}
.hero-search input::placeholder{color:var(--muted)}
.hero-search button{background:var(--primary);border:none;color:#fff;font-weight:700;
  font-size:1rem;padding:.9rem 2.2rem;border-radius:50px;cursor:pointer;transition:.2s}
.hero-search button:hover{background:#c40812;transform:scale(1.03)}

.row{position:relative;margin-bottom:2.4rem}
#rowsContainer .row:first-child{margin-top:-110px;z-index:5}
.row-title{font-size:1.3rem;font-weight:700;padding:0 2.5rem .8rem}
.row-wrap{position:relative}
.row-slider{display:flex;gap:.6rem;overflow-x:auto;scroll-behavior:smooth;
  padding:.6rem 2.5rem;scrollbar-width:none}
.row-slider::-webkit-scrollbar{display:none}

.row-arrow{position:absolute;top:0;bottom:0;width:46px;border:none;z-index:10;cursor:pointer;
  color:#fff;font-size:2.2rem;opacity:0;transition:opacity .2s;background:rgba(11,11,11,.6)}
.row-arrow.left{left:0;border-radius:0 6px 6px 0}
.row-arrow.right{right:0;border-radius:6px 0 0 6px}
.row-wrap:hover .row-arrow{opacity:1}
.row-arrow:hover{background:rgba(11,11,11,.85)}

.row-card{flex:0 0 auto;width:270px;aspect-ratio:16/9;border-radius:8px;overflow:hidden;
  position:relative;cursor:pointer;background:var(--card);transition:transform .25s}
.row-card:hover{transform:scale(1.08);box-shadow:0 8px 30px rgba(0,0,0,.7);z-index:2}
.row-card img{width:100%;height:100%;object-fit:cover;display:block}
.row-card-info{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;
  padding:.8rem;gap:.4rem;opacity:0;transition:opacity .25s;
  background:linear-gradient(to top,rgba(0,0,0,.92),transparent 55%)}
.row-card:hover .row-card-info{opacity:1}
.row-card-info h3{font-size:.9rem;font-weight:600}
.row-card-info .badge{position:static;align-self:flex-start}

.top10-card{flex:0 0 auto;display:flex;align-items:flex-end;cursor:pointer;transition:transform .25s}
.top10-card:hover{transform:scale(1.06)}
.top10-num{font-size:8rem;font-weight:900;line-height:.75;color:var(--bg);
  -webkit-text-stroke:3px #6b6b6b;margin-right:-20px;z-index:0;user-select:none}
.top10-poster{position:relative;z-index:1;width:130px;aspect-ratio:2/3;border-radius:8px;
  overflow:hidden;background:var(--card)}
.top10-poster img{width:100%;height:100%;object-fit:cover;display:block}

.badge{font-size:.62rem;font-weight:700;padding:.25rem .5rem;border-radius:4px;letter-spacing:.5px}
.badge.movie{background:var(--primary)} .badge.tv{background:#2563eb}
.rating{position:absolute;top:8px;right:8px;background:rgba(0,0,0,.75);color:#fbbf24;
  font-size:.7rem;font-weight:700;padding:.25rem .45rem;border-radius:4px}

.section-title{padding:2rem 2.5rem 1.2rem;font-size:1.4rem;font-weight:700}
.movie-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:1.4rem;padding:0 2.5rem 3rem}
.movie-card{cursor:pointer;transition:transform .25s}
.movie-card:hover{transform:scale(1.06)}
.poster{position:relative;aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:var(--card)}
.poster img{width:100%;height:100%;object-fit:cover;display:block}
.movie-card h3{font-size:.9rem;font-weight:600;margin-top:.6rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.year{font-size:.75rem;color:var(--muted);margin-top:.15rem}
.error-banner{grid-column:1/-1;background:#1f1f1f;border:1px solid #7f1d1d;color:#fca5a5;
  padding:2rem;border-radius:12px;text-align:center;line-height:1.7;margin:1rem 2.5rem 3rem}
.rows-loading{text-align:center;color:var(--muted);padding:3rem}

.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:1000;
  justify-content:center;align-items:center;padding:1rem}
.modal.active{display:flex}
.modal-content{width:100%;max-width:1050px;background:#141414;border-radius:1px;
  padding:0.2rem;position:relative}
#closePlayer{position:absolute;top:.8rem;right:1rem;background:none;border:none;
  color:#fff;font-size:1.4rem;cursor:pointer;z-index:2}
#playerTitle{margin-bottom:.8rem;padding-right:2rem;font-size:1.2rem}
.tv-controls{display:none;gap:.5rem;margin-bottom:.8rem;flex-wrap:wrap}
.tv-controls select{padding:.5rem .8rem;border-radius:6px;border:1px solid #333;
  background:#000;color:#fff;font-family:inherit}
.tv-controls button{padding:.5rem 1.2rem;border-radius:6px;border:none;background:var(--primary);
  color:#fff;font-weight:700;cursor:pointer}
#playerFrame{width:100%;aspect-ratio:16/9;border:none;border-radius:8px;background:#000}

#loading{display:none;position:fixed;inset:0;justify-content:center;align-items:center;
  z-index:2000;background:rgba(0,0,0,.6)}
.loader{width:44px;height:44px;border:4px solid #333;border-top-color:var(--primary);
  border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

@media(max-width:600px){
  header{padding:1rem 1.2rem}
  .hero{height:88vh;min-height:520px}
  .row-title{padding:0 1.2rem .7rem;font-size:1.1rem}
  .row-slider{padding:.5rem 1.2rem}
  .row-card{width:200px}
  .top10-num{font-size:5.5rem;margin-right:-14px}
  .top10-poster{width:100px}
  .row-arrow{width:32px;font-size:1.6rem}
  #rowsContainer .row:first-child{margin-top:-70px}
  .section-title{padding:1.8rem 1.2rem 1rem}
  .movie-grid{padding:0 1.2rem 2rem;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:1rem}
  .hero-search{flex-direction:column;border-radius:22px}
  .hero-search button{border-radius:14px}
}
/* DISCLAIMER FOOTER */
.site-footer{
  background:#0f0f0f;
  border-top:1px solid #1f1f1f;
  padding:1.2rem 1rem;
  text-align:center;
  color:#555;
  font-size:.68rem;
  line-height:1.6;
  max-width:700px;
  margin:0 auto;
}
.site-footer strong{color:#777}
.footer-note{margin-top:.4rem;color:#3a3a3a;font-size:.62rem}

@media(max-width:600px){
  .site-footer{padding:1rem .8rem;font-size:.62rem}
}
/* Fullscreen button */
#fsPlayer{position:absolute;top:.8rem;right:3.2rem;background:none;border:none;
  color:#fff;font-size:1.3rem;cursor:pointer;z-index:2}
#fsPlayer:hover{color:var(--primary)}

/* Full-screen modal experience on mobiles */
@media(max-width:768px){
  .modal{padding:0}
  .modal-content{max-width:100%;height:100%;border-radius:0;
    padding:1rem .8rem;display:flex;flex-direction:column}
  #playerTitle{font-size:1rem}
  #playerFrame{flex:1;aspect-ratio:auto;min-height:220px}
}