/* Estilos para el popup de streaming - Sistema independiente */
.stream-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.stream-popup-overlay.stream-popup-show {
  opacity: 1;
  visibility: visible;
}

.stream-popup-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: 20px;
  transform: scale(0.8) translateY(50px);
  transition: all 0.4s ease;
}

.stream-popup-overlay.stream-popup-show .stream-popup-container {
  transform: scale(1) translateY(0);
}

.stream-popup-content {
  position: relative;
  background: linear-gradient(135deg, #141e30, #243b55);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 215, 0, 0.3);
}

/* Botón de cierre */
.stream-popup-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ffd700, #ffc800);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: #1c1c1c;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.stream-popup-close:hover {
  background: linear-gradient(135deg, #ffc800, #ffb700);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.stream-popup-close span {
  line-height: 1;
  margin-top: -2px;
}

/* Contenedor de imagen */
.stream-popup-image-container {
  position: relative;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
}

.stream-popup-image {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  transition: opacity 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Controles de navegación */
.stream-popup-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.stream-popup-nav-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 200, 0, 0.9));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #1c1c1c;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(10px);
}

.stream-popup-nav-btn:hover {
  background: linear-gradient(135deg, #ffd700, #ffc800);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.stream-popup-nav-btn span {
  line-height: 1;
  margin-top: -2px;
}

/* Indicador de posición */
.stream-popup-indicator {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(28, 28, 28, 0.9), rgba(42, 42, 42, 0.9));
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(10px);
}

.stream-popup-counter {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  color: #ffd700;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stream-popup-container {
    max-width: 95vw;
    margin: 10px;
  }

  .stream-popup-content {
    padding: 15px;
    border-radius: 10px;
  }

  .stream-popup-image {
    max-height: 60vh;
  }

  .stream-popup-close {
    width: 35px;
    height: 35px;
    font-size: 18px;
    top: -8px;
    right: -8px;
  }

  .stream-popup-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .stream-popup-controls {
    padding: 0 15px;
  }

  .stream-popup-indicator {
    bottom: -40px;
    padding: 6px 12px;
  }

  .stream-popup-counter {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .stream-popup-container {
    max-width: 98vw;
    margin: 5px;
  }

  .stream-popup-content {
    padding: 10px;
  }

  .stream-popup-image {
    max-height: 50vh;
  }

  .stream-popup-close {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .stream-popup-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .stream-popup-controls {
    padding: 0 10px;
  }
}

/* Animaciones adicionales */
@keyframes streamPopupPulse {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
  }
}

.stream-popup-nav-btn:focus {
  outline: none;
  animation: streamPopupPulse 1.5s infinite;
}

.stream-popup-close:focus {
  outline: none;
  animation: streamPopupPulse 1.5s infinite;
}

/* Efectos de hover mejorados */
.stream-popup-image-container:hover .stream-popup-nav-btn {
  opacity: 1;
  transform: scale(1.05);
}

/* Transición suave para la imagen */
.stream-popup-image {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.stream-popup-image:hover {
  transform: scale(1.02);
}
