/* === STREAMER CSS MODERNO CON GLOW === */

/* Ventana flotante general */
.streamer-window {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-sizing: border-box;
  border: none;
  font-family: sans-serif;
  transition: all 0.3s ease;
}

/* Estado minimizado (como botón) */
.streamer-window:not(.expanded) {
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 140, 0, 0.35);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-align: center;
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
}

.streamer-window:not(.expanded):hover {
  border-color: rgba(255, 140, 0, 0.9);
  box-shadow:
    0 0 12px rgba(255, 140, 0, 0.4),
    0 0 30px rgba(255, 140, 0, 0.6);
  transform: translateY(-2px);
}

/* Header minimizado */
.streamer-window:not(.expanded) .streamer-header {
  all: unset;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-weight: 600;
  font-size: inherit;
  color: inherit;
  padding: 0;
}

.streamer-window:not(.expanded) .streamer-header button {
  display: none !important;
}

/* Estado expandido */
.streamer-window.expanded {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 140, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.2),
              0 0 20px rgba(255, 140, 0, 0.15) inset;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  min-width: 260px;
  min-height: 200px;
  max-width: 90vw;
  max-height: 90vh;
  width: 400px;
  height: 500px;
  padding-top: 40px; /* espacio para header fijo */
  animation: streamerGlow 2.5s infinite alternate;
}

/* Glow animado sutil */
@keyframes streamerGlow {
  0% {
    box-shadow:
      0 0 8px rgba(255, 140, 0, 0.2),
      0 0 20px rgba(255, 140, 0, 0.1) inset;
  }
  50% {
    box-shadow:
      0 0 12px rgba(255, 140, 0, 0.3),
      0 0 25px rgba(255, 140, 0, 0.15) inset;
  }
  100% {
    box-shadow:
      0 0 8px rgba(255, 140, 0, 0.2),
      0 0 20px rgba(255, 140, 0, 0.1) inset;
  }
}

/* Header expandido */
.streamer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  user-select: none;
  box-sizing: border-box;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 140, 0, 0.3);
}

/* Botón de cambio/close */
.streamer-header button {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: none;
  font-size: 0.9rem;
}

.streamer-window.expanded .streamer-header button {
  display: inline-block;
}

/* iframe interno */
.streamer-window iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Texto STREAMER */
.streamer-header #platformName {
  white-space: nowrap;
  color: #fff; /* coincide con los botones */
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
  .streamer-window { top: 20px; left: 10px; }
  .streamer-window:not(.expanded) { padding: 12px 20px; font-size: 0.8rem; }
  .streamer-header { height: 34px; font-size: 0.75rem; padding: 0 8px; }
  .streamer-window.expanded { width: 220px; height: 300px; padding-top: 34px; }
}