body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: transparent;
  touch-action: none;
}

@media (orientation: landscape) {
  #bottom,
  #middle,
  #top,
  #shadow {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
  }
}

@media (orientation: portrait) {
  #bottom,
  #middle,
  #top,
  #shadow {
    /* background: transparent; */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* background-color: black; */
  }
}

#fork {
  display: block;
  position: absolute;
  left: 100px;
  top: -1;
  width: 100px;
  background-size: auto;
  background-repeat: no-repeat;
  height: 250px;
  cursor: pointer;
  z-index: 9;
}
#info a {
  color: #666666;
}
#info {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 750px;
  height: 500px;
  margin: -270px auto auto -375px;
  color: #555555;
  font-size: 13px;
}
#loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-progress {
  margin-top: 20px;
  font-family: "Rubik", sans-serif;
  font-size: 14px;
  color: #000000;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.loading-progress-bar {
  width: 200px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.loading-progress-fill {
  height: 100%;
  background-color: #000000;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}
.canvas {
  display: block;
  position: absolute;
  z-index: 0;
  height: 100%;
}
video {
  display: none;
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 100px;
  margin: -250px auto auto -375px;
}

#text {
  position: absolute;
  display: block;
  z-index: 99;
  font-size: 90em;
  color: black;
}

#scoreBoard {
  background-size: contain;
  background-repeat: no-repeat;
  height: 3em;
  width: 3em;
  background-image: url("https://res.cloudinary.com/shulgirit/image/upload/v1643275166/wiply/Platform%20Default%20Images/ninja/scoreBoard/1.png");
  background-size: contain;
  text-align: center;
  color: black;
  font-size: 2em;
  padding-top: 10px;
  /* position: absolute; */
  position: absolute;
  left: 0.5em;
  top: 0.5em;

    /* Temparorily removed scoreboard by creating display: none, remove the line below to bring back the scoreboard */

}

.animate {
  -webkit-animation: slide 0.5s forwards;
  -webkit-animation-delay: 0.1s;
  animation: slide 0.5s forwards;
  animation-delay: 0.1s;
  animation-direction: initial;
}
.animate2 {
  -webkit-animation: slide-out 0.5s forwards;
  -webkit-animation-delay: 0.1s;
  animation: slide-out 0.5s forwards;
  animation-delay: 0.1s;
}

@-webkit-keyframes slide {
  100% {
    top: 0;
  }
}

@keyframes slide {
  100% {
    top: 0;
  }
}

@keyframes slide-out {
  100% {
    top: -400px;
  }
}

@-webkit-keyframes slide-out {
  100% {
    top: -400px;
  }
}

.popup {
  position: fixed;
  width: 50%;
  background: white;
  box-shadow: 1rem 1.7rem 3.2rem rgb(0 0 0 / 50%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  font-family: "Rubik";
  text-align: center;
  z-index: 10000;
}

.popup h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 5px;
  z-index: 10000;
}

.popup h3 {
  font-size: 20px;
  font-weight: 300;
  margin: 0;
  z-index: 10000;
}

.popup button {
  background: linear-gradient(#414141, black);
  color: white;
  padding: 10px 50px;
  font-size: 20px;
  border-radius: 10px;
  border: none;
  margin: 10px auto;
  display: block;
}

#scoreBoard {
  display: none;
}

#scoreBoard span {
  display: inline-block; 
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.score-pop {
  animation: pop 0.3s ease;
}

@media screen and (max-width: 600px) {
  #loading {
    transform: translate(-50%, -50%);
    padding: 25px 30px;
  }
  
  .loading-spinner {
    width: 45px;
    height: 45px;
    border-width: 3px;
  }
  
  .loading-progress {
    font-size: 12px;
  }
  
  .loading-progress-bar {
    width: 180px;
  }
}
.start-instruction-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  pointer-events: none;
  text-align: center;
}

.instruction-text {
  font-family: "Rubik", sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #000000;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9),
               -1px -1px 2px rgba(255, 255, 255, 0.9),
               1px 1px 2px rgba(255, 255, 255, 0.9);
  margin-top: -120px;
  margin-bottom: 0;
  animation: pulseText 2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes pulseText {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

@media screen and (max-width: 600px) {
  .instruction-text {
    font-size: 24px;
    margin-top: -100px;
  }
}

@media screen and (max-width: 600px) {
  #loading {
    transform: translate(-50%, -50%);
    padding: 25px 30px;
  }
  
  .loading-spinner {
    width: 45px;
    height: 45px;
    border-width: 3px;
  }
  
  .loading-progress {
    font-size: 12px;
  }
  
  .loading-progress-bar {
    width: 180px;
  }
  
}

