@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px) rotate(-5deg);
  }

  75% {
    transform: translateX(5px) rotate(5deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .8;
    transform: scale(1.1);
  }
}

@keyframes floating-hearts {
  0% {
    transform: translateY(0) translateX(0) rotate(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-100px) translateX(var(--translate-x)) rotate(var(--rotate));
    opacity: 0;
  }
}

.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.animate-float {
  animation: float 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 1s ease-in;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hearts-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hearts-animation::before,
.hearts-animation::after {
  content: '❤️';
  position: absolute;
  font-size: 1.5rem;
  animation: floating-hearts 2s ease-in-out infinite;
  opacity: 0;
}

.hearts-animation::before {
  --translate-x: -20px;
  --rotate: -30deg;
  left: 40%;
}

.hearts-animation::after {
  --translate-x: 20px;
  --rotate: 30deg;
  right: 40%;
  animation-delay: 1s;
}

.music-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.music-controls button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #ff4081;
  cursor: pointer;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-controls button:hover {
  color: #e91e63;
}

.success-screen {
  display: none;
}

.watermark {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: #888;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#message {
  margin-top: 2rem;
  /* Ensure message moves down when buttons scale up */
}

@media (max-width: 640px) {
  .music-controls {
    bottom: 10px;
    padding: 6px 12px;
    width: calc(100% - 32px);
    max-width: 300px;
  }

  .music-controls button {
    width: 100%;
  }

  .hearts-animation::before,
  .hearts-animation::after {
    font-size: 1rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .music-controls {
    bottom: 5px;
  }

  .main-screen,
  .success-screen {
    padding: 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  .music-controls {
    background: rgba(0, 0, 0, 0.7);
  }
}
