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

#head {
  width: 100px;
  height: 80px;
  background-color: rgba(192, 192, 192, 0);
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
  background-image: url(robot-head.png);
  background-position: center center;
  background-size: cover;
}

.eye {
  width: 15px;
  height: 15px;
  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;
  border-radius: 50%;
}

.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;
}

/* Dodaj to do swojego kodu .arm, żeby stworzyć staw barkowy! */
.arm {
  transform-origin: top center;
  /* Dzięki temu ramię będzie się ruszać z samej góry (od barku) */
}

/* --- NOWE KROKI TANECZNE --- */

/* 1. Podskoki (Bounce) */
@keyframes bounce {

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

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

  /* Robot podskakuje o 20 pikseli w górę! */
}

/* 2. Wymachy Rąk (Arm Pump) */
@keyframes pumpArms {

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

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

  /* Wyrzuca ręce wysoko w powietrze! */
}

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

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

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

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

/* --- KLASY TANECZNE (CSS) --- */
/* Twój kod JavaScript (JS) doda te klasy do części robota, żeby zaczął tańczyć! */
.dance-body {
  animation: bounce 0.4s infinite;
}

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

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