* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #3b0764, #0f172a);
  background-size: 400% 400%;
  animation: gradientMove 12s ease infinite;
  color: white;
  padding: 20px;
  position: relative;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.background span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: floatUp linear infinite;
  bottom: -150px;
}

.background span:nth-child(1) {
  left: 10%;
  width: 60px;
  height: 60px;
  animation-duration: 12s;
}

.background span:nth-child(2) {
  left: 25%;
  width: 100px;
  height: 100px;
  animation-duration: 18s;
}

.background span:nth-child(3) {
  left: 50%;
  width: 80px;
  height: 80px;
  animation-duration: 14s;
}

.background span:nth-child(4) {
  left: 70%;
  width: 120px;
  height: 120px;
  animation-duration: 20s;
}

.background span:nth-child(5) {
  left: 85%;
  width: 70px;
  height: 70px;
  animation-duration: 16s;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) scale(1.3);
    opacity: 0;
  }
}

.card {
  width: 100%;
  max-width: 700px;
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 25px rgba(168, 85, 247, 0.35),
    0 0 50px rgba(59, 130, 246, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.4);
  animation: cardFade 1s ease;
  position: relative;
  z-index: 2;
}

@keyframes cardFade {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 2.3rem;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

p {
  text-align: center;
  color: #e9d5ff;
  margin-bottom: 28px;
  font-size: 1rem;
}

.input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

input {
  flex: 1;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  transition: 0.3s ease;
}

input:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25);
}

button {
  border: none;
  border-radius: 14px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.45);
}

button:active {
  transform: scale(0.98);
}

.download-btn {
  width: 100%;
  margin-top: 18px;
}

.refresh-btn {
  width: 100%;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
}

.refresh-btn:hover {
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.5);
}

.delete-top-btn {
  width: 100%;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
  font-size: 16px;
}

.delete-top-btn:hover {
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.5);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
}

li {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #ffffff;
  animation: popIn 0.35s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

ul::-webkit-scrollbar {
  width: 8px;
}

ul::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

ul::-webkit-scrollbar-track {
  background: transparent;
}

.song-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.song-row span {
  flex: 1;
  word-break: break-word;
}

.delete-form {
  margin: 0;
}

.delete-btn {
  padding: 10px 14px;
  font-size: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  white-space: nowrap;
}

.delete-btn:hover {
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.45);
}

.song-form {
  position: relative;
}

.suggestions {
  display: none;
  margin-top: -8px;
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.suggestion-item {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  padding: 14px 16px;
  background: transparent;
  color: white;
  box-shadow: none;
  font-size: 15px;
  font-weight: normal;
}

.suggestion-item:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.suggestion-item:active {
  transform: none;
}

@media (max-width: 700px) {
  .card {
    padding: 24px;
  }

  .input-area {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  h1 {
    font-size: 1.8rem;
  }

  .song-row {
    flex-direction: column;
    align-items: stretch;
  }
}
