html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--light-colour);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardHolder {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  position: absolute;
  gap: 0.35vmin;
  margin-bottom: 5%;
}

.hidden {
  visibility: hidden !important;
}

#card-1 {
  align-self: end;
  justify-self: end;
}

#card-2 {
  align-self: end;
  justify-self: start;
}

#card-3 {
  align-self: start;
  justify-self: end;
}

#card-4 {
  align-self: start;
  justify-self: start;
}

.card {
  aspect-ratio: 3 / 1.8;
  width: auto;
  max-width: 80%;
  height: 80%;
  background: var(--white-colour);
  border-radius: 1vmin;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1vmin;
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

.selected {
  box-shadow: rgba(0, 0, 0, 0.3) 0px 5vmin 2.5vmin -2.5vmin;
  border: 0.5vmin solid rgba(0, 0, 0, 0.15);
}

.card p {
  font-size: 4vmin;
  text-align: center;
  text-wrap: balance;
  color: var(--dark-colour);
  font-weight: 300;
  user-select: none;
  opacity: 1;

  transition: color 0.3s ease, opacity 0.3s ease;
}

.card p.fade-out {
  opacity: 0;
}

.refreshBtn {
  height: 7.5%;
  width: auto;
  aspect-ratio: 1;
  border-radius: 100%;
  background-color: var(--dark-colour);
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0.1vmin 0.2vmin,
    rgba(0, 0, 0, 0.3) 0px 0.35vmin 0.75vmin -0.15vmin,
    rgba(0, 0, 0, 0.2) 0px -0.15vmin 0px inset;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  z-index: 9;
  margin-bottom: 2%;
  position: absolute;
  bottom: 0;
}

.refreshBtn:hover {
  filter: brightness(1.25);
}

.refreshBtn svg {
  fill: var(--white-colour);
  width: 50%;
}

/* -------------------------------------------------------------------------- */
/*                                  ANIMATIONS                                */
/* -------------------------------------------------------------------------- */

.swing-in-top-fwd {
  -webkit-animation: swing-in-top-fwd 0.5s
    cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  animation: swing-in-top-fwd 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@-webkit-keyframes swing-in-top-fwd {
  0% {
    -webkit-transform: rotateX(-100deg);
    transform: rotateX(-100deg);
    -webkit-transform-origin: top;
    transform-origin: top;
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateX(0deg);
    transform: rotateX(0deg);
    -webkit-transform-origin: top;
    transform-origin: top;
    opacity: 1;
  }
}
@keyframes swing-in-top-fwd {
  0% {
    -webkit-transform: rotateX(-100deg);
    transform: rotateX(-100deg);
    -webkit-transform-origin: top;
    transform-origin: top;
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateX(0deg);
    transform: rotateX(0deg);
    -webkit-transform-origin: top;
    transform-origin: top;
    opacity: 1;
  }
}
