@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
    --blanco:rgba(228,228,228,1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Nunito", sans-serif;
}

body {

    display: flex;
    justify-content: center;
    min-height: 100vh;
    align-items: center;
    width: 100%;

    background: url(img/BackGround.jpg) ;
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(8px);
}

body::before {
    content: '';
    position: absolute;
    background-color: rgba(0,0,0,0.5);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

body > * {
    position: relative;
    z-index: 2;
}

.reproductor-musica {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--blanco);
    width: 380px;
    padding: 10px 30px;
    border-radius: 20px;
    background-color: rgba(228,228,228,0.1);

}
.selector-archivos {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin: 10px; 0; 
   }

.selector {
    flex: 1;
    text-align: center;
    margin:10px 0;
    width: 100%;

   }

.selector label 
{width: 100%;
    display: inline-block;
    background: rgba(165,165,165,0.3);
    padding: 8px 16px;
    color: var(--blanco);
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 10px;
}

.selector input {
    display: none;
}

.playlist {
    background: rgba(165,165,165,0.3);
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 10px;
    border-radius: 10px;
}

.playlist h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.playlist::-webkit-scrollbar {
width: 6px;

}

.playlist::-webkit-scrollbar-track {
    background: rgba(165,165,165,0.1);
    border-radius: 3px;
    
    }

    .playlist::-webkit-scrollbar-thumb {
        background: rgba(228,228,228,0.3);
        border-radius: 3px;
        
        }
       
     .playlist::-webkit-scrollbar-thumb:hover {
     background: rgba(228,228,228,0.5);
      border-radius: 3px;
            
      }
     #playlist-container {
     list-style: none;
     }
     #playlist-container li {
     padding: 8px;
     margin: 4px; 0;
     background: rgba(165,165,165,0.2);
     border-radius: 5px;
     cursor: pointer;
     transition: background 0.2s;
     }

      #playlist-container li:hover {
      background: rgba(165,165,165,0.3);  
      }

    #playlist-container li.active {
    background: rgba(165,165,165,0.4);  
    }

 

.reproductor-musica h1 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.6;
}

.reproductor-musica p {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.6;
}

#progreso {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 7px;
    background: rgba(165, 165, 165, 0.4);
    border-radius: 4px;
    margin: 32px 0 24px;
    cursor: pointer;
}

#progreso::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(165, 165, 165, 0.9);
    width: 16px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    outline: 4px solid var(--blanco);
    box-shadow: 0 6px 10px rgba(228, 228, 228, 0.3);
}

.controles {
    display: flex;
    justify-content: center;
}

.controles button {
    width: 50px;
    aspect-ratio: 1/1;
    margin: 10px;
    background: rgba(165, 165, 165, 0.3);
    color: var(--blanco);
    border-radius: 50%;
    border: 1px solid var(--blanco);
    outline: 0;
    font-size: 1.5rem;
    box-shadow: 0 6px 10px rgba(228, 228, 228, 0.3);
    cursor: pointer;
    transition: all 0.1s linear;
}

.controles .control:hover {
    transform: scale(1.1);
}

.controles .iconoControl{
    transform: scale(1.3);
}

.controles .iconoControl:hover {
    transform: scale(1.4);
}

.controles .aleatorio.active,
.controles .repetir.active {
    background: rgba(165, 165, 165, 0.6);   

}  

   #agregarCancion,
#cargarPlaylist {
    width: 90%;
    margin: 12px auto 0 auto;
    display: block;
    background: rgba(228, 228, 228, 0.18);
    color: var(--blanco);
    border: 1.5px solid var(--blanco);
    border-radius: 22px;
    padding: 10px 0;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: 
        background 0.2s, 
        color 0.2s,
        transform 0.18s;
    letter-spacing: 0.01em;
}

#agregarCancion:hover,
#cargarPlaylist:hover {
    background: rgba(228, 228, 228, 0.32);
    color: #222;
    transform: scale(1.035);
} 
#playlist-container li.active {
  background: #003366; /* Azul brillante */
  color: white;
  font-weight: bold;
  border-left: 4px solid white;
  border-radius: 6px;
}

.controles .aleatorio.active,
.controles .repetir.active {
  background: #003366; /* azul vibrante */
  color: white;
}

label[for="music-input"] {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

body {
  background-image: url('img/alvikos.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  body {
    background-position: top center;
    background-size: cover;
  }
}

#modal-tracks {
  position: absolute;
  top: 50px; /* ajusta según necesidad */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(20, 20, 20, 0.95); /* fondo oscuro transparente */
  padding: 20px;
  border-radius: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

#agregarCancion:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* Estado activo cuando el código se ingresa */
#pasteBtn.active {
  background-color: #28a745; /* verde vibrante */
  color: #fff;
  transform: scale(1.05);    /* pequeño efecto de realce */
}

#pasteBtn {
  padding: 6px 10px;        
  font-size: 0.75rem;       
  border-radius: 5px;
  width: auto;
  display: inline-block;

  /* 🔹 Estilos visuales */
  background: rgba(228, 228, 228, 0.18); /* fondo translúcido */
  color: var(--blanco);                  /* texto blanco */
  border: 1.5px solid var(--blanco);     /* borde blanco */
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.18s;
}

#pasteBtn:hover {
  background: rgba(228, 228, 228, 0.32); /* se ilumina al pasar el mouse */
  color: #222;                           /* texto oscuro en hover */
  transform: scale(1.035);               /* pequeño efecto de zoom */
}

/* ✨ NUEVOS ESTILOS PARA BÚSQUEDA */

.modal-busqueda {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.contenedor-busqueda {
  background-color: rgba(20, 20, 20, 0.95);
  padding: 25px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  color: var(--blanco);
  position: relative;
}

.contenedor-busqueda h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
  text-align: center;
}

.boton-cerrar {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--blanco);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.boton-cerrar:hover {
  transform: scale(1.2);
}

.opciones-busqueda {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(165, 165, 165, 0.2);
  border-radius: 8px;
}

.opciones-busqueda label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  font-size: 0.95rem;
  transition: background 0.2s;
  padding: 8px;
  border-radius: 5px;
}

.opciones-busqueda label:hover {
  background: rgba(165, 165, 165, 0.3);
}

.opciones-busqueda input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #0a9c8a;
}

.entrada-busqueda {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.entrada-busqueda input {
  flex: 1;
  padding: 10px 15px;
  border: 1.5px solid var(--blanco);
  border-radius: 8px;
  background: rgba(165, 165, 165, 0.2);
  color: var(--blanco);
  font-size: 0.95rem;
  outline: none;
  transition: background 0.2s;
}

.entrada-busqueda input:focus {
  background: rgba(165, 165, 165, 0.3);
}

.entrada-busqueda input::placeholder {
  color: rgba(228, 228, 228, 0.6);
}

.entrada-busqueda button {
  padding: 10px 20px;
  background: #0a9c8a;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.entrada-busqueda button:hover {
  background: #08876f;
  transform: scale(1.05);
}

.contenedor-resultados {
  background: rgba(165, 165, 165, 0.15);
  padding: 15px;
  border-radius: 8px;
  max-height: 350px;
  overflow-y: auto;
  min-height: 50px;
}

.resultado-item {
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(165, 165, 165, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-left: 3px solid #0a9c8a;
}

.resultado-item:hover {
  background: rgba(165, 165, 165, 0.35);
}

.resultado-texto {
  flex: 1;
  font-size: 0.9rem;
}

.botones-resultado {
  display: flex;
  gap: 5px;
}

.btn-preview {
  padding: 6px 10px;
  background: #0a9c8a;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-preview:hover {
  background: #08876f;
}

.btn-agregar-resultado {
  padding: 6px 10px;
  background: #1e7f72;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-agregar-resultado:hover {
  background: #155d50;
}

.sin-resultados {
  text-align: center;
  padding: 20px;
  color: rgba(228, 228, 228, 0.6);
  font-style: italic;
}

/* ✨ Modal de preescucha */

.modal-preescucha {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(20, 20, 20, 0.98);
  padding: 20px;
  border-radius: 12px;
  z-index: 1000;
  color: var(--blanco);
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.contenedor-preescucha h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  word-break: break-word;
}

.contenedor-preescucha audio {
  width: 100% !important;
  margin: 15px 0;
}

.botones-preescucha {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.botones-preescucha button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

#botonAgregarDesdePreview {
  background: #0a9c8a;
  color: white;
}

#botonAgregarDesdePreview:hover {
  background: #08876f;
  transform: scale(1.05);
}

#botonCerrarPreview {
  background: rgba(165, 165, 165, 0.3);
  color: var(--blanco);
}

#botonCerrarPreview:hover {
  background: rgba(165, 165, 165, 0.5);
}

#botonBuscar {
  width: 90%;
  margin: 12px auto 0 auto;
  display: block;
  background: rgba(228, 228, 228, 0.18);
  color: var(--blanco);
  border: 1.5px solid var(--blanco);
  border-radius: 22px;
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: 
    background 0.2s, 
    color 0.2s,
    transform 0.18s;
  letter-spacing: 0.01em;
}

#botonBuscar:hover {
  background: rgba(228, 228, 228, 0.32);
  color: #222;
  transform: scale(1.035);
}

#botonBuscar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}