/* Configuración base */
body {
  margin: 0;
  padding: 0;
  background: rgb(208, 16, 58);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

ul li {
  margin: 0;
}

ul li a i {
  font-size: 40px;
  color: #555;
  line-height: 80px;
  transition: 0.5s;
}

ul li a {
  position: relative;
  display: block;
  width: 80px;
  height: 80px;
  background: #fff;
  text-align: center;
  transform: perspective(1000px) rotate(-30deg) skew(25deg) translate(0, 0);
  transition: 0.5s;
  box-shadow: -20px 20px 10px rgba(0, 0, 0, 0.5);
  animation: float 3s ease-in-out infinite; /* Movimiento continuo */
}

ul li a::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -20px;
  height: 100%;
  width: 20px;
  background: #b2b2b2;
  transition: 0.5s;
  transform: rotate(0deg) skewY(-45deg);
}

ul li a::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -10px;
  height: 20px;
  width: 100%;
  background: #e5e5e5;
  transition: 0.5s;
  transform: rotate(0deg) skewX(-45deg);
}

/* Efecto al pasar el ratón */
ul li a:hover {
  transform: perspective(1000px) rotate(-30deg) skew(25deg) translate(20px, -20px);
  box-shadow: -50px 50px 50px rgba(0, 0, 0, 0.5);
  animation: bounce 0.6s ease; /* Rebote al pasar el ratón */
}

ul li:hover i {
  color: #fff;
}

/* Animaciones específicas */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Colores específicos */
ul li:hover:nth-child(1) a {
  background-color: #3b5999;
}

ul li:hover:nth-child(2) a {
  background-color: #4285f4;
}

ul li:hover:nth-child(3) a {
  background-color: #e4405c;
}

ul li:hover:nth-child(4) a {
  background-color: #ff0000;
}

ul li:hover:nth-child(5) a {
  background-color: #25d366;
}

ul li:hover:nth-child(6) a {
  background-color: #1a73e8;
}

ul li:hover:nth-child(7) a {
  background-color: #1EBBEE;
}

ul li:hover:nth-child(8) a {
  background-color: #1da1f2;
}

ul li:hover:nth-child(9) a {
  background-color: #000000;
}

/* Responsividad */
@media (max-width: 768px) {
  ul li a {
    width: 60px;
    height: 60px;
  }

  ul li a i {
    font-size: 30px;
    line-height: 60px;
  }
}

@media (max-width: 480px) {
  ul {
    gap: 10px;
  }

  ul li a {
    width: 50px;
    height: 50px;
  }

  ul li a i {
    font-size: 24px;
    line-height: 50px;
  }
}
