CSS Transition from color to gradient

HTML

<div>
test
</div>

CSS

:root {
  --app: radial-gradient( circle 753.6px at 10% 20%, rgba(248,167,221,1) 0%, rgba(230,192,254,1) 41%, rgba(169,217,243,1) 90% );
--base: #FFFFFF;
}

body {
  background: #DDD;
}

div {
  position: relative;
  height: 100px;
  line-height: 100px;
  text-align: center;
  width: 300px;
  background: var(--base);
  z-index: 1;
}
div::before {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: var(--app);
  z-index: -1;
  transition: .6s opacity 0.5s linear;
  opacity: 0;
}
div:hover::before {
  opacity: 1;
}