@font-face {
  font-family: DefaultFont;
  font-weight: normal;
  src: url("../fonts/Crispy\ Tofu.ttf");
}

* {
  font-family: DefaultFont;
  color: white;
  -webkit-text-stroke: 1px #1ba4b2;
}

body {
  display: flex;
  flex: auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

:root {
  /* --background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.8)); */
  --perfect-color: rgba(255, 101, 229, 0.8);
  --good-color: rgba(82, 236, 51, 0.8);
  --bad-color: rgba(207, 53, 53, 0.8);
  --miss-color: rgba(199, 184, 184, 0.8);
  --maxcombo-color: rgba(0, 110, 255, 0.8);
  --score-color: rgba(240, 202, 36, 0.8);
  /* --hit-effect: linear-gradient(to bottom, rgba(255, 255, 255, .5), rgba(255, 255, 255, .3)); */
  --hit-color: rgba(255, 255, 255, 0.8);
  --key-red: rgba(254, 45, 87, 1);
  --key-blue: rgba(28, 121, 228, 1);
  --key-orange: rgba(240, 128, 60, 1);

  --box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.6);

  --gameplay-zindex: 2;
  --taptostart-zindex: 6;
  --loader-zindex: 5;
  --landing-zindex: 3;
  --splashtp-zindex: 4;
}

html {
  font-size: 62.5%;
}

#canvas {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

h2 {
  padding: 1rem;
  text-transform: uppercase;
}

#topMenuContainer {
  width: 100%;
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

.topMenuInnerContainer {
  display: flex;
  width: 50%;
  flex-direction: row;
  align-items: center;
}

/* Similar to volumepausebtnContainer*/
#volumeControlContainer {
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#mute {
  cursor: pointer;
  height: auto;
  width: 85%;
}

#pause {
  cursor: pointer;
  height: auto;
  width: 15%;
  margin-right: 1%;
}

/*Chrome*/
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  #volumeContainer {
    position: absolute;
    top: 80%;
    height: 90px;
    display: none;
    align-items: center;
  }

  #volumeReflection {
    z-index: var(--gameplay-zindex);
    width: 0.1vw;
    height: 5vh;
    background-color: white;
    border-radius: 20px;
    position: absolute;
    top: 40%;
    left: 48%;
  }

  #volumeControl {
    overflow: hidden;
    width: 80px;
    -webkit-appearance: none;
    border-radius: 20px;
    background-color: #fed7a0;
    border-width: 2px;
    border-style: solid;
    transform: rotate(270deg);
  }

  #volumeControl::-webkit-slider-runnable-track {
    height: 10px;
    -webkit-appearance: none;
    background-color: var(--track-background, #ddd);
    margin-top: -1px;
  }

  #volumeControl::-webkit-slider-thumb {
    width: 10px;
    -webkit-appearance: none;
    height: 1px;
    background: none;
    box-shadow: -80px 0 0 80px var(--track-shadow, #ddd);
    cursor: pointer;
  }
}
/** FF*/
input[type="range"]::-moz-range-progress {
  background-color: #f88b09;
}
input[type="range"]::-moz-range-track {
  background-color: #fed7a0;
}
/* IE*/
input[type="range"]::-ms-fill-lower {
  background-color: #f88b09;
}
input[type="range"]::-ms-fill-upper {
  background-color: #fed7a0;
}

#timecontainer {
  background-image: url("../images/gameplay_assets/candyland_skin/in_game_buttons/timer.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  height: auto;
  width: 40%;

  align-items: center;
  justify-content: center;
  justify-items: center;
}

#scorecontainer {
  background-image: url("../images/gameplay_assets/candyland_skin/in_game_buttons/score.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  height: auto;
  width: 23%;

  align-items: center;
  justify-content: center;
  justify-items: center;
}

.scoretimertext {
  -webkit-text-stroke: 1px #975923;
  text-align: center;
}

.game {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  background: transparent;
}

#hit {
  position: absolute;
  width: 50%;
  height: 15%;
  top: 50%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
  display: none;
}

.hit__combo {
  width: 100%;
  height: 50%;
  font-size: 7rem;
  color: rgba(255, 199, 126, 0.8);
}

.hit__accuracy {
  position: absolute;
  width: 100%;
  height: 50%;
  font-size: 4rem;
}

.hit__accuracy--perfect {
  color: var(--perfect-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--good {
  color: var(--good-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--bad {
  color: var(--bad-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--miss {
  color: var(--miss-color);
  opacity: 0;
  animation: fade 1s;
}

/* removes chromecast button on android*/
video::-internal-media-controls-overlay-cast-button {
  display: none;
}

#splashVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#splashPage {
  height: 100%;
  width: 100%;
  position: absolute;

  display: block; /* Display by default */
  z-index: var(--splashtp-zindex);

  background-color: white;
}

#landingPage {
  height: 100%;
  width: 100%;
  position: absolute;

  background-image: url("../images/landingpage_assets/startscreen_bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  display: block; /* Display by default */
  z-index: var(--landing-zindex);
}

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

#landingLogo {
  width: 80%;
  height: auto;
  margin-top: 10%;
}

#landingBtnContainer {
  margin-bottom: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landingButtons {
  width: 50%;
  height: auto;
  cursor: pointer;
}

#howtoOverlay {
  height: 100%;
  width: 100%;
  position: absolute;

  display: none; /*hidden by deafult*/
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-color: transparent;
  z-index: var(--splashtp-zindex);

  box-shadow: var(--box-shadow); /*Transparent black overlay*/
}

#howtoModalContent {
  height: 95%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  background-image: url("../images/howtoplay_assets/htp_bg.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
#htpContent {
  height: 70%;
  width: auto;

  margin-top: 15%;
}

#htpInstructions {
  height: 5%;
  width: auto;

  margin-top: 8%;
}

#howtoArrowContainer {
  width: 65%;
  height: 8%;
  position: absolute;
  bottom: 12%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.htpArrows {
  height: 60%;
  cursor: pointer;
}

#htpClose {
  width: 15%;
  height: auto;
  position: absolute;
  top: 3%;
  right: 8%;
  cursor: pointer;
}

#gamePauseOverlay {
  height: 100%;
  width: 100%;
  position: absolute;

  display: none; /*hidden by deafult*/
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-color: transparent;
  z-index: var(--gameplay-zindex);

  box-shadow: var(--box-shadow); /*Transparent black overlay*/

  overflow-x: hidden;
  overflow-y: auto; /* Scrollable for mobile */
}

#gamePauseModalContent {
  width: 100%;
  height: 50%;
  padding-bottom: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;

  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.pauseMenuBtn {
  cursor: pointer;
  width: 30%;
  height: auto;
  margin-bottom: 5%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#gameCountdownOverlay {
  height: 100%;
  width: 100%;
  position: absolute;

  display: none; /*hidden by deafult*/
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-color: transparent;
  z-index: var(--gameplay-zindex);

  box-shadow: var(--box-shadow); /*Transparent black overlay*/
}

#gameCountdownContent {
  width: 100%;
  height: 50%;
  padding-bottom: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  animation: fadeinout 4s linear forwards;
}

#countdown {
  width: 20%;
  height: auto;
  position: absolute;
  top: 50%;
}

#gameOverOverlay {
  height: 100%;
  width: 100%;
  position: absolute;

  display: inline-block;

  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.5s linear;

  z-index: var(--gameplay-zindex);

  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
}

.gameOverOverlayInner {
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#gameOverModalContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: 42%;

  height: 60%;
  width: 99%;

  background-size: 100% 90%;
  background-repeat: no-repeat;
  background-position: center;
}

#congratsText {
  font-size: 2vw;
  margin-bottom: 1%;
}

#finalScore {
  font-size: 3.5vw;
  margin-top: 0%;
}

#finalScoreText {
  font-size: 1vw;
  text-align: center;
  margin-top: -8%;
  width: 80%;
}

.endScreenText {
  -webkit-text-stroke: 1px #975923;
}

#email {
  width: 75%;
  height: 11%;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 105%;
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: 1vw;
  text-align: center;
}

#emailSubmitBtn {
  font-size: 1.5vw;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

#modalButtonsContainer {
  width: 40%;
  height: 15%;
  margin-top: 2%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.playAgainBtnImg {
  width: 40%;
  cursor: pointer;
}

#loadingOverlay {
  height: 100%;
  width: 100%;
  position: absolute;

  background-image: url("../images/loading_assets/loading_bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: var(--loader-zindex);
}

#loaderContainer {
  height: 100%;
  width: 100%;
  position: absolute;

  background-image: url("../images/loading_assets/loader_front.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#progressText {
  font-size: 3vw;

  position: absolute;
  margin-left: auto;
  margin-right: auto;
  left: 50%;
  bottom: 30%;
  transform: translate(-50%, 0%);
}

#progress {
  width: 80%;
  height: 6px;
  position: absolute;
  bottom: 45%;
  background-color: #ffbc81;

  /* animation: progress 8s 1 linear; */
}

#tapToStartOverlay {
  height: 100%;
  width: 100%;
  position: absolute;
  z-index: 5;

  display: none; /*hide by default*/
  align-items: flex-end;
  justify-content: center;
}

#tapToStartText {
  font-size: 3vw;
  text-align: center;
  margin-bottom: 35%;
}

/*For mobile*/
@media screen and (max-width: 780px) {
  #congratsText {
    font-size: 7vw;
    margin-bottom: 1%;
  }

  #finalScore {
    font-size: 12vw;
    margin-top: 0%;
  }

  #finalScoreText {
    font-size: 4vw;
    text-align: center;
    margin-top: -8%;
    width: 80%;
  }
  #email {
    width: 75%;
    height: 11%;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 105%;
    border: none;
    font-family: "Poppins", sans-serif;
    font-size: 4vw;
    text-align: center;
  }

  #emailSubmitBtn {
    font-size: 5vw;
    background-color: transparent;
    border: none;
    cursor: pointer;
  }

  #progressText {
    font-size: 5vw;

    position: absolute;
    margin-left: auto;
    margin-right: auto;
    left: 50%;
    bottom: 30%;
    transform: translate(-50%, 0%);
  }

  #tapToStartText {
    font-size: 8vw;
    text-align: center;
    margin-bottom: 35%;
  }
}

@keyframes progress {
  0% {
    height: 0%;
  }
  25% {
    height: 10%;
  }
  50% {
    height: 20%;
  }
  75% {
    height: 30%;
  }
  100% {
    height: 40%;
  }
}

@keyframes fadeinout {
  0% {
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  98% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: scale(1, 1);
  }
  to {
    opacity: 1;
    transform: scale(2, 2);
  }
}

@keyframes fade {
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
