body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background-size: cover;
  background-position: center;
  background-image: url("images/haunted-house.png");

  overflow: hidden;

  color: white;
  font-family: Arial;
  text-align: center;

  transition: background 1s ease;
}

.game-container {
  max-width: 600px;
  width: 90%;

  background: rgba(0, 0, 0, 0.6);
  padding: 30px;
  border-radius: 10px;

  margin: auto;
}


#story {
  white-space: pre-line;
  line-height: 1.6;
  font-size: 18px;

  margin: 20px 0;

  animation: fadeIn 1s ease-in;
}

#choices {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 90%;
  max-width: 1000px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

#choices.single {
  top: auto;
  bottom: 40px;
  transform: none;
  justify-content: center;
}

#choices button {
  pointer-events: auto;

  padding: 18px 30px;
  font-size: 18px;

  min-width: 180px;
  max-width: 250px; /* prevents giant stretching */

  background-color: darkred;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;

  transition: all 0.3s ease;
}

#choices button:hover {
  background-color: red;
  transform: scale(1.1);
  box-shadow: 0 0 15px red;
}

/* LEFT BUTTON */
#choices button:first-child {
  left: 60px;
}

/* RIGHT BUTTON */
#choices button:last-child {
  right: 60px;
}


button:hover {
  background-color: red;
  transform: scale(1.1);
  box-shadow: 0 0 15px red;
}


#restart {
  display: none;

  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);

  padding: 14px 28px;
  font-size: 16px;

  background-color: darkred;
  color: white;
  border: none;
  border-radius: 8px;

  cursor: pointer;
  z-index: 200;
}

#restart:hover {
  background-color: red;
  transform: translateX(-50%) scale(1.1);
}

#restart {
  display: none;

  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);

  padding: 14px 28px;
  font-size: 16px;

  background-color: darkred;
  color: white;
  border: none;
  border-radius: 8px;

  cursor: pointer;
  z-index: 200;
}

#restart:hover {
  background-color: red;
  transform: translateX(-50%) scale(1.1);
}


#health {
  position: fixed;
  top: 20px;
  right: 30px;

  background: rgba(0,0,0,0.6);
  padding: 10px 15px;
  border-radius: 8px;

  font-size: 18px;
  z-index: 100;
}


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

@keyframes shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-10px, 5px); }
  40% { transform: translate(10px, -5px); }
  60% { transform: translate(-8px, 4px); }
  80% { transform: translate(8px, -4px); }
  100% { transform: translate(0, 0); }
}

.shake {
  animation: shake 0.4s ease;
}