/* Import Google Font for a fun vibe */
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

body {
  margin: 0;
  font-family: 'Comic Neue', cursive;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  overflow: hidden;
}

.main {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  padding: 25px;
  text-align: center;
  animation: popIn 1s ease-out;
}

@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.header h1 {
  font-size: 2.5rem;
  color: #ff4081;
  margin-bottom: 15px;
  text-shadow: 2px 2px #ffe6f0;
}

.image {
  margin-bottom: 20px;
}

#songImage {
  max-width: 100%;
  max-height: 220px;
  border-radius: 20px;
  border: 4px dashed #ffcccb;
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5);
  transition: transform 0.5s ease;
}

#songImage:hover {
  transform: rotate(-2deg) scale(1.1);
}

.search {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

#text {
  padding: 10px 15px;
  border-radius: 25px;
  border: 2px solid #ff69b4;
  font-size: 14px;
  outline: none;
  width: 65%;
  transition: 0.3s ease-in-out;
}

#text:focus {
  border-color: #ff1493;
  box-shadow: 0 0 10px #ffb6c1;
}

#btn {
  padding: 10px 18px;
  border-radius: 20px;
  background-color: #ff69b4;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s ease-in-out;
}

#btn:hover {
  background-color: #ff1493;
  transform: scale(1.1);
}

.title h2 {
  font-size: 1.6rem;
  color: #673ab7;
  margin: 10px 0 5px;
}

.title p {
  font-size: 1.1rem;
  color: #9c27b0;
  margin: 0;
}

.play {
  margin-bottom: 15px;
}

audio {
  width: 100%;
  border-radius: 20px;
  border: 2px solid #b388ff;
  padding: 5px;
}

#error {
  color: red;
  font-weight: bold;
  font-style: italic;
  background: #fff0f0;
  padding: 8px;
  border-radius: 10px;
}

@media screen and (max-width: 500px) {
  .main {
    padding: 15px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .image img {
    max-height: 160px;
  }

  #text {
    font-size: 12px;
    padding: 8px;
  }

  #btn {
    padding: 8px 14px;
  }

  .title h2 {
    font-size: 1.2rem;
  }

  .title p {
    font-size: 1rem;
  }
}
