/* IMPORTING WEBFONTS */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700,800,300');
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P');
@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');

body {
  background-image: url(../img/bg.png);
  background-repeat: repeat;
}

input, label, .teacher-select h2 {
	/* display: none; */
}

#game-container {
  position: relative;
  width: 600px;
  height: 500px;
  background-image: url(../img/map.png);
  /* background-position: center; */
  background-position: 23px 0px;
  background-size: auto;
  background-repeat: no-repeat;
  margin: 0 auto;
  margin-top: 20px;
  cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjbQg61aAAAADUlEQVQYV2P4//8/IwAI/QL/+TZZdwAAAABJRU5ErkJggg=='),
  url(images/blank.cur),
  none !important;
  animation: fadein 2s;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.character {
  position: absolute;
  width: 24px;
  height: 24px;
}

.zombie {
  background-color: transparent;
  background-image: url(../img/ghost.png);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  animation: shake 1.7s;
  animation-iteration-count: infinite;
}

.teacher {
  background-color: transparent;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.teacher-select {
  text-align: center;
  animation: fadein 2s;
}

.teacher-select h2 {
  font-size: 14px;
}

.teacher-select label {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: #fff;
  text-shadow: 1px 1px 0 #555;
}

#money-display,
#lives-display {
  text-align: right;
  margin-bottom: 12px;
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: #fff;
  animation: fadein 5s;
  text-shadow: 1px 1px 0 #555;
}

#lives-display {
  /*
  background-image: url(../img/heart.png);
  background-repeat: no-repeat;
  background-position: 0px -5px;
  background-size: 24px 24px;
  */
  position: absolute;
  top: 10px;
  left: 250px;
  /* text-indent: 30px; */
}

#money-display {
  position: absolute;
  top: 10px;
  right: 250px;
}

#game-title h1, h2 {
  margin-top: 50px;
  font-family: 'Press Start 2P', cursive;
  color: #fff;
  text-shadow: 1px 1px 0 #555;
  text-align: center;
  animation: fadein 2s;
}

#game-title h1 {
  font-size: 24px;
}

#game-title h2 {
  font-size: 24px;
  margin-top: 0px;
  color: #880808;
  text-shadow: 1px 1px 0 #fff;
  font-family: "Creepster", system-ui;
}

#game-info {
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  margin-top: 40px;
  text-align: center;
  text-shadow: 1px 1px 0 #555;
  line-height: 18px;
  animation: fadein 2s;
}

#speech-bubble {
	position: absolute;
	bottom: 10px;
	right: 20px;
  animation: fadein 2s;
}

#start-button {
  background: rgba(50,50,50,0.5);
  border:0;
  box-shadow:3px 3px 0 rgba(255,255,255,0.3);
  color:#fff;
  cursor: pointer;
  display:inline-block;
  font-family:'Press Start 2P', cursive;
  margin-top:20px;
  padding:20px 0;
  position:relative;
  text-align:center;
  text-shadow:2px 2px 0 #444;
  width:200px;
}
#start-button:active {
  box-shadow:none;
  left:3px;
  top:3px;
}

#version-info {
  bottom: 0px;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  position: absolute;
  text-shadow: 1px 1px 0 #555;
}

#highScoreTitle {
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 18px;
  text-shadow: 1px 1px 0 #555;
  position: absolute;
  top: 20px;
  left: 40px;
  animation: fadein 2s;
}

#highScoresList {
  list-style-type: none;
  position: absolute;
  top: 50px;
  left: 0px;
  animation: fadein 2s;
}

#highScoresList li {
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  text-shadow: 1px 1px 0 #555;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 20px 1fr 60px; /* placering | namn | poäng */
  gap: 10px;
  padding: 6px 0;
}

#highScoresList .score {
  text-align: right;
}

/* GAME CONTROLS */
#gameControls {
  visibility: hidden;
  position:absolute;
  left:100px;
  bottom: 150px;
}
#gameControls a,
#actionButton {
  background: rgba(50,50,50,0.5);
  border:0;
  color:#fff;
  font-family:'Press Start 2P', cursive;
  padding:20px 10px 10px 10px;
  text-shadow:2px 2px 0 #444;
}

#dUp {position:relative; left: 52px;}
#dRight {position:relative; top: 50px; left: 50px;}
#dLeft {position:relative; top: 50px; left: -170px;}
#dDown {position:relative; top: 100px; left: -60px;}

#actionButton {
  visibility: hidden;
  text-decoration: none;
  padding:15px;
  border-radius: 5px;
  position: absolute;
  bottom:100px;
  right:100px;
}

/* ANIMATE SHAKE */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* iPad styles */
@media only screen and (min-device-width: 768px) and (max-device-width: 1080px) and (orientation: landscape) {
	#gameControls,
  #actionButton {visibility: visible;}
}
