/* Estilos para el reproductor de medios */
/* Estilos para el reproductor de medios */

/* Contenedor principal */
.media-player-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #000;
  overflow: hidden;
}

/* Elemento de audio/video */
.media-player {
  width: 100%;
  max-height: 70vh;
  background-color: #000;
}

/* Controles personalizados */
.media-controls {
  width: 100%;
  padding: 10px;
  background-color: #c0c0c0;
  border-top: 2px solid #f0f0f0;
  border-left: 2px solid #f0f0f0;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

/* Barra de control */
.control-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

/* Botones de control */
.media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: #d4d0c8;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  cursor: pointer;
}

.media-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}

.media-btn img {
  width: 16px;
  height: 16px;
}

/* Contenedor de progreso */
.progress-container {
  flex: 1;
  height: 10px;
  background-color: #000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  margin: 0 5px;
  position: relative;
}



/* Información del medio */
.media-info {
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ventana del reproductor */
.player-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  max-width: 90vw;
  background-color: #c0c0c0;
  border: 1px solid #000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

@media (max-width: 768px) {
  .player-window {
    width: 90vw;
  }
}

/* Cabecera de la ventana */
.player-window-header {
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #BCBEC0, #f0f0f0);
  padding: 2px 6px;
  border-bottom: 2px solid #808080;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  height: 24px;
  user-select: none;
  cursor: move;
}

.player-window-icon img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.player-window-title {
  flex: 1;
  color: black;
}

.player-close-btn {
  background-color: #c0c0c0;
  border: 2px outset #fff;
  font-size: 12px;
  cursor: pointer;
  height: 20px;
  width: 20px;
  line-height: 16px;
  text-align: center;
  padding: 0;
}

/* Contenido del reproductor */
.player-window-content {
  padding: 10px;
  background-color: #c0c0c0;
  height: 100%;
}
.media-player-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #111;
  color: #fff;
  padding: 0;
  overflow: hidden;
}

.media-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  min-height: 300px;
}

/* Estilo para cuando reproducimos audio sin thumbnail */
.media-container.audio-visualization {
  background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
  overflow: hidden;
}

.media-container.audio-visualization::before {
  content: '▶️';
  font-size: 42px;
  opacity: 0.3;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ec-player {
  max-width: 100%;
  max-height: 100%;
  display: none;
}

.media-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: none;
}

/*.media-controls {
  background-color: #222;
  padding: 10px;
  border-top: 1px solid #444;
} */

.media-progress {
  height: 8px;
  background-color: #333;
  margin-bottom: 10px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.media-progress-bar {
  position: absolute;
  height: 100%;
  background-color: #00aaff;
  width: 0%;
  transition: width 0.1s linear;
}

.media-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/*
.media-btn {
  background-color: #333;
  border: none;
  color: white;
  font-size: 16px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
*/

.media-btn:hover {
  background-color: #444;
}

/* Estilo para botón de descarga */
.media-btn:last-child {
  background-color: #007bff;
}

.media-btn:last-child:hover {
  background-color: #0069d9;
}

/* Ventana retro centrada */
#window-video {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90%;
  background: #c0c0c0;        /* gris Win98 */
  color: #000;
  z-index: 1000;
  border: 2px outset #fff;    /* borde relieve */
  border-right: 2px inset #808080;
  border-bottom: 2px inset #808080;
  display: flex;
  flex-direction: column;
}

/* ============================= */
/* 🎬 ESTILOS REPRODUCTOR VIDEO */
/* ============================= */

.video-container {
  flex-direction: column;
  padding: 0;
  justify-content: space-between;
}

.video-player {
  width: 100%;
  height: auto;
  max-height: calc(100% - 40px);
  background-color: #000;
  object-fit: contain;
  display: block;
}

.video-controls {
  width: 100%;
  background-color: #c0c0c0;
  padding: 8px;
  border-top: 2px solid #808080;
}

.video-progress {
  height: 8px;
  width: 100%;
  background-color: #f0f0f0;
  border: 2px inset #a0a0a0;
  position: relative;
  margin-bottom: 8px;
}

.video-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #404040;
}

.video-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.video-buttons button {
  width: 60px;
  height: 24px;
  background-color: #f0f0f0;
  border: 2px outset #c0c0c0;
  font-size: 10px;
  font-family: 'Courier New', monospace !important;
  cursor: pointer;
  color: #000;
}

.video-buttons button:active {
  border-style: inset;
}

#window-video {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 232px;
  height: 373px;
}

@media (max-width: 768px) {
  #window-video {
    width: 90vw;
    height: 60vh;
  }
}

