body {
  background-color: #eee;
  font-family: "Geist", sans-serif;
}

.wrapper {
  width: 400px;
  height: 360px;
  margin: 200px auto;
  position: relative;
  filter: url("#fancy-goo");
}

.menu {
  background-color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  position: absolute;
  z-index: -1;
  transition: all 0.7s cubic-bezier(0.47, 1.64, 0.41, 0.8);
  pointer-events: none;
  overflow: hidden;
}

.menu ul {
  list-style-type: none;
  margin: 12px 0 0px;
  padding: 0;
  font-size: 14px;
  overflow: hidden;
  opacity: 0;
}

.menu ul li {
  padding: 8px 10px;
  transition: all 0.3s linear;
  border-radius: 8px;
  margin: 0 8px;
  color: #333;
}

.menu ul li:hover {
  background-color: #eee;
  cursor: pointer;
}

.menu ul li:active {
  transform: scale(0.96);
}

.pill {
  background-color: #fff;
  width: 120px;
  color: #333;
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
  padding: 16px 0;
  transition: all 0.7s cubic-bezier(0.47, 1.64, 0.41, 0.8);
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
}

.pill.active {
  width: 36px;
  transition: all 0.7s cubic-bezier(0.47, 1.64, 0.41, 0.8);
  color: #fff;
  background-color: #fff;
  opacity: 0;
}

.pill > svg {
  vertical-align: bottom;
  margin-right: 4px;
}

.menu svg {
  vertical-align: bottom;
  margin-right: 10px;
}

.pill.active + .menu {
  transform: translate(-55px, 165px);
  width: 180px;
  height: 192px;
  border-radius: 8px;
  z-index: 1;
  pointer-events: all;
}

.pill.active + .menu ul {
  animation: fade-in 0.4s linear forwards;
  animation-delay: 0.3s;
}

.pill:not(.active):hover {
  opacity: 0.9;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
