body {
  color: #222;
  font-family: Arial, sans-serif;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
  background-color: #eee;
  margin: 0;
  margin-top: 200px;
}

main {
  position: relative;
}

#hanging {
  display: none;
  position: absolute;
  background: no-repeat center bottom;
  background-image: url("hanging.webp");
  left: 360px;
  top: -25px;
  width: 100px;
  height: 42px;
  z-index: 100;
}

#hanging:hover + #face,
#face:hover {
  transform: translateY(-90px);
}

#face {
  position: absolute;
  left: 376px;
  background: no-repeat;
  background-image: url("face.webp");
  width: 75px;
  height: 92px;
  transition: all ease 1s;
  cursor: pointer;
}

#hint {
  display: none;
  position: absolute;
  left: 420px;
  border-radius: 100%;
  border: solid 2px black;
  background-color: #fff;
  padding: 25px 20px;
  top: -170px;
}

#hint::before {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 60px;
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid black;
  border-radius: 25px;
}

#hint::after {
  content: "";
  position: absolute;
  bottom: -50px;
  left: 45px;
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid black;
  border-radius: 15px;
}

#grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: solid 1px black;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 1px 1px 3px #ccc;
  z-index: 10;
}

.item {
  display: block;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  border: solid 1px black;
  padding: 10px;
  width: 250px;
  height: 250px;
  background: no-repeat center center;
}

.wait {
  background-image: url("question-mark.webp");
}

.search {
  display: flex;
}

.search.error {
  background-color: #cc1122;
}

.search.close {
  background-color: #f8e114;
}

.found {
  background-size: cover;
}

.found:hover {
  opacity: 0.8;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

input {
  align-self: center;
  border: solid #555 2px;
  border-radius: 5px;
  padding: 5px 10px;
}

[type="submit"] {
  background-color: #28c;
  cursor: pointer;
}

[type="submit"]:hover {
  background-color: #3ad;
}

h3 {
  display: inline;
  padding: 3px 12px;
  padding-left: 23px;
  background-color: #05a;
  color: white;
  position: absolute;
  left: 0;
  bottom: 15px;
  margin: 0px;
  text-transform: capitalize;
}

ol {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 640px) {
  #grid {
    display: block;
  }

  .item {
    width: 300px;
    height: 300px;
  }

  #hanging {
    left: 120px;
  }

  #face {
    left: 136px;
  }

  #hint {
    left: 30px;
  }

  #hint::after {
    left: 75px;
  }
}

#happy-btn {
    display: none;
    margin: 50px auto;
    border-radius: 5px;
    border: solid 1px black;
    background-color: #28c;
    cursor: pointer;
    text-decoration: none;
    color: black;
    padding: 10px 25px;
    z-index: 1000;
    font-size: 25px;
}

#happy-btn:hover {
  background-color: #3ad;
}