@font-face {
  font-family: GothamMedium;
  src: url('./assets/fonts/Gotham-Bold.otf');
}

/*@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: GothamMedium;
  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, .tuto, .game, .end-game {
  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;
}

.hugo-logo {
  position: absolute;
  width: 30%;
  z-index: -5;
}

.intro .top-container .hugo-logo {
  margin-top: 5px;
}

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


.intro video {
  position: absolute;
  z-index: -10;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.intro .button-play{
  position: absolute;
  bottom: 50px;
  /*width: 85vw;
  max-width: 380px;*/
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  width: 60%;
  max-width: 300px;
}

.intro .play{
  width: -webkit-fill-available;
  object-fit: contain;
}

.button-play-video{
  width: 100%;
  height: 100%;
}

*::-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 .background-game-base, .end-game .background-end {
  height: 100%;
  position: absolute;
  z-index: -10;
  width: 100%;
}

.end-game .background-end{
  object-fit: cover;
}

.game .background-game-tv {
/*  height: 100%;*/
  position: absolute;
  z-index: -5;
  width: 100%;
}

.game .time-counter {
  color: white;
  font-size: 1.3rem;
  position: absolute;
  right: 20%;
  top: 10%;
  z-index: -5;
/*  text-shadow: 1px 1px 1px #f00, -1px 1px 0px #f00, -1px -1px 0px #f00, 1px -1px 0px #f00;*/
/*  text-shadow: 1px 1px 1px #f00, -1px 1px 1px #f00, -1px -1px 1px #f00, 1px -1px 1px #f00;*/
}

.game .tuto-message {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.game .tuto-message .popup-rules {
  width: 85%;
  max-width: 500px;
  height: auto;
  z-index: 5;
  pointer-events: all;
}

.game .ingredients-container {
  height: 499px;
  width: 345px;
  position: absolute;
  top: 50%;
  transform: translateY(-40%);
}

.game .game-ingredient {
  position: absolute;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  pointer-events: all;
/*  background-color: blue;*/
}


.game .game-ingredient .tv-ingredient-back {
  height: -webkit-fill-available;
  width: -webkit-fill-available;
  object-fit: contain;
}

.game .game-ingredient .tv-ingredient-front {
  height: 100%;
/*  width: 100%;*/
}

.game .game-ingredient .tv-ingredient-front.leather{
  width: 100% !important;
}


.game .game-ingredient .tv-ingredient-glitch {
  height: 100%;
  width: 100%;
}

.game .tv-ingredient-front .flipped, .game .tv-ingredient-back .flipped {
  display: none;
}

#ingredient1{
 /* width: 150px;
  height: 100px;
  top: 25px;
  left: 70px;*/
  width: 129px;
  height: 80px;
  top: 18px;
  left: 87px;
}
#ingredient2{
  /*width: 100px;
  height: 80px;
  top: 45px;
  right: 16px;*/
  width: 94px;
  height: 52px;
  top: 48px;
  right: 29px;
}
#ingredient3{
 /* width: 130px;
  height: 79px;
  top: 131px;
  left: 69px;*/
  width: 124px;
  height: 72px;
  top: 110px;
  left: 79px;
}
#ingredient4{
  /*width: 125px;
  height: 78px;
  top: 132px;
  left: 207px;*/
  width: 123px;
  height: 74px;
  top: 106px;
  left: 212px;
}
#ingredient5{
  /*width: 100px;
  height: 92px;
  top: 218px;
  left: 37px;*/
  width: 129px;
  height: 76px;
  top: 190px;
  left: 10px;
}
#ingredient6{
  /*width: 140px;
  height: 95px;
  top: 218px;
  left: 143px;*/
  width: 112px;
  height: 72px;
  top: 192px;
  left: 152px;
}
#ingredient7{
  /*width: 130px;
  height: 85px;
  top: 318px;
  left: 23px;*/
  width: 103px;
  height: 69px;
  top: 275px;
  left: 53px;
}
#ingredient8{
  /*width: 130px;
  height: 80px;
  top: 322px;
  left: 159px;*/
  width: 120px;
  height: 71px;
  top: 277px;
  left: 168px;
}
#ingredient9{
  /*width: 120px;
  height: 88px;
  top: 410px;
  left: 50px;*/
  width: 93px;
  height: 60px;
  top: 357px;
  left: 76px;
}
#ingredient10{
  /*width: 140px;
  height: 88px;
  top: 411px;
  left: 177px;*/
  width: 123px;
  height: 66px;
  top: 358px;
  left: 179px;
}

/*.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 .ingredients-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 {
  animation: 1.1s ease-in-out shakeCard;
}

@keyframes shakeCard {
  0% { -webkit-transform: translate(0px, 0px) } 
  20% { -webkit-transform: translate(2px, 0px) }
  60% { -webkit-transform: translate(-2px, 0px) }
  80% { -webkit-transform: translate(2px, 0px) }
  100% { -webkit-transform: translate(0px, 0px) }
}

.game .ingredients-container .matched {
  animation: 0.8s ease-in-out goodShakeCard;
}

@keyframes goodShakeCard {
  0% { -webkit-transform: scale(1); }
  50% { -webkit-transform: scale(1.2); }
  100% { -webkit-transform: scale(1); }
}

.game .ingredients-container .end-game-shake {
  animation: 2s 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); }
}*/

@keyframes endGameShakeCard {
  0% { -webkit-transform: scale(1); }
  25% { -webkit-transform: scale(0.9); }
  50% { -webkit-transform: scale(1.1); }
  75% { -webkit-transform: scale(0.9); }
  100% { -webkit-transform: scale(1); }
}

.game .ingredients-container .bad-shake {
  animation: 0.5s 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) }
}*/

@keyframes badShakeCard {
  0% { -webkit-transform: translate(0px, 0px) } 
  20% { -webkit-transform: translate(2px, 0px) }
  60% { -webkit-transform: translate(-2px, 0px) }
  80% { -webkit-transform: translate(2px, 0px) }
  100% { -webkit-transform: translate(0px, 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 {
  position: absolute;
  bottom: 12%;
  width: 100%;
  height: 30%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  pointer-events: none;
}

.game .bottom-container .tuto-ingredient {
  height: 100px;
  width: 100%;
  pointer-events: all;
}

.game .bottom-container .popup-ingredient {
  width: -webkit-fill-available;
  pointer-events: all;
}


.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 .results-container {
  position: absolute;
  width: 80%;
  height: 30%;
  top: 32%;
  align-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.end-game .end-text {
  width: 100%;
  margin-top: 10px;
}

.end-game .results-container .button-play-again {
/*  position: absolute;*/
/*  bottom: 240px;*/
  top: 50svh;
  width: 60%;
  max-width: 180px;
  margin-bottom: 10px;
 /* display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;*/
}

.end-game .results-container .end-time {
/*  position: absolute;*/
/*  bottom: 240px;*/
/*  top: 47%;*/
/*  top: 46svh;*/
  width: 60%;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
/*  text-shadow: 1px 1px 1px #f00, -1px 1px 0px #f00, -1px -1px 0px #f00, 1px -1px 0px #f00;*/
}

.end-game .end-score {
  position: absolute;
/*  bottom: 240px;*/
  top: 46%;
  width: 60%;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
}

.end-game .play-again {
  width: -webkit-fill-available;
  object-fit: contain;
}

.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 (min-height: 600px) and (min-width: 300px) and (orientation: portrait) {
  .game .ingredients-container{
    scale : 0.9;
  }
}

@media screen and (min-height: 700px) and (min-width: 350px) and (orientation: portrait) {
  .game .ingredients-container{
    scale : 1;
  }
}

@media screen and (min-height: 800px) and (min-width: 350px) and (orientation: portrait) {
  .game .ingredients-container{
    scale : 1.1;
  }
}

@media screen and (min-height: 950px) and (min-width: 400px) and (orientation: portrait) {
  .game .ingredients-container{
    scale : 1.2;
  }
}*/

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