body {
  background-color: #f0f0f0;
}

.container {
  height: 90vh;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: blur(30px);
}

.map {
  width: 750px;
  max-width: 750px;
  height: 650px;
  max-height: 650px;
  background-image: url("./empty-space.png");
}

.row{
  display: flex;
  width: 100%;
  aspect-ratio: 15/1;
}

.player {
  position: absolute;
  background-image: url('./altima2.png');
  will-change: transform, background-position;
  z-index: 1;
}

.enemy {
  position: absolute;
  background-image: url('./ifrit.png');
  will-change: transform, background-position;
  z-index: 2;
}

.lands {
  height: 100%;
  aspect-ratio: 1;
  background-image: url("./empty-space.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: inline-block;
}

.block {
  height: 100%;
  aspect-ratio: 1;
  background-image: url("./block.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: inline-block;
}

.rock {
  height: 100%;
  aspect-ratio: 1;
  background-image: url("./rock.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: inline-block;
}

.door {
  height: 100%;
  aspect-ratio: 1;
  background-image: url("./door.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: inline-block;
}

.bomb {
  position: absolute;
  height: 100%;
  aspect-ratio: 1;
  background: url("bomb_sprite.png") no-repeat center center;
  background-size: cover;
  animation: bomb-fuse 3s steps(3) infinite;
}

.explosion {
  position: absolute;
  background: url("../assets/exp2.png") no-repeat;
  will-change: background-position;
  opacity: 1;
}

.pause-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.pause-content {
  text-align: center;
  color: white;
}

.pause-content button {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
}

.hidden {
  display: none;
}

#hud {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  font-size: 20px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
  z-index: 1000;
  text-align: center;
}

#gameOverScreen,#winnerScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.game-over-content {
  text-align: center;
}

.game-over-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.game-over-content button {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
}

.winner-content {
  text-align: center;
}

.winner-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.winner-content button {
  font-size: 18px;
  padding: 10px 20px;
  cursor: pointer;
}

.blurred {
  filter: blur(30px);
}

.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
}

.loading-text {
  color: white;
  font-size: 48px;
  z-index: 10;
  text-align: center;
}

.player-death {
  animation: playerDeath 2s forwards; 
}

@keyframes playerDeath {
  0% {
    transform: scale(1) translate3d(50, 50, 0);
    opacity: 1;
  }
  50% {
    transform: scale(0.7) translate3d(50, 50, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(0) translate3d(50, 50, 0);
    opacity: 0;
  }
}

@keyframes bomb-fuse {
  0% {
    filter: brightness(1);
  }

  25% {
    filter: brightness(2);
  }

  50% {
    filter: brightness(3);
  }

  75% {
    filter: brightness(2);
  }

  100% {
    filter: brightness(1);
  }
}

@media (max-width: 800px) {
    .map{
      width: 90vw;
      height: calc(90vw * 0.867);
    } 
}

@media (max-width: 425px) {
  #hud{
    width: 75vw;
  }
}

@media (max-width: 220px) {
  #hud{
    flex-wrap: wrap;
  }
}

@media (max-height: 720px){
  .map{
    width: calc(90vh * 1.143);
    height: 89vh;
  } 
}