img {
  max-width: 100%;
  max-height: 300px;
}

body {
  margin: 0;
}

#screen {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
}
#game {
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  top: 0;
  left: 0;
  background-size: cover;
}
#start {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  background-image: url(imges/startsida.svg);
  background-size: cover;
  top: 0;
}

#start_knapp {
  position: absolute;
  top: 49%;
  left: 40%;
  width: 48%;
  aspect-ratio: 425/253;
  background-image: url(imges/playbutton.svg);
  background-size: cover;
  margin: 0;
  padding: 0;
}

#start_knapp:hover {
  cursor: pointer;
}

#game_over {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url(imges/gameover1.svg);
  background-size: cover;
}
#level_complete {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url(imges/youwin1.svg);
  background-size: cover;
}

#genstart1,
#genstart2 {
  position: absolute;
  top: 41%;
  left: 44%;
  width: 20%;
  aspect-ratio: 440/110;
  background-image: url(imges/playagainbutton.svg);
  background-size: cover;
}

#genstart1,
#genstart2:hover {
  cursor: pointer;
}

.skjul {
  display: none;
}

#game_background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url(imges/hem.svg);
  background-size: cover;
  pointer-events: none;
  margin-bottom: -5px;
}
#game_elements {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

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

#timglas {
  position: relative;
  width: 3%;
  aspect-ratio: 110/205;
  left: 0%;
  top: 4%;
}

#full {
  position: absolute;
  background-image: url(imges/tidslut.svg);
  background-size: cover;
  width: 100%;
  height: 100%;
  z-index: 2;
}

#tom {
  position: absolute;
  background-image: url(imges/tid.svg);
  background-size: cover;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.timer {
  animation-name: timer_kf;
  animation-duration: 20s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes timer_kf {
  0% {
    clip-path: inset(0 0 0);
  }
  100% {
    clip-path: inset(100% 0 0);
  }
}

#life_board {
  width: 40%;
  aspect-ratio: 10/1;
  position: absolute;
  top: 16%;
  left: 0%;
  pointer-events: none;
  display: flex;
}

#liv1 {
  background-image: url(imges/liv.svg);
  aspect-ratio: 101/178;
  width: 10%;
  background-size: cover;
}

#score_board {
  width: 10%;
  aspect-ratio: 2/1;
  position: absolute;
  top: 25%;
  left: 0%;
  pointer-events: none;
}

/*spelelementer*/

#tomato_container {
  width: 10%;
  aspect-ratio: 4/4;
  position: absolute;
}

#tomato_sprite {
  width: 100%;
  height: 100%;
  background-image: url(imges/tomat.svg);
  background-size: cover;
}

#aubegine_container {
  width: 10%;
  aspect-ratio: 4/4;
  position: absolute;
}

#aubegine_sprite {
  width: 100%;
  height: 100%;
  background-image: url(imges/aubegine.svg);
  background-size: cover;
}

#zuccini_container {
  width: 10%;
  aspect-ratio: 4/4;
  position: absolute;
}

#zuccini_sprite {
  width: 100%;
  height: 100%;
  background-image: url(imges/zuccini.svg);
  background-size: cover;
}

#rat_container {
  width: 10%;
  aspect-ratio: 3/4;
  position: absolute;
}

#rat_sprite {
  width: 100%;
  height: 100%;
  background-image: url(imges/rat.svg);
  background-size: cover;
}

.pos1 {
  top: 0%;
  left: 85%;
}

.pos2 {
  top: 0%;

  left: 45%;
}

.pos3 {
  top: 0%;

  left: 65%;
}

.pos4 {
  top: 0%;
  left: 75%;
}

.delay1 {
  animation-delay: 0s;
}

.delay2 {
  animation-delay: 0.5s;
}

.delay3 {
  animation-delay: 1s;
}

.delay4 {
  animation-delay: 1.5s;
}

.speed1 {
  animation-duration: 1.5s;
}

.speed2 {
  animation-duration: 0.8s;
}

.speed3 {
  animation-duration: 0.5s;
}

.hidden {
  display: none;
}

/*Style*/
.menu {
  background-color: #fffef2; /* Vit bakgrund */
  font-family: Arial, Helvetica, sans-serif;
}

.menu a {
  color: #823119;
  text-decoration: none;
  padding: 10px 15px;
  display: inline-block;
  font-size: 3rem;
}

h2,
h1,
p,
h3 {
  font-family: Arial, Helvetica, sans-serif;
  color: #823119;
  padding: 10px 20px;
  font-weight: 500;
}

#points {
  font-family: Arial, Helvetica, sans-serif;
  color: #823119;
  font-weight: 400;
  font-size: 1.5rem;
  padding-top: 3%;
}

body {
  background-color: #fffef2;
}

.indexbackground {
  background-image: url(imges/startsida_1.svg);
  background-size: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 11%;
  left: 0;
}

.playbutton {
  position: absolute;
  top: 73%;
  left: 48%;
  width: 15%;
  height: 5%;
  border-radius: 50px;
  background-color: #823119;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 1000;
  text-align: center;
  padding: 15px;
  padding-top: 18px;
  text-decoration: none;
  color: white;
  font-size: 2rem;
}

.margin {
  padding: 20px;
}

#sounds {
  padding: 20px;
}
