body {
  text-align: center;
  background-color: #f0f8ff;
  transition: background-color 1s;
}

#head {
  width: 100px;
  height: 80px;
  background-color: silver;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
}

.eye {
  width: 20px;
  height: 20px;
  background-color: yellow;
  border-radius: 50%;
  display: inline-block;
  margin: 20px 10px;
  transition: 0.3s;
}

#middle-section {
  display: flex;
  justify-content: center;
}

#body {
  width: 120px;
  height: 120px;
  background-color: steelblue;
}

.arm {
  width: 30px;
  height: 100px;
  background-color: gray;
  margin: 0 5px;
  border-radius: 15px;
}

#lower-section {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.leg {
  width: 40px;
  height: 110px;
  background-color: slategray;
  border-radius: 0 0 10px 10px;
}

@keyframes wiggle {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(10deg);
  }

  50% {
    transform: rotate(0deg);
  }

  75% {
    transform: rotate(-10deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.dancing {
  animation: wiggle 0.5s infinite;
}

button {
  margin-top: 30px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  border: 2px solid black;
}

/* Add this to your existing .arm CSS to make a shoulder joint! */
.arm {
  transform-origin: top center;
  /* Makes the arm swing from the top */
}

/* --- THE NEW DANCE MOVES --- */

/* 1. The Bounce */
@keyframes bounce {

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

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

  /* Jumps up 20 pixels */
}

/* 2. The Arm Pump */
@keyframes pumpArms {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(130deg);
  }

  /* Throws hands in the air! */
}

/* 3. The Disco Floor */
@keyframes disco {
  0% {
    background-color: #ff9999;
  }

  33% {
    background-color: #99ff99;
  }

  66% {
    background-color: #9999ff;
  }

  100% {
    background-color: #ff9999;
  }
}

/* --- THE DANCE CLASSES --- */
/* JS will attach these classes to the robot parts */
.dance-body {
  animation: bounce 0.4s infinite;
}

.dance-arms {
  animation: pumpArms 0.4s infinite;
}

.disco-floor {
  animation: disco 1s infinite;
}