/* ------------------ Floating Video ------------------ */
#floatingVideo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: 210px;
  z-index: 9999;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  background: #000;
}

#floatingVideo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

#floatingOverlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

/* ------------------ Popup Overlay ------------------ */
#videoPopup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: .3s ease;
  z-index: 10001;
}

#videoPopup.visible {
  visibility: visible;
  opacity: 1;
}

/* ------------------ Popup Content ------------------ */
#popupContent {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  transform: scale(.5);
  transition: .3s ease;
}

#videoPopup.visible #popupContent {
  transform: scale(1);
}

/* ------------------ Close Button ------------------ */
#closePopup {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 20;
}

/* ------------------ Carousel ------------------ */
#popupSlider {
  display: flex;
  transition: transform .5s ease;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  background: #000;
}

.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ------------------ Navigation Arrows ------------------ */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.14);
  color: #fff;
  border: none;
  padding: 15px;
  opacity: .8;
  font-size: 24px;
  cursor: pointer;
  z-index: 15;
}

#prevBtn { left: 5px; border-radius: 0 5px 5px 0; }
#nextBtn { right: 5px; border-radius: 5px 0 0 5px; }

@media (max-width: 768px) {
  #floatingVideo {
    width: 100px;
    height: 180px;
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  #floatingVideo {
    width: 85px;
    height: 150px;
    bottom: 10px;
    right: 10px;
  }
}
