* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  font-size: 16px;
  font-family: Tahoma, sans-serif;
}

body {
  background: rgb(171, 205, 239);
  background: radial-gradient(
    circle,
    rgba(171, 205, 239, 1) 0%,
    rgba(18, 52, 86, 1) 100%
  );
  user-select: none;
}

/* #app {
  max-width: 1920px;
  max-height: 1080px;
  margin-left: auto;
  margin-right: auto
} */

#container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  height: 100%;
  transition: opacity 0.5s;
}

.card-container {
  perspective: 1000px;
  padding: 5px;
  transition: opacity 0.25s;
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 1s;
  transform-style: preserve-3d;
}

.card.flip {
  transform: rotateY(180deg);
}

/* Position the front and back side */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
}

.card-front {
  background-color: #e0c9a6;
  color: #06080f;
  border: 5px solid #06080f;
}

.card-back {
  /* background-color: #517fa4; */
  /* color: #fff; */
  background: url("../img/card-back.png") center;
  background-color: #06080f;
  transform: rotateY(180deg);
}

/* .card p {
  text-align: center;
  margin: 1rem;
  font-size: 1.4rem;
  line-height: 1.5rem;
  user-select: none;
} */

.text-center {
  text-align: center;
}

.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.invisible {
  visibility: hidden;
}

@-webkit-keyframes rotating /* Safari and Chrome */ {
  from {
    -webkit-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    transform: rotateY(0deg);
  }
  to {
    -webkit-transform: rotateY(360deg);
    -o-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

@keyframes rotating {
  from {
    -ms-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    transform: rotateY(0deg);
  }
  to {
    -ms-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    -o-transform: rotateY(360deg);
    transform: rotateY(360deg);
  }
}

.rotating {
  -webkit-animation: rotating 1s linear infinite;
  -moz-animation: rotating 1s linear infinite;
  -ms-animation: rotating 1s linear infinite;
  -o-animation: rotating 1s linear infinite;
  animation: rotating 1s linear infinite;
}

.slow-rotating {
  -webkit-animation: rotating 2s linear infinite;
  -moz-animation: rotating 2s linear infinite;
  -ms-animation: rotating 2s linear infinite;
  -o-animation: rotating 2s linear infinite;
  animation: rotating 2s linear infinite;
}

div[role="button"] {
  cursor: pointer;
}

#ui {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  outline: 0;
}

#ui-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ui #backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  transition: opacity 0.5s;
}

#menu {
  width: 50%;
  height: 50%;
  z-index: 100;
  background: rgb(58, 96, 115);
  background: radial-gradient(
    circle,
    rgba(58, 96, 115, 1) 0%,
    rgba(22, 34, 42, 1) 100%
  );
  box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px,
    rgba(6, 24, 44, 0.65) 0px 4px 6px -1px,
    rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
  display: flex;
  flex-direction: column;
  transition: opacity 0.5s, visibility 0s linear 0.5s, transform 0.5s;
}

#menu.hide {
  transform: translateY(200%);
}

#menu .header {
  background-color: rgba(0, 0, 0, 0.25);
  color: #f7f36f;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 1.5rem;
}

#menu .menu-content {
  flex-grow: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: column;
  padding: 2rem;
}

.menu-content .button {
  background: white;
  width: 100%;
  padding: 1rem;

  box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px,
    rgba(6, 24, 44, 0.65) 0px 4px 6px -1px,
    rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
  text-transform: uppercase;
  color: #fff;
}

.menu-content .start {
  background: rgb(113, 161, 113);
  background: radial-gradient(
    circle,
    rgba(113, 161, 113, 1) 0%,
    rgba(33, 52, 31, 1) 100%
  );
}

.menu-content .shuffle {
  background: rgb(44, 83, 100);
  background: radial-gradient(
    circle,
    rgba(44, 83, 100, 1) 0%,
    rgba(32, 58, 67, 1) 100%
  );
}

#menu .footer {
  background-color: rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  color: #f7f36f;
}

#showMenuButton {
  z-index: 100;
  position: fixed;
  font-size: 1rem;
  bottom: 0;
  width: 20vw;
  background: rgb(58, 96, 115);
  background: radial-gradient(
    circle,
    rgba(58, 96, 115, 1) 0%,
    rgba(22, 34, 42, 1) 100%
  );
  box-shadow: rgb(6 24 44 / 40%) 0px 0px 0px 2px,
    rgb(6 24 44 / 65%) 0px 4px 6px -1px, rgb(255 255 255 / 8%) 0px 1px 0px inset;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  opacity: 0.5;
  transition: bottom 0.5s;
}

#showMenuButton:hover {
  opacity: 1;
}

#showMenuButton h1 {
  color: #f7f36f;
}

#showMenuButton.hide {
  bottom: -100%;
}

#result {
  z-index: 100;
  width: calc(100% / 2 - 5rem);
  height: calc(100% - 5rem);
  transition: width 1s, height 1s, opacity 0.5s;
}

#result .result-container {
  background-color: #e0c9a6;
  color: #06080f;
  border: 10px solid #06080f;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border 1s;
}

#result .info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#result .text {
  display: grid;
  gap: 1rem;
}

#result h1 {
  font-size: 6rem;
  transition: font-size 1s;
}

#result h2 {
  font-size: 4rem;
  transition: font-size 1s;
}

#result .button {
  transition: opacity 0.5s;
  background-color: #706453;
}

#result h3 {
  padding: 1rem;
  color: #fce1bb;
  font-size: 2rem;
  text-transform: uppercase;
}

#result.small {
  width: calc(100% / 4 - 2.5rem);
  height: calc(100% / 2 - 2.5rem);
}

#result.small .result-container {
  border: 5px solid #06080f;
}

#result.small h1 {
  font-size: 3rem;
}

#result.small h2 {
  font-size: 2rem;
}
