body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: url('Wallpaper.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
}

header {
  text-align: center;
  padding: 1em;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2em;
  margin: 2em;
}

#songs-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 60%;
  background: rgba(0,0,0,0.4);
  padding: 1em;
  border-radius: 10px;
}

/* --- Comentarios --- */
#comments-container {
  width: 30%;
  background: rgba(0,0,0,0.4);
  padding: 1em;
  border-radius: 10px;
  height: 70vh;
  overflow-y: auto;
}

#comments-list {
  display: flex;
  flex-direction: column-reverse; /* más recientes arriba */
  gap: 0.5em;
}

.comment {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0.6em 0.8em;
  margin-bottom: 0.5em;
  font-size: 0.9em;
}

.comment-header {
  color: #ddd;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.comment-date {
  color: #ffcc66;
  font-weight: normal;
}

.comment-text {
  color: #fff;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  padding: 0.5em;
  line-height: 1.4em;
  white-space: pre-line;
}


footer {
  text-align: center;
  margin-top: 2em;
}

audio {
  width: 80%;
  max-width: 600px;
}


/* === Tarjeta de canción === */
.song-card {
  position: relative;
  display: grid;
  grid-template-columns: 5em 1fr 8em;
  align-items: center;
  gap: 1em;
  padding: 0.8em;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.song-card:hover {
  transform: scale(1.02);
  background: rgba(255,255,255,0.2);
}

.song-card.playing {
  background: rgba(255,255,255,0.25);
  transform: scale(1.03);
}

/* 🎵 Icono musical animado centrado */
.song-card.playing::after {
  content: "🎵";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3em;
  animation: floatMusic 1.8s ease-in-out infinite alternate,
             colorShift 3s linear infinite;
  opacity: 0.9;
  pointer-events: none;
}

/* Animación del icono 🎵 Movimiento de 'balanceo' */
@keyframes floatMusic {
  0%   { transform: translate(-50%, -48%) rotate(-5deg) scale(1.05); }
  100% { transform: translate(-50%, -55%) rotate(5deg) scale(1.15); }
}

/* Animación del icono 🎵 Cambio continuo de color */
@keyframes colorShift {
  0%   { filter: hue-rotate(0deg); }
  50%  { filter: hue-rotate(180deg); }
  100% { filter: hue-rotate(360deg); }
}


/* Imágenes dentro de las filas */
.song-card img {
  width: 4em;
  height: 4em;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
}


/* ❤️ Botón Me gusta */
.like-btn {
  background: #ff4081;
  border: none;
  border-radius: 8px;
  padding: 0.5em 1em;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.like-btn:hover {
  background: #ff1f66;
}


/* === ❤️ Animación de palpitación mientras suena === */

/* Solo palpita el botón dentro de la tarjeta que está reproduciendo */

.song-card.playing .like-btn .heart {
  display: inline-block;
  animation: softHeartBeat 3s ease-in-out infinite;
  transform-origin: center;
  filter: drop-shadow(0 0 4px rgba(255, 64, 129, 0.4));
}

/* Animación del corazón: suave y rítmica */
@keyframes softHeartBeat {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(255, 64, 129, 0.4));
  }
  25% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(255, 64, 129, 0.6));
  }
  50% {
    transform: scale(1.10);
    filter: drop-shadow(0 0 5px rgba(255, 64, 129, 0.5));
  }
  75% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(255, 64, 129, 0.5));
  }
}
