:root {
  --selected-color: rgb(61, 106, 255);
  --selected-color2: rgb(61, 106, 255);
}

body {
  font-family: "Segoe UI";
  color: #eee;
  padding: 2vw;
  text-align: center;
  font-size: 0.8vw;
}

#background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -5;
  background-color: #0066ff;
}

#loadingOverlay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 10;
  background: #0006;
  backdrop-filter: blur(2vw);
  -webkit-backdrop-filter: blur(2vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

#background svg {
  z-index: -1;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
}

#content {
  position: relative;
  z-index: 1;
}

.main {
  display: flex;
  flex-direction: row;
}

#glass {
  background: rgba(255,255,255,0.25);
  box-shadow: 2vw 2vh 2vw -3vh rgba(0,0,0,0.2);
  backdrop-filter: blur(3vw);
  -webkit-backdrop-filter: blur(3vw);
  border-radius: 3%;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 2vh 1vw;
  width: 15vw;
  height: fit-content;
  background: #b5bec4;
  margin: 0 0 0 15vw;
  border-radius: 2%;
}

.previewBox {
  width: 50vw;
  height: 40vw;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10vw;
}

.previewBox svg {
  width: 100%;
  height: 100%;
}

.button {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  cursor: pointer;
  width: 10vw;
  height: 5vh;
}

.button .shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8%;
  transform: translateY(2%);
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

.button .edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8%;
  background: linear-gradient(
    to left,
    hsl(217, 33%, 16%) 0%,
    hsl(217, 33%, 32%) 8%,
    hsl(217, 33%, 32%) 92%,
    hsl(217, 33%, 16%) 100%
  );
}

.button .front {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1vh 1vw;
  font-size: 1vw;
  color: white;
  background: hsl(217, 33%, 17%);
  border-radius: 8%;
  transform: translateY(-4%);
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

.button:hover .shadow {
  transform: translateY(8%);
  transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}

.button:hover .front {
  transform: translateY(-12%);
  transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}

.button:active .shadow {
  transform: translateY(1%);
  transition: transform 34ms;
}

.button:active .front {
  transform: translateY(-2%);
  transition: transform 34ms;
}

.button .front span {
  user-select: none;
}

#presetColors {
  align-items: center;
  width: 15vw;
}

.colorselect {
  width: 1.5vw;
  height: 1.5vw;
  position: relative;
  margin: 0.2vw 0;
  border-radius: 100%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  background: transparent;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: all 0.2s ease-in;
  -moz-transition: all 0.2s ease-in;
  transition: all 0.2s ease-in;
}

.colorselect:hover {
  background: var(--selected-color);
  box-shadow: 0 0 30px 5px var(--selected-color2);
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

.colorselect:hover::before {
  -webkit-animation: sh02 0.5s 0s linear;
  -moz-animation: sh02 0.5s 0s linear;
  animation: sh02 0.5s 0s linear;
}

.colorselect::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50vh 30vw #fff;
  -webkit-transform: skewX(-20deg);
  -moz-transform: skewX(-20deg);
  -ms-transform: skewX(-20deg);
  -o-transform: skewX(-20deg);
  transform: skewX(-20deg);
}

#loadingOverlayBox {
  width: 20vw;
  height: 12vh;
  position: fixed;
  justify-content: center;
  align-items: center;
  text-align: center;
  top: 42vh;
  left: 40vw;
}

.wrapperLoadingText {
  width: 100%;
  height: 100%;
  font-size: 2vw;
  margin-top: -2vh;
  text-transform: uppercase;
}

.wrapperLoadingIcon {
  width: 100%;
  height: 100%;
}

.wrapperLoadingIconCircles {
  display: flex;
  justify-content: space-between;
  height: 60%;
}

.wrapperLoadingIconShadows {
  display: flex;
  justify-content: space-between;
  height: 60%;
  margin-top: -1.8vh;
}

.Loadingcircle {
  width: 2vh;
  height: 2vh;
  position: relative;
  border-radius: 50%;
  background-color: #fff;
  transform-origin: 50%;
  animation: loadingcircleAnim .5s alternate infinite ease;
}

.Loadingcircle:nth-child(2) {
  animation-delay: .2s;
}

.Loadingcircle:nth-child(3) {
  animation-delay: .3s;
}

.LoadingCircleshadow {
  width: 2vh;
  height: 0.4vh;
  border-radius: 50%;
  background-color: #000000e6;
  position: relative;
  transform-origin: 50%;
  z-index: -1;
  filter: blur(1px);
  animation: loadingcircleShadowAnim .5s alternate infinite ease;
}

.LoadingCircleshadow:nth-child(4) {
  left: 45%;
  animation-delay: .2s
}

.LoadingCircleshadow:nth-child(5) {
  left: auto;
  right: 15%;
  animation-delay: .3s;
}

@keyframes sh02 {
  from {
    opacity: 0;
    left: 0%;
  }
  50% {
    opacity: 1;
  }
  to {
    opacity: 0;
    left: 100%;
  }
}

@keyframes loadingcircleAnim {
  0% {
    top: 60px;
    height: 5px;
    border-radius: 50px 50px 25px 25px;
    transform: scaleX(1.7);
  }
  40% {
    height: 20px;
    border-radius: 50%;
    transform: scaleX(1);
  }
  100% {
    top: 0%;
  }
}

@keyframes loadingcircleShadowAnim {
  0% {
    transform: scaleX(1.5);
  }
  40% {
    transform: scaleX(1);
    opacity: .7;
  }
  100% {
    transform: scaleX(.2);
    opacity: .4;
  }
}

.colorselect:active {
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: box-shadow 0.2s ease-in;
  -moz-transition: box-shadow 0.2s ease-in;
  transition: box-shadow 0.2s ease-in;
}

@media screen and (max-width: 800px) {
  .main {
    flex-direction: column;
    align-items: center;
  }

  .controls {
    width: 50vw;
    margin: 0 5vw 2vh 5vw;
    border-radius: 2%;
  }

  .previewBox {
    width: 80vw;
    height: 80vw;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10vw;
  }

  .button {
    width: 20vw;
    height: 5vh;
  }

  .button .front {
    font-size: 2vw;
  }

  body {
    font-size: 3vw;
  }

  .colorselect {
    width: 4vw;
    height: 4vw;
  }

  #presetColors {
    width: 45vw;
  }

  h2 {
    font-size: 3vw;
  }

  h3 {
    font-size: 3vw;
  }

  h4 {
    font-size: 2vw;
  }
}