/* Fondo con imagen y overlay */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  text-align: center;
  padding: 30px;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Títulos */
h1,
h2 {
  text-shadow: 1px 1px 5px #000;
  color: #ffb347;
}

/* Contenedor del reproductor */
#player {
  margin: 20px auto;
  padding: 25px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 15px;
  width: 420px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s, box-shadow 0.3s;
}

#player:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 30px rgba(255, 179, 71, 0.6);
}

/* Audio player */
audio {
  width: 100%;
  margin-top: 15px;
  outline: none;
}

/* Contenedor de audio + animación */
#audioContainer {
  position: relative;
  width: 100%;
}

/* Animación de barras */
#audioAnimation {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

#audioAnimation span {
  width: 10px;
  height: 40px;
  background: #00ffff;
  /* azul neón */
  display: block;
  animation: bounce 1s infinite;
  opacity: 0.3;
  border-radius: 3px;
}

#audioAnimation.active span {
  opacity: 1;
}

#audioAnimation span:nth-child(1) {
  animation-delay: 0s;
}

#audioAnimation span:nth-child(2) {
  animation-delay: 0.2s;
}

#audioAnimation span:nth-child(3) {
  animation-delay: 0.4s;
}

#audioAnimation span:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes bounce {

  0%,
  100% {
    transform: scaleY(0.3);
  }

  50% {
    transform: scaleY(1);
  }
}

/* Botones */
button {
  margin: 5px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(45deg, #ffb347, #ffcc33);
  transition: all 0.3s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

button:hover {
  transform: translateY(-3px);
  background: linear-gradient(45deg, #ffcc33, #ffb347);
}

/* Botones de listas disponibles */
#lists button {
  width: 140px;
  font-size: 0.95em;
}

/* Listas de canciones y playlist */
ul {
  list-style: none;
  padding: 0;
  margin: 15px auto;
  max-height: 220px;
  overflow-y: auto;
  width: 420px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Cada canción */
li {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 8px;
  margin: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.25s;
}

li:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.02);
}

/* Canción activa */
.active {
  background: linear-gradient(45deg, #ffb347, #ffcc33) !important;
  color: #111;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.8);
  transform: scale(1.05);
}

/* Scrollbar más visible */
ul::-webkit-scrollbar {
  width: 12px;
}

ul::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

ul::-webkit-scrollbar-thumb {
  background: #ffb347;
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

ul::-webkit-scrollbar-thumb:hover {
  background: #ffcc33;
}

/* ===== Ajustes para pantallas pequeñas ===== */
@media (max-width: 600px) {
  body {
    padding: 15px;
    font-size: 1.1em;
    /* texto un poco más grande */
  }

  #player {
    width: 100%;
    /* ocupa todo el ancho */
    max-width: 95vw;
    /* deja un poco de margen */
    padding: 20px;
  }

  h1 {
    font-size: 1.8em;
    /* título más grande */
  }

  h2 {
    font-size: 1.4em;
  }

  button {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    margin: 8px 0;
  }

  #lists button {
    width: 100%;
    font-size: 1.1em;
  }

  ul {
    width: 100%;
    max-height: 300px;
    /* un poco más grande para scroll en móvil */
  }

  li {
    font-size: 1.05em;
    padding: 15px;
  }

  audio {
    height: 50px;
    /* más grande para tocarlo con el dedo */
  }

  #audioAnimation {
    bottom: -25px;
    gap: 8px;
  }

  #audioAnimation span {
    width: 12px;
    height: 45px;
  }
}

/* Botón de volver */
.home-button {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 12px 24px;
  background-color: #e01212;
  /* Rojo intenso */
  color: #ffffff !important;
  /* Siempre blanco */
  text-decoration: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid #fff;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(224, 18, 18, 0.4);
}

.home-button:visited {
  color: #ffffff !important;
}

.home-button:hover {
  background-color: #ffffff;
  color: #e01212 !important;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.home-button i {
  margin-right: 8px;
}