/* ===== BASE ===== */
body{
  background:#000;
  color:#fff;
  font-family:Arial, sans-serif;
  margin:0;
  padding:20px;
}

html,body{
  max-width:100%;
  overflow-x:hidden;
  box-sizing:border-box;
}

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

/* ===== VIDEO GRID ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:15px;
}

/* ===== VIDEO TILE ===== */
.video-wrap{
  position:relative;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:22px;
  background:linear-gradient(135deg,#141b33,#0d1224);
}

/* iframe */
.video-wrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  z-index:1;
  pointer-events:none; /* активира се при play */
}

/* ===== PLAY OVERLAY ===== */
.play-btn{
  position:absolute;
  inset:0;
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:center;

  background:rgba(0,0,0,.25);
  color:#fff;
  font-size:18px;
  cursor:pointer;

  transition:opacity .2s ease;
}

/* 👉 КЛЮЧОВО: overlay се маха при play */
.video-wrap.playing .play-btn{
  opacity:0;
  pointer-events:none;
}

/* ===== PAGINATION ===== */
.pagination{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(64px,1fr));
  gap:10px;
  max-width:1200px;
  margin:30px auto;
}

.pagination a{
  display:flex;
  align-items:center;
  justify-content:center;
  height:44px;
  font-weight:600;
  color:#fff;
  text-decoration:none;
  background:linear-gradient(180deg,#0b1220,#05080f);
  border:1px solid #2a2a2a;
}

.pagination a.active{
  background:#e50914;
  border-color:#e50914;
}

/* ===== FOOTER ===== */
.site-footer{
  max-width:1200px;
  margin:60px auto 20px;
  padding:20px;
  text-align:center;
  font-size:14px;
  color:#aaa;
  line-height:1.6;
  border-top:1px solid #222;
}

/* ===== MOBILE ===== */
@media (max-width:768px){
  .video-wrap{ aspect-ratio:auto; }
  .video-wrap iframe{ height:55vw; }
}

.video-id-label{
  position:absolute;
  bottom:10px;
  left:50%;
  transform:translateX(-50%);
  font-size:12px;
  color:#9ca3af;
  background:rgba(0,0,0,.55);
  padding:4px 8px;
  border-radius:6px;
  z-index:3;
  pointer-events:none;
}