.vp-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10,15,30,.72); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: vp-fade-in .35s ease;
}
@keyframes vp-fade-in { from { opacity:0; } to { opacity:1; } }

.vp-modal {
  width: 100%; max-width: 760px;
  /* Never taller than the screen: cap width so the 16:9 video + 58px header fit the height */
  max-width: min(760px, calc((100vh - 32px - 58px) * 16 / 9));
  max-width: min(760px, calc((100dvh - 32px - 58px) * 16 / 9));
  background: #0f172a; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  animation: vp-slide-in .35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes vp-slide-in {
  from { opacity:0; transform: translateY(28px) scale(.97); }
  to   { opacity:1; transform: translateY(0)   scale(1);    }
}

/* Header bar */
.vp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, #16a34a, #15803d);
}
.vp-title {
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px;
}
.vp-title i { font-size: 1.1rem; color: #bbf7d0; }
.vp-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

/* Mute / Subscribe / Close buttons */
.vp-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: background .2s;
  border: none; cursor: pointer;
}
.vp-icon-btn:hover { background: rgba(255,255,255,.32); }

.vp-subscribe {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  background: #ff0000; color: #fff;
  font-size: .8rem; font-weight: 700; text-decoration: none;
  transition: background .2s;
}
.vp-subscribe:hover { background: #cc0000; color: #fff; }
.vp-subscribe i { font-size: 1rem; }

/* 16:9 video wrapper */
.vp-video-wrap {
  position: relative; padding-top: 56.25%;
  background: #000;
}
.vp-video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; display: block;
}

/* Loading overlay shown while iframe is loading */
.vp-loader {
  position: absolute; inset: 0; z-index: 2;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
.vp-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  animation: vp-spin .75s linear infinite;
}
@keyframes vp-spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .vp-overlay { padding: 0; align-items: flex-end; }
  .vp-modal {
    border-radius: 16px 16px 0 0; max-width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .vp-header { padding: 10px 12px; }
  .vp-title { font-size: .88rem; }
  .vp-subscribe span { display: none; }
  .vp-subscribe { padding: 6px 10px; }
}
