body,
html {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  touch-action: none;
}

#levelContainer {
  will-change: transform;
  position: relative;
  height: 100%;
  overflow: hidden;
}


@media (min-width: 1024px) and (max-width: 1190px) {
  #levelContainer {
    position: relative;
    height: 100%;
    overflow-x: auto;
    will-change: transform;
  }
}




/*--------------------------------------------------------------
  # Castelium-Welt 
  --------------------------------------------------------------*/
#castelium {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;

}

#castelium img {
  position: absolute;
  height: 100%;
  width: auto;
  top: 0;
  left: 0;
}


/*--------------------------------------------------------------
#Preloader
--------------------------------------------------------------*/

#preloader {
  --hue: 270;
  --size: 100px;
  --border: 10px;
  --speed: 1.5s;
  --blur: var(--border);
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background-color: #1a1a1a;
  accent-color: #d013ff;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.6s ease-out;
}

.loader {
  width: var(--border);
  aspect-ratio: 1;
  background: white;
  border-radius: 50%;
  position: absolute;
  --y: calc((var(--size) * -0.5) + (var(--border) * 0.5));
  transform: rotate(0deg) translateY(var(--y));
  animation: spin var(--speed) infinite linear;
}

.loader::before {
  content: "";
  position: absolute;
  inset: calc(var(--border) * -0.5);
  border-radius: 50%;
  background: white;
  filter: blur(var(--blur));
  z-index: -1;
}

.loader::after {
  content: "";
  width: var(--size);
  aspect-ratio: 1;
  position: absolute;
  top: 0%;
  left: 50%;
  translate: -50% 0;
  background: conic-gradient(white,
      hsl(var(--hue), 100%, 70%),
      hsl(var(--hue), 100%, 10%),
      transparent 65%);
  border-radius: 50%;
  mask: radial-gradient(transparent calc(((var(--size) * 0.5) - var(--border)) - 1px),
      white calc((var(--size) * 0.5) - var(--border)));
}

@keyframes spin {
  to {
    transform: rotate(-360deg) translateY(var(--y));
  }
}


/*--------------------------------------------------------------
   # Modal - Castelium
  --------------------------------------------------------------*/

.intro-modal {
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 500px;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.intro-modal-content {
  background-image: url("../img/Button/modal_castelium.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  justify-content: space-between;
  padding: 100px;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 600px;
  height: 400px;
  max-height: 90%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.intro-modal-content p {
  font-size: 18px;
  color: #fff;
  font-family: var(--default-font);
  line-height: 1.8;
  margin-top: -10px;
}

button {
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 17px;
  border: none;
  letter-spacing: 0.05em;
  font-family: var(--heading-font);
  pointer-events: auto;
}

.intro-modal-content button {
  justify-content: right;
  align-items: center;
  padding: 25px 10px;
  margin-top: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.5;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  text-align: center;
  overflow: visible;
  align-self: center;
  width: auto;
}


.intro-modal-content button:hover {
  filter: drop-shadow(0px 0px 20px rgba(255, 255, 255, 0.906));
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#intro-modal.show {
  animation: fadeIn 0.1s ease-in-out;
  transform: translateZ(0);
}


#start-button {
  top: 77%;
  left: 80%;
  transform: translateX(-50%);
}

#continue-button {
  top: 77%;
  left: 80%;
  transform: translateX(-50%);
}


#follow-up-modal .intro-modal-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#follow-up-modal .intro-modal-content p {
  font-size: 20px;
  line-height: 1.8;
  margin: 10px 0;
  margin-top: -15%;
  color: #fff;
  font-family: var(--default-font);
}

/*--------------------------------------------------------------
   # Modal für Codefeld
  --------------------------------------------------------------*/

.image-modal-castelium {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.image-modal-content-castelium {
  background-image: url("../img/Button/modal_castelium.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  justify-content: space-between;
  padding: 100px;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 600px;
  height: 400px;
  max-height: 90%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.image-modal-content-castelium p {
  font-size: 20px;
  margin-top: 40px;
  color: #fff;
  font-family: var(--default-font);
  line-height: 1.8;
  margin-bottom: 20px;
}

.close-button {
  background: none;
  position: fixed;
  border: none;
  color: #ffff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  position: absolute;
  top: 89%;
  left: 78%;
  transform: translateX(-50%);
}


.close-button:hover {
  filter: drop-shadow(0px 0px 20px rgba(255, 255, 255, 0.906));

}


/*--------------------------------------------------------------
  # Charakter und Eier
  --------------------------------------------------------------*/

#eggCrack {
  top: 12vh;
  left: 93vh;
  position: absolute;
  z-index: 10;
  width: 15vh;
  overflow: hidden;
}

#eggCrack img {
  height: 12vh;
}


#idle,
#rennen {
  top: 48vh;
  left: 48vh;
  position: absolute;
  z-index: 10;
  width: 12.4vh;
  overflow: hidden;
}

#idle img {
  height: 15vh;
}

#rennen img {
  height: 15vh;
}

#spucken img {
  height: 23vh;
}


#spucken {
  z-index: 11;
  position: absolute;
  width: 38vh;
  top: 43vh;
  left: 79vh;
  overflow: hidden;
}


#void-angriff img {
  position: absolute;
  z-index: 20;
}

#void-angriff {
  position: absolute;
  top: 48vh;
  left: 83vh;
  width: 103px;
  height: 112px;
  overflow: hidden;
  z-index: 20;
}


/*--------------------------------------------------------------
  # Void - End Boss
--------------------------------------------------------------*/

div#endboss {
  position: absolute;
  top: 23vh;
  left: 107vh;
  z-index: 10;
  height: 40vh;
  width: auto;
}


svg.endboss {
  height: 100%;
  width: auto;
  display: block;
}

#void-schatten {
  position: absolute;
  width: 14vh;
  height: 3vh;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: calc(21vh + 40vh - 1.5vh);
  left: calc(112vh + 7vh);
  z-index: 9;
}



div#endbossLevel5 {
  position: absolute;
  top: 19vh;
  left: 140vh;
  z-index: 10;
  height: 40vh;
  width: auto;
}


svg.endbossLevel5 {
  height: 100%;
  width: auto;
  display: block;
}

/*--------------------------------------------------------------
  # Lebensbalken
--------------------------------------------------------------*/

.health-bar {
  position: absolute;
  z-index: 20;
  width: 57vh;
  background: #ccc;
  overflow: hidden;
  transform: skewX(-25deg);
}

.health-bar .bar {
  height: 100%;
  background: linear-gradient(to right, #ff0000, #660000);
  transition: width 0.3s ease;

}

#naran-health .bar {
  height: 2vh;
  background: linear-gradient(to right, #ff0000, #660000);

}

#void-health .bar {
  height: 2vh;
  background: linear-gradient(to left, #00bfff, #005f6a);
}


#naran-heart {
  position: absolute;
  height: 4vh;
  top: 9vh;
  left: 6vh;
  width: 4vh;
  z-index: 30;

}

#naran-heart img {
  height: 4vh;
}

#void-heart {
  position: absolute;
  height: 4vh;
  top: 9vh;
  right: 7vh;
  width: 4vh;
  z-index: 30;
}

#void-heart img {
  height: 4vh;
}

#void-health {
  top: 10vh;
  right: 9vh;
}

#naran-health {
  top: 10vh;
  left: 9vh;
}

.commentary {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px gold, 0 0 10px gold;
  white-space: nowrap;
  z-index: 25;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
}

#naran-commentary {
  top: 15vh;
  left: 20vh;
}

#void-commentary {
  top: 15vh;
  right: 20vh;
}

.damage-display {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px gold, 0 0 10px gold;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#naran-damage {
  top: 10vh;
  left: 55vh;
}

#void-damage {
  top: 10vh;
  right: 55vh;
}



.balken {
  position: absolute;
  width: 100%;
  background-color: black;
  z-index: 12;
}

.balken-oben {
  top: -20%;
  height: 15%;
}

.balken-unten {
  bottom: -20%;
  height: 15%;
}

@media (min-width: 600px) and (max-width: 1060px) {

  .balken {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 12;
  }


  .balken-oben {
    top: -20%;
    height: 15%;
  }

  .balken-unten {
    bottom: -20%;
    height: 15%;
  }

}


/*--------------------------------------------------------------
  # Lebensbalken - media Query
--------------------------------------------------------------*/

@media (min-width: 600px) and (max-width: 1060px) {

  .health-bar {
    position: absolute;
    z-index: 20;
    width: 30vh;
    background: #ccc;
    overflow: hidden;
    transform: skewX(-25deg);
  }

  .health-bar .bar {
    height: 100%;
    background: linear-gradient(to right, #ff0000, #660000);
    transition: width 0.3s ease;

  }

  #naran-health .bar {
    height: 2vh;
    background: linear-gradient(to right, #ff0000, #660000);

  }

  #void-health .bar {
    height: 2vh;
    background: linear-gradient(to left, #00bfff, #005f6a);
  }


  #naran-heart {
    position: absolute;
    height: 4vh;
    top: 9vh;
    left: 63vh;
    width: 4vh;
    z-index: 30;

  }

  #naran-heart img {
    height: 4vh;
  }

  #void-heart {
    position: absolute;
    height: 4vh;
    top: 9vh;
    right: -60vh;
    width: 4vh;
    z-index: 30;
  }

  #void-heart img {
    height: 4vh;
  }

  #void-health {
    top: 10vh;
    right: -58vh;
  }

  #naran-health {
    top: 10vh;
    left: 65vh;
  }

  .commentary {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px gold, 0 0 10px gold;
    white-space: nowrap;
    z-index: 25;
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
  }

  #naran-commentary {
    top: 12vh;
    left: 70vh;
  }

  #void-commentary {
    top: 12vh;
    right: -60vh;
  }

  .damage-display {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px gold, 0 0 10px gold;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
  }

  #naran-damage {
    top: 10vh;
    left: 80vh;
  }

  #void-damage {
    top: 10vh;
    right: -50vh;
  }

}


#EndText {
  font-family: var(--default-font);
  position: absolute;
  color:#ff7f4dff;
  font-size: 2rem;
  text-align: center;
  top: 40%;
  transform-origin: center;
  width: 100%;
  z-index: 20;
}