@font-face {
  font-family: DINProCondBlack;
  src: url('./fonts/DINPro-CondBlack.otf'),
       url('./fonts/DINPro-CondBlack.ttf');
}

@font-face {
  font-family: DINProCondBold;
  src: url('./fonts/DINPro-CondBold.otf'),
       url('./fonts/DINPro-CondBold.ttf');
}

@font-face {
  font-family: DINProCondMedium;
  src: url('./fonts/DINPro-CondMedium.otf'),
       url('./fonts/DINPro-CondMedium.ttf');
}

@font-face {
  font-family: DINProMedium;
  src: url('./fonts/DINPro-Medium.otf'),
       url('./fonts/DINPro-Medium.ttf');
}

@font-face {
  font-family: DINProRegular;
  src: url('./fonts/DINPro-Regular.otf'),
       url('./fonts/DINPro-Regular.ttf');
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: DINProMedium;
  color: black;
}

b {
  font-family: DINProCondMedium;
}

img {
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

body {
  display: flex;
  width: 100vw;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  justify-content: center;
  user-select: none;
  /* background: linear-gradient(#fff, #f4fdff); */
}

.intro, .intro-text, .transition, .tuto, .game, .end-game, .claim-reward , .form {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.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 .valentino-logo {
  width: 50%;
}

.top-container .unbox-the-party {
  width: 60%;
}

.intro .top-container .valentino-logo, .intro .top-container .unbox-the-party {
  margin-top: 15px;
}

.top-container span {
  text-transform: uppercase;
}

.intro .girl-gift {
  width: 100%;
  object-fit: contain;
}

.transition video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}


*::-moz-media-controls, *::-o-media-controls, *::-ms-media-controls, *::-webkit-media-controls-panel {
  display: none!important;
  -webkit-appearance: none;
}

/* Old shadow dom for play button */

*::-webkit-media-controls-play-button {
  display: none!important;
  -webkit-appearance: none;
}

/* New shadow dom for play button */

/* This one works! */

*::-webkit-media-controls-start-playback-button {
  display: none!important;
  -webkit-appearance: none;
}

video::-webkit-media-controls-volume-slider {
  display: none!important;
  -webkit-appearance: none;
}

video::-webkit-media-controls-mute-button {
  display: none!important;
  -webkit-appearance: none;
}

video::-webkit-media-controls-timeline {
  display: none!important;
  -webkit-appearance: none;
}

video::-webkit-media-controls-current-time-display {
  display: none!important;
  -webkit-appearance: none;
}


.tuto-message .texts {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.tuto-message .texts > div, .tuto-message .texts > div b {
  text-transform: uppercase;
  color: black;
  text-align: center;
  font-size: 1.2rem;
}

.game .slider {
  -webkit-appearance: none;
  width: 80%;
  height: 25px;
  background: none;
  background-image: url('./images/Rectangle_time.png');
  background-repeat: no-repeat;
  background-size: contain;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
  pointer-events: none
}

.game .slider:hover {
  opacity: 1;
}

.game .slider::-webkit-slider-thumb, .game .slider::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border: none;
  background: none;
  background-image: url('./images/logo_V.png');
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
}

.game .tuto-message {
  text-transform: uppercase;
  position: absolute;
  width: 100%;
  font-family: DINProCondMedium;
  text-align: center;
  line-height: 1.5rem;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.138);
}

#game-container .card-container > img {
  pointer-events: all;
}

#game-container .card-container.tuto::after {
  content: "";
  width: 70%;
  height: 70%;
  position: absolute;
  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%;
  }
}

.shake, #game-container .card-container.matched {
  animation: 1.1s 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-container .card-container.end-game-shake {
  animation: 2.1s ease-in-out endGameShakeCard;
}

@keyframes endGameShakeCard {
  0% { -webkit-transform: rotate(0deg); } 
  10% { -webkit-transform: rotate(-5deg); }
  20% { -webkit-transform: rotate(5deg); }
  30% { -webkit-transform: rotate(0deg); }
  40% { -webkit-transform: rotate(5deg); }
  50% { -webkit-transform: rotate(-5deg); }
  60% { -webkit-transform: rotate(0deg); }
  70% { -webkit-transform: rotate(-5deg); }
  80% { -webkit-transform: rotate(5deg); }
  90% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(-5deg); }
}

#game-container .card-container.bad-shake {
  animation: 0.7s ease-in-out badShakeCard;
}

@keyframes badShakeCard {
  0% { -webkit-transform: translate(3px, 0px) } 
  10% { -webkit-transform: translate(-1px, 0px) }
  20% { -webkit-transform: translate(-2px, 0px) }
  30% { -webkit-transform: translate(0px, 0px) }
  40% { -webkit-transform: translate(2px, 0px) }
  50% { -webkit-transform: translate(-1px, 0px) }
  60% { -webkit-transform: translate(-3px, 0px) }
  70% { -webkit-transform: translate(2px, 0px) }
  80% { -webkit-transform: translate(-1px, 0px) }
  90% { -webkit-transform: translate(3px, 0px) }
  100% { -webkit-transform: translate(1px, 0px) }
}

.game-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  height: 100%;
  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: DINProCondMedium;
  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.8em;
  justify-items: center;
}

.game-message {
  font-family: DINProMedium;
  position: absolute;
  left: auto;
  width: 85%;
  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);
  }
}

.game-container {
  width: 85vw;
  max-width: 380px;
  height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  position: absolute;
  top: 25%;
  overflow: hidden;
}

.game .bottom-container {
  width: 85vw;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: end;
}

.game .bottom-container .timer-container {
  width: 100%;
  height: 2vh;
  position: relative;
  max-height: 15px;
}

.game .bottom-container .timer-container img {
  width: 100%;
  position: absolute;
  height: 100%;
  top: 0;
  left: 1%;
  z-index: 0;
}

.game .bottom-container .timer-container .time {
  height: 100%;
  position: absolute;
  top: 0;
}

.game .bottom-container .timer-container .time img {
  position: absolute;
  width: auto;
  height: 250%;
  transform: translate(100%, -25%);
  z-index: 2;
  right: 5%;
  left: unset;
  object-fit: contain;
}

.game .bottom-container .timer-container .time div {
  position: absolute;
  top: 0;
  left: 0;
  right: 100%;
  width: 105%;
  height: 100%;
  background-color: white;
  z-index: 1;
}

.game .bottom-container .score-time-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 5%;
  margin-bottom: 2%;
}

.game .bottom-container .score-time-container .time-counter, .game .bottom-container .score-time-container .score {
  color: #e89bb0;
  font-family: DINProCondBold;
  font-size: 1.2rem;
}

.game .bottom-container .score-time-container .time-counter {
  font-size: 1.4rem;
}

.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;
}

@keyframes showCards {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.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.75s ease-out;
  backface-visibility: hidden;
  object-fit: contain;
}

.card-front {
  font-size: 2.8em;
  font-weight: 600;
  animation: showCards 0.7s;
}

.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 {
  padding: 0.5em;
  cursor: pointer;
  text-transform: uppercase;
  background-color: #030303;
  border: none;
  font-size: 1.35rem;
  width: 40%;
  min-width: 170px;
  max-width: 170px;
  height: 20%;
  max-height: 45px;
  font-family: DINProCondMedium;
  position: absolute;
  bottom: 5%;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

button.large {
  width: 55%;
  max-width: 260px;
}

.end-game .final-score-container, .form .final-score-container {
  display: flex;
  align-items: center;
  flex-direction: column;
  height: 15%;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.end-game .final-score-container {
  position: absolute;
  top: 20%;
  flex-direction: column;
  justify-content: space-between;
}

.end-game .final-score-container div, .form .final-score-container {
  text-align: center;
  text-transform: uppercase;
  font-family: DINProMedium !important;
}

.end-game .final-score-container div {
  display: flex;
  flex-direction: column;
}

.end-game .final-score-container .final-score, .form .final-score-container .form-final-score {
  font-family: DINProCondBlack !important;
  font-size: 1.7rem;
}

.end-game .flacon {
  position: absolute;
  top: 40%;
  height: 35%;
  object-fit: contain;
}

.end-game .congrats {
  position: absolute;
  bottom: 25%;
  border-radius: 5%;
  width: 80%;
  text-align: center;
  height: 12%;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: DINProCondMedium;
  line-height: 1.5rem;
  white-space: nowrap;
}

.end-game .claim-reward {
  position: absolute;
  bottom: 15%;
}

.end-game .play-again {
  position: absolute;
  bottom: 13%;
}

.end-game .subscribe {
  position: absolute;
  bottom: 5%;
  white-space: pre;
  font-size: 1rem;
}

.end-game .share {
  position: absolute;
  bottom: 10%;
}

.claim-reward .reward-text {
  display: flex;
  align-items: center;
  height: 15%;
  font-size: 2rem;
  text-transform: uppercase;
  position: absolute;
  top: 15%;
  font-family: DINProCondMedium;
}

.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: DINProCondMedium;
  line-height: 1.5rem;
  flex-direction: column;
}

.claim-reward .discount-container span {
  font-family: DINProRegular;
  color: #9F754D;
  font-size: 1.6rem;
}

.claim-reward .discover {
  position: absolute;
  bottom: 15%;
}

.claim-reward .play-again {
  position: absolute;
  bottom: 5%;
}

.form .dont-miss {
  text-transform: uppercase;
  text-align: center;
  font-size: 0.9rem;
  font-family: DINProRegular;
  transform: scaleX(0.92);
}

.form .form-container {
  width: 80%;
  height: 63%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form form {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 90%;
}

form .input-container {
  width: 100%;
  display: flex;
  align-items: last baseline;
  border-bottom: solid pink 2px;
  white-space: pre;
}

.form .form-container form input {
  cursor: pointer;
  text-transform: uppercase;
  font-size: 1.2rem;
  width: 100%;
  max-height: 55px;
  font-family: DINProCondMedium;
  border: none;
    border-bottom-width: medium;
    border-bottom-style: none;
    border-bottom-color: currentcolor;
}

.form .form-container form .input-container:nth-child(1) input, 
.form .form-container form .input-container:nth-child(2) input {
  padding-left: 5rem;
}

.form .form-container form .input-container:nth-child(3) input {
  padding-left: 3rem;
}

.form .form-container form input::placeholder {
  color: black;
  font-family: DINProCondBold;
  opacity: 1;
}

.form .form-container form input.not-valid {
  border-bottom: solid #9e1414 2px;
}

.form .form-container form input[name="email"] {
  /* font-size: 1rem; */
}

.form .form-container form label, .form form span {
  text-transform: uppercase;
  font-size: 1.2rem;
  width: 18%;
  max-height: 55px;
  font-family: DINProCondMedium;
}

.form .form-container form label {
  position: absolute;
  pointer-events: none;
}

.form .form-container form button {
  position: unset;
}

.form .form-container form .checbox-policy {
  display: flex;
  align-items: center;
  justify-content: start;
  width: 100%;
  white-space: nowrap;
  font-size: 0.8rem;
}

.form .form-container form .checbox-policy div {
  text-transform: uppercase;
  width: 60%;
  font-size: 0.7rem;
}

.form .form-container form .checbox-policy input {
  position: relative;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  vertical-align: middle;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  border: solid #e89bb0 2px;
  margin-right: 5%;
  margin-bottom: 0;
}

.form .form-container form .checbox-policy input:checked::after {
  content: "";
  background-color: #e89bb0;
  position: absolute;
  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);
  }
}

.cancel {
  bottom: 13%;
}

.submit:disabled {
  opacity: 0.45;
}

@media screen and (min-width: 600px) {
  body {
    width: 40vw;
    transform: translateX(80%);
  }

  .intro, .tuto, .end-game, .claim-reward, .form {
    /* max-width: 420px; */
  }
  
  .game-container .stats-container {
    max-width: 500px;
    min-width: 350px;
    width: 40vw;
  }

  .stats-container {
    font-size: 1.4rem;
  }
}

@media screen and (orientation: portrait){
  #rewardbutton {
    font-size: 1rem;
    padding-top: 15px;
  }
}