body {
  font-family: "Fredoka One", cursive;
}
main {
  display: grid;
  place-content: center;
  height: 60vh;	
}
#colorsrange {
  --width: 40vh;
  --height: 10vh;
  --pivot: 3vh;
  width: var(--width);
  height: var(--height);
  position: relative;
  transform: translate(calc(-50% + var(--pivot)), calc(50% + var(--pivot)));
}
#colorDetails {
  background-color: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: calc(var(--height) * 1.1);
  padding: 1vmin;
  font-size: 2vmin;
  display: none;
  grid-template-columns: 2vmin auto auto;
  gap: 1vmin;
  line-height: 1em;
  font-family: "Poppins", sans-serif;
}

#colorDetails .name {
  grid-column: 1/-1;
  text-transform: capitalize;
}
#colorDetails .color {
  border: 1px solid black;
}
#cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#cards #topCard {
  display: grid;
  place-content: center;
  font-size: 6vmin;
  color: white;
  user-select: none;
  -webkit-text-stroke: 1px black;
}

#cards > div {
  position: absolute;
  height: 100%;
  width: 100%;
  border-radius: 10px;
  transform-origin: calc(100% - var(--pivot)) calc(100% - var(--pivot));
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: transform 1s ease;
}

#cards.closed > div {
  transform: rotate(0deg) !important;
  box-shadow: none !important;
}

#cards > div.active {
  transform: rotate(270deg) !important;
}

#pivot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: var(--pivot);
  height: var(--pivot);
  background-color: white;
  border-radius: 50%;
  border: 2px solid rgb(206, 206, 206);
  box-shadow: 0px 0px 2px black, inset 0px 0px 5px rgba(0, 0, 0.3);
}

@media (orientation: portrait) {
  #colorsrange {
    --width: 50vw;
    --height: 15vw;
    --pivot: 3vw;
  }
}
