@font-face {
  font-family: GothamBook;
  src: url(media/Gotham-Book7f34eb053257cab413dc.otf);
}

@font-face {
  font-family: GothamBlack;
  src: url(media/Gotham-Black520408fe3462b1d14d05.otf);
}

@font-face {
  font-family: GothamMedium;
  src: url(media/Gotham-Mediuma52599fa8cce74bab773.otf);
}

@font-face {
  font-family: GothamBookItalicBold;
  src: url(media/Gotham-UltraItalic5abd054d2b25ba33bb97.otf);
}

@font-face {
  font-family: GothamBlackItalic;
  src: url(media/Gotham-BlackItalic3a3952ba0ca9bf838527.otf);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: GothamBook;
  color: white;
}

b {
  font-family: GothamMedium;
}

body {
  display: flex;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background-color: rgba(0.5, 0.5, 0.5, 0.3);
  overflow: hidden;
  justify-content: center;
  user-select: none;
}

.intro, .tuto, .game, .end-game, .claim-reward , .form {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hide {
  display: none !important;
}

img.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.top-container {
  width: 100%;
  height: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.top-container .boss {
  width: 35%;
}

.top-container span {
  text-transform: uppercase;
}

.intro .title {
  height: 10%;
  font-family: GothamMedium;
  font-size: 1.8rem;
}

.intro .flacon {
  height: 45%;
  object-fit: contain;
  filter: drop-shadow(0 0 0.95rem #eac19d);
}

.intro .play-and-win {
  height: 13%;
  display: flex;
  align-items: center;
  font-size: 1.3rem;
}

.game .tuto-message {
  text-transform: uppercase;
  position: absolute;
  top: 65%;
  transform: translate(0%, -50%);
  background-color: #000000d1;
  border-radius: 5%;
  width: 110%;
  padding: 5%;
  font-family: GothamMedium;
  text-align: center;
  line-height: 1.5rem;
}

#game-container .card-container.tuto::after {
  content: "";
  width: 70%;
  height: 70%;
  position: absolute;
  background-image: url(media/clicking-min8ee35e66a741164f3db1.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  bottom: 5%;
  left: 10%;
}

#game-container .card-container:nth-of-type(1)::after {
  animation: 0.65s ease-in-out 0s infinite alternate tutoClickIdle;
}

#game-container .card-container:nth-of-type(2)::after {
  animation: 0.65s ease-in-out 0.1s infinite alternate tutoClickIdle;
}

@keyframes tutoClickIdle {
  0% {
       bottom: 0%;
  }
  100% {
       bottom: 10%;
  }
}

#game-container .card-container.shake {
  animation: 1.2s ease-in-out shakeCard;
}

@keyframes shakeCard {
  0% { -webkit-transform: translate(2px, 1px) rotate(0deg); } 
  10% { -webkit-transform: translate(-1px, -2px) rotate(-5deg); }
  20% { -webkit-transform: translate(-2px, 0px) rotate(5deg); }
  30% { -webkit-transform: translate(0px, 2px) rotate(0deg); }
  40% { -webkit-transform: translate(1px, -1px) rotate(5deg); }
  50% { -webkit-transform: translate(-1px, 2px) rotate(-5deg); }
  60% { -webkit-transform: translate(-2px, 1px) rotate(0deg); }
  70% { -webkit-transform: translate(2px, 1px) rotate(-5deg); }
  80% { -webkit-transform: translate(-1px, -1px) rotate(5deg); }
  90% { -webkit-transform: translate(2px, 2px) rotate(0deg); }
  100% { -webkit-transform: translate(1px, -2px) rotate(-5deg); }
}

.game-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70vw;
  height: 70vw;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 60%;
  border-radius: 0.6em;
  box-shadow: 0 0.9em 2.8em rgba(86, 66, 0, 0.2);
  opacity: 1;
  transition: opacity 0.7s ease-out;
}

.game-tuto-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #00000069;
}

.bottom-tuto-message {
  text-transform: uppercase;
  font-family: GothamMedium;
  position: absolute;
  bottom: -20%;
  text-align: center;
  font-size: 1.4rem;
  transition: bottom 0.3s ease-out;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  gap: 0.6em;
  justify-items: center;
}

.game-message {
  font-family: GothamBookItalicBold;
  position: absolute;
  left: auto;
  width: 100%;
  height: 100%;
  display: flex;
  font-size: 2rem;
  align-items: center;
  justify-content: center;
  transform: skew(0deg);
  transition: left 0.45s cubic-bezier(0,.09,.28,.87);
}

.game-message.show {
  animation: messageAppear 0.25s ease-out forwards;
  animation-iteration-count: 1
}

.game-message.remove {
  animation: messageDisapear 0.25s ease-out forwards;
  animation-iteration-count: 1
}

@keyframes messageAppear {
  0% {
    left: -100%;
    transform: skew(0deg);
  }
  0%, 80% {
    transform: skew(-20deg);
  }
  90% {
    left: 10%;
  }
  100% {
    left: 0%;
    transform: skew(0deg);
  }
}

@keyframes messageDisapear {
  0% {
    left: 0%;
    transform: skew(0deg);
  }
  0%, 80% {
    transform: skew(-20deg);
  }
  100% {
    left: 110%;
    transform: skew(0deg);
  }
}

.stats-container {
  width: 70vw;
  text-align: right;
  display: flex;
  align-items: end;
  justify-content: space-between;
  position: absolute;
  transform: translate(0%, -50%);
  bottom: 65%;
}

.stats-container .score {
  font-family: GothamMedium;
}

.stats-container .time-container {
  display: flex;
  justify-content: start;
  align-items: center;
  width: 30%;
}

.card-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  align-self: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.card-front,
.card-back {
  position: absolute;
  border-radius: 5px;
  width: 100%;
  height: 100%;
  padding: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.55s ease-out;
  backface-visibility: hidden;
  object-fit: contain;
}

.card-front {
  font-size: 2.8em;
  font-weight: 600;
}

.card-back {
  transform: rotateY(180deg);
}

div.black .card-front, div.black .card-back {
  background-color: #010304;
}

div.brown .card-front, div.brown .card-back {
  background-color: #7a5c40;
}

div.gray .card-front, div.gray .card-back {
  background-color: #c1c1c2;
}

.card-container.flipped .card-front {
  transform: rotateY(180deg);
}

.card-container.flipped .card-back {
  transform: rotateY(0deg);
}

button {
  border-radius: 0.3em;
  padding: 0.5em;
  cursor: pointer;
  text-transform: uppercase;
  background-color: #030303;
  border: solid #5C452E 2px;
  font-size: 1.4rem;
  width: 40%;
  max-width: 170px;
  height: 20%;
  max-height: 55px;
  font-family: GothamMedium;
}

button.large {
  width: 50%;
  max-width: 240px;
}

.end-game .final-score-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 15%;
  font-size: 1.4rem;
  text-transform: uppercase;
  position: absolute;
  top: 15%;
}

.end-game .final-score-container .final-score {
  font-family: GothamMedium;
  font-size: 1.8rem;
}

.end-game .flacon {
  position: absolute;
  top: 30%;
  height: 30%;
  object-fit: contain;
  filter: drop-shadow(0 0 0.95rem #eac19d);
}

.end-game .congrats {
  position: absolute;
  bottom: 25%;
  /* background-color: #030303; */
  border-radius: 5%;
  width: 80%;
  text-align: center;
  height: 12%;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: GothamMedium;
  line-height: 1.5rem;
}

.end-game .claim-reward {
  position: absolute;
  bottom: 15%;
}

.end-game .play-again {
  position: absolute;
  bottom: 5%;
}

.claim-reward .reward-text {
  display: flex;
  align-items: center;
  height: 15%;
  font-size: 2rem;
  text-transform: uppercase;
  position: absolute;
  top: 15%;
  font-family: GothamMedium;
}

.claim-reward .flacon {
  position: absolute;
  top: 30%;
  height: 30%;
  object-fit: contain;
  filter: drop-shadow(0 0 0.95rem #eac19d);
}

.claim-reward .discount-container {
  position: absolute;
  bottom: 25%;
  background-color: #030303;
  border-radius: 5%;
  width: 80%;
  text-align: center;
  height: 12%;
  text-transform: uppercase;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  font-family: GothamMedium;
  line-height: 1.5rem;
  flex-direction: column;
}

.claim-reward .discount-container span {
  font-family: GothamBlackItalic;
  color: #9F754D;
  font-size: 1.6rem;
}

.claim-reward .discover {
  position: absolute;
  bottom: 15%;
}

.claim-reward .play-again {
  position: absolute;
  bottom: 5%;
}

.form .fill-informations {
  text-transform: uppercase;
  text-align: center;
}

.form .form-container {
  width: 80%;
  height: 63%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form form {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 90%;
}

.form .form-container form input {
  border-radius: 0.3em;
  padding: 0.5em;
  cursor: pointer;
  text-transform: uppercase;
  background-color: #030303;
  border: solid #5C452E 2px;
  font-size: 1.2rem;
  width: 100%;
  height: 20%;
  max-height: 55px;
  font-family: GothamMedium;
}

.form .form-container form input.not-valid {
  border: solid #9e1414 4px;
}

.form .form-container form input[name="email"] {
  font-size: 1rem;
}

.form .form-container form label, .form form span {
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: 3%;
  margin-top: 5%;
}


.form .form-container form .checbox-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  white-space: nowrap;
  font-size: 0.8rem;
}

.form .form-container form .checbox-policy input {
  position: relative;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  border-radius: 50%;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  border: solid #5C452E 2px;
  background-color: #030303;
}

.form .form-container form .checbox-policy input:checked::after {
  content: "";
  background-color: #C68341;
  position: absolute;
  border-radius: 50%;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: showPolicyChecked 0.1s ease-out forwards;
  animation-iteration-count: 1
}

@keyframes showPolicyChecked {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.submit:disabled {
  opacity: 0.45;
}

@media screen and (min-width: 600px) {
  .intro, .tuto, .game, .end-game, .claim-reward, .form {
    max-width: 420px;
  }
  
  .game-wrapper {
    width: 60vw;
    height: 60vw;
    max-width: 420px;
    max-height: 420px;
    top: 65%;
    overflow: hidden;
  }

  .stats-container {
    font-size: 1.4rem;
  }
}

@media screen and (orientation: portrait){
  #rewardbutton {
    font-size: 1rem;
    padding-top: 15px;
  }
}
