body {
  padding: 0;
  margin: 0;
  background-color: #a7d97f;
  font-family: "Roboto Mono", monospace;
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

/* story-container */
#story-container,
#escape-container,
#caught-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(245, 245, 220, 0.6);
  border-radius: 30px;
  border: 1px solid black;
  width: 45%;
  height: 45%;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
}

#story-container h1 {
  margin-top: 0;
}

#story-container p {
  margin: 0 0 20px 0;
}

.card {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.instruction-btn,
.tryagain-btn,
.playagain-btn,
.play-btn {
  background: none;
  height: 45px;
  width: 150px;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  border: 1.5px solid black;
  font-family: "Roboto Mono", monospace;
  cursor: pointer;
  transition: all ease-in-out 0.3s;
  font-size: 1rem;
}

.instruction-btn:hover,
.tryagain-btn:hover,
.playagain-btn:hover,
.play-btn:hover {
  background-color: #a7d97f;
}

/* instructions */
#instructions-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(245, 245, 220, 0.6);
  border: 1px solid black;
  border-radius: 30px;
  width: 45%;
  height: 55%;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
}

#instructions-container h1 {
  padding: 0;
  margin: 0;
}

.card p {
  padding: 5px;
  margin: 0;
}

.warn-text {
  color: rgb(255, 69, 69);
  margin: 0;
  padding: 0;
}

.guide-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: rgba(249, 249, 249, 0.3);
  border-radius: 10px;
  border: 1.5px solid #a7d97f;
  width: 85%;
  height: 35%;
  margin-bottom: 10px;
  box-shadow: inset 2px 2px 8px rgba(0, 255, 55, 0.638);
}

.guide-container p {
  margin: 0;
  padding: 10px 0 10px 10px;
}

/* hidden and pop up */
#instructions-container {
  display: none;
}

#instructions-container.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

#instructions-container.active {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}

#story-container,
#escape-container,
#caught-container {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

#instructions-container {
  animation: slideIn 0.6s ease-in;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}

/* game-container  */
#game-container {
  display: none;
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #a7d97f;
  animation: popIn 0.5s ease-in;
}

@keyframes popIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#game-container.active {
  display: flex;
}

.header {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  width: 50%;
}

.score {
  display: flex;
  align-items: center;
  text-align: center;
  height: 50px;
  background-color: rgba(245, 245, 220, 0.9);
  padding: 0 10px 0 10px;
  border-radius: 15px;
  border: 2px solid black;
  font-size: 1rem;
}

.tutorial {
  display: flex;
  align-items: center;
  text-align: center;
  height: 50px;
  background-color: rgba(245, 245, 220, 0.9);
  padding: 0 10px 0 10px;
  border-radius: 15px;
  border: 2px solid black;
  font-size: 1rem;
}

.alert {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 50, 50, 0.722);
  color: white;
  padding: 10px 20px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 15px;
  border: 2px solid black;
  display: none;   
}

/* player and bicycle */
#player {
  width: 70px;
  height: 110px;
  position: absolute;
  z-index: 3;
}
#bicycle {
  width: 90px;
  height: 60px;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}

/* owner */
.house {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 20%;
  width: 150px;
  height: 160px;
  z-index: 1;
}
.owner {
  position: absolute;
  width: 60px;
  height: 70px;
  left: 700px;
  top: 200px;
  z-index: 3;
  display: none;
}
#owner-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4444;
  color: white;
  padding: 12px 20px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  z-index: 9999;
  display: none;
  animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* bushes */
.bush {
  width: 80px;
  height: 60px;
  position: absolute;
  z-index: 2;
}

/* mango tree */
.tree {
  position: absolute;
  width: 120px;
  height: 120px;
  z-index: 2;
}
.mango-tree {
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}
.mango {
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: rgb(255, 193, 77);
  border-radius: 50%;
  transition: opacity 0.3s ease;
}
.mango.collected {
  opacity: 0;
}

/* caught */
#caught-container h1 {
  margin: 0;
  padding: 0;
}

#caught-container {
  display: none;
}

/* escape */
#escape-container
/* #story-container,
#instruction-container */ {
  display: none;
}

#escape-container h1 {
  margin: 0;
  padding: 0;
}
