.hide {
  display: none;
}

/* spilelementer */
#screen {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
}

#game {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

#start {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/startskærm.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

#info {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/infoskærm.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

#start_knap {
  width: 20%;
  height: 14%;
  position: absolute;
  top: 78%;
  left: 32%;
  background-image: url("assets/start_knap.svg");
  background-size: cover;
  overflow: hidden;
}

#start_knap2 {
  width: 20%;
  height: 14%;
  position: absolute;
  top: 75%;
  left: 42%;
  background-image: url("assets/start_knap.svg");
  background-size: cover;
  overflow: hidden;
}

#info_knap {
  width: 20%;
  height: 14%;
  position: absolute;
  top: 78%;
  left: 52.5%;
  background-image: url("assets/info_knap.svg");
  background-size: cover;
  overflow: hidden;
}

#game_over {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/taberskærm.svg");
  z-index: 30;
  background-size: contain;
  background-repeat: no-repeat;
}

#game_over_tekst {
  font-size: 20px;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  position: absolute;
  top: 50%;
  left: 35%;
}

#level_complete {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/vinderskærm.svg");
  z-index: 30;
  background-size: contain;
  background-repeat: no-repeat;
}

#level_complete_points {
  font-size: 20px;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  position: absolute;
  top: 50%;
  left: 34%;
}

#level_complete_tekst {
  font-size: 20px;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  position: absolute;
  top: 62%;
  left: 35%;
}

#spil_igen {
  width: 20%;
  height: 14%;
  position: absolute;
  top: 75%;
  left: 43%;
  background-image: url("assets/spil_igen_knap.svg");
  background-size: cover;
  overflow: hidden;
}

#spil_igen2 {
  width: 20%;
  height: 14%;
  position: absolute;
  top: 75%;
  left: 43%;
  background-image: url("assets/spil_igen_knap.svg");
  background-size: cover;
  overflow: hidden;
}

#game_background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/baggrund_uden_sne.svg");
  background-size: cover;
  overflow: hidden;
}

#sne {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0px;
  background-image: url("assets/sne.svg");
  background-size: cover;
}

#sne2 {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/sne.svg");
  background-size: cover;
  animation-delay: 15s;
}

.sne_fall {
  animation-name: sne_kf;
  animation-duration: 30s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-fill-mode: both;
}

@keyframes sne_kf {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}
#game_elements {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
#jorden {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/sne_paa_jord.svg");
  background-size: cover;
  overflow: hidden;
  pointer-events: none;
}

#game_mellemgrund1 {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/mellemgrund_02.svg");
  background-size: cover;
  pointer-events: none;
}

#game_mellemgrund2 {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/mellemgrund_01.svg");
  background-size: cover;
  pointer-events: none;
}

#game_foreground {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("assets/forgrund.svg");
  background-size: cover;
  pointer-events: none;
}

#game_ui {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

#nissedreng_container {
  position: absolute;
  width: 10%;
  aspect-ratio: 370/615;

  /*
    top: 50%;
    left: 30%;
    */
}

#nissedreng_sprite {
  width: 100%;
  height: 100%;
  background-image: url("assets/nissedreng.svg");
  background-size: 100%;
  background-repeat: no-repeat;
}

#nissepige_container {
  position: absolute;
  width: 10%;
  aspect-ratio: 375/610;
  /*
    top: 74%;
   left: 65%;
   */
}

#nissepige_sprite {
  width: 100%;
  height: 100%;
  background-image: url("assets/nissepige.svg");
  background-size: 100%;
  background-repeat: no-repeat;
}

#cookie_container {
  position: absolute;
  width: 6%;
  aspect-ratio: 170/165;
  /*
    top: 52%;
    left: 69%;
    */
}

#cookie_sprite {
  width: 100%;
  height: 100%;
  background-image: url("assets/cookie.svg");
  background-size: 100%;
  background-repeat: no-repeat;
}

#time_board {
  position: absolute;
  width: 4%;
  aspect-ratio: 101/118;
  top: 4%;
  left: 95%;
  background-image: url("assets/timer_ur.svg");
  background-size: cover;
}

#time_container {
  position: absolute;
  width: 50%;
  top: 110%;
  left: 20%;
  aspect-ratio: 6/30;
  border: 5px solid #e5e5e5;
  border-radius: 10px;
  background-color: #e5e5e5;
}

#time_sprite {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
}

.myTimer {
  animation-name: myTimer_kf;
  animation-duration: 30s;
  animation-iteration-count: 1;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  border-radius: 10px;
}

@keyframes myTimer_kf {
  0% {
    transform: scaleY(1);
    background-color: rgb(74, 190, 243);
  }
  50% {
    background-color: rgb(46, 122, 181);
  }
  100% {
    transform: scaleY(0);
    background-color: rgb(32, 64, 103);
  }
}

#score_board {
  position: absolute;
  width: 8%;
  aspect-ratio: 145/130;
  top: 16%;
  left: 2%;
  background-image: url("assets/point_alene.svg");
  background-size: cover;
  font-weight: 700;
  font-size: 20px;
  font-family: Arial, Helvetica, sans-serif;
}

#life_board {
  position: absolute;
  width: 6%;
  aspect-ratio: 115/100;
  top: 4%;
  left: 2%;
  background-image: url("assets/liv_alene.svg");
  background-size: cover;
  font-weight: 700;
  font-size: 20px;
  font-family: Arial, Helvetica, sans-serif;
}

#score {
  position: absolute;
  top: 50%;
  left: 80%;
}

#liv {
  position: absolute;
  top: 30%;
  left: 110%;
}

/* animationer */
.frys {
  animation-play-state: paused;
}

.pulse {
  animation-name: pulse_kf;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

@keyframes pulse_kf {
  0% {
    transform: scale(1);
  }

  70% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

.drej-forsvind {
  animation-name: drej_kf;
  animation-duration: 1s;
  animation-iteration-count: 1;
  animation-timing-function: linear;
  animation-fill-mode: both;
}

@keyframes drej_kf {
  0% {
    transform: rotate(0);
    opacity: 1;
  }

  100% {
    transform: rotate(360deg);
    opacity: 0;
  }
}

.pattern {
  animation-name: pattern_kf;
  animation-duration: 1s;
  animation-iteration-count: 1;
  animation-fill-mode: both;
  animation-direction: reverse;
}

@keyframes pattern_kf {
  100% {
    transform: translateX(-20%);
    /*left: 56vw;*/
  }

  50% {
    transform: translateX(40%);
    /*left: 62vw;*/
  }

  0% {
    transform: translateX(-20%);
    /*left: 56vw;*/
  }
}

.pattern2 {
  animation-name: pattern2_kf;
  animation-duration: 1s;
  animation-iteration-count: 1;
  animation-fill-mode: both;
  animation-direction: reverse;
}

@keyframes pattern2_kf {
  100% {
    transform: translateX(5%);
    /*left: 20vw;*/
  }
  50% {
    transform: translateX(35%);
    /*left: 28vw;*/
  }

  0% {
    transform: translateX(5%);
    /*left: 20vw;*/
  }
}

/*
  .pattern_nisse {
    animation-name: pattern_nisse_kf;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-direction: reverse;
  }
  
  @keyframes pattern_nisse_kf {
    100% {
      transform: translateY(60%);
      left: 28vw;
      top: 18vw;
    }
    0% {
      transform: translateY(10%);
      left: 30vw;
    }
  }
  */

/* positioner og delay */

.pos1 {
  top: 48%;
  left: 28%;
}

.pos2 {
  top: 48%;
  left: 60%;
}

.pos3 {
  top: 45%;
  left: 80%;
}

.pos4 {
  top: 45%;
  left: 6%;
}

.delay1 {
  animation-delay: 0s;
}

.delay2 {
  animation-delay: 0.8s;
}

.delay3 {
  animation-delay: 1.2s;
}

.delay4 {
  animation-delay: 2s;
}
