.youtube-popup-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.youtube-popup-lightbox.is-open {
  display: flex;
  opacity: 1;
}

.youtube-popup-lightbox__container {
  position: relative;
  width: min(90vw, 1280px, 90vh * 16 / 9);
  max-height: 90vh;
  aspect-ratio: 16 / 9;
  height: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.youtube-popup-lightbox.is-open .youtube-popup-lightbox__container {
  transform: scale(1);
}

@media (max-height: 600px) {
  .youtube-popup-lightbox__container {
    max-height: 85vh;
    width: min(95vw, 85vh * 16 / 9);
  }
}

.youtube-popup-lightbox__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.youtube-popup-lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1000000;
}

.youtube-popup-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.youtube-popup-lightbox__close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .youtube-popup-lightbox__container {
    width: 95%;
    max-height: 85vh;
  }

  .youtube-popup-lightbox__close {
    top: 10px;
    right: 10px;
    font-size: 32px;
    width: 40px;
    height: 40px;
  }
}
