@import url("https://fonts.googleapis.com/css2?family=Bungee+Tint&display=swap");

html,
body {
  margin: 0;
  padding: 0;
  background-color: lightgray;
  background-image: url(../images/fondo-castillo.png);
  background-size: cover;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.title {
  font-family: "Harry P", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 80px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 50px;
  position: relative;
  overflow: hidden;
  font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}

#start-screen.container {
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.img-logo {
  margin: 20px 0 20px 0;
  animation: rotate 8s ease-in-out 1;
}

#mute-button {
  position: fixed;
  top: 40px;
  left: 20%;
  z-index: 1000;
  cursor: pointer;
  opacity: 0.7;
  
}

#instructions {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  width: 90%;
  max-width: 1000px;
  margin-top: 15px;
  text-align: center;
}

.instruction-card {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  transition: transform 0.4s ease;
  text-align: left;
  margin-bottom: 5px;
  margin-top: 0px;
}

.instruction-card:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.instruction-card h3 {
  font-size: 1.3rem;
  margin-top: 0;
  text-align: center;
}

.instruction-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.instruction-card ul li {
  margin: 10px 0;
  font-size: 1rem;
  display: flex;
  align-items: center; 
  
}

.instruction-card kbd {
  background-color: #020202;
  border: 1px solid #aaa;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 1rem;
}

.instruction-card strong {
  color: #ffcc00;
}

.instruction-card p {
  font-size: 1rem;
  margin: 0;
}


.instruction-card img.character-image {
  width: 30px;
  height: auto;
  margin-right: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.survival {
  text-align: center;
}

#player-name {
  margin-top: 10px;
  background-color: rgba(63, 15, 43, 0.671);
  border: 3px solid rgba(0, 0, 0, 0.4);
  text-align: center;

}

input, select, textarea {
  color: #ffcc00;
}

::placeholder {
  color: #ffcc00;
}

.myButton {
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
  padding: 15px 30px; 
  border-radius: 12px; 
  font-family: 'Georgia', serif;
  font-weight: bold;
  text-decoration: none;
  background-image: linear-gradient(
    to right,
    rgba(235, 56, 160, 0.37) 0%,
    rgba(235, 56, 160, 0.20) 50%,
    rgba(235, 56, 160, 0.10) 100%
  ); 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8); 
  border: 3px solid rgba(0, 0, 0, 0.4);
  display: inline-block;
  margin-top: 20px; 
  transition: transform 0.3s ease;
  text-align: center;
  background-color: rgb(0, 0, 0); 
}

.myButton:hover {
  background-image: linear-gradient(
    to right,
    rgba(224, 222, 221, 0.9) 0%,
    rgba(224, 222, 221, 0.575) 50%,
    rgba(224, 222, 221, 0.253) 100%
  ); 
  transform: scale(1.05); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5); 
}

.myButton:active {
  background-color: rgb(49, 9, 46); 
  transform: scale(0.95); 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); 
}

#game-cabecera {
  display: flex;
  width: 700px;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 65px;
  margin-top: 50px;
  position: relative;
}

#score,
#timer,
#health {
  padding: 10px;
  background-color: #8b72aa;
  border: 4px solid #350701;
  border-radius: 10px;
  width: 120px;
  text-align: center;
  height: auto;
  color: white;
  font-size: 25px;
}

.heart-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.heart {
  width: 30px;
  margin: 0 2px;
}

.no-heart {
  content: url('../images/border-heart.png');
  width: 25px;
  margin: 0 2px 1px 2px;
}

#img-vol {
  position: absolute;
  top: -13px;
  left: 130px;
  width: 200px;
  margin-top: 30px;
}

#game-box {
  background-color: darkgray;
  background-color: darkgray;
  width: 80vw; /* 80% del ancho de la ventana */
  height: 50vh; /* 50% del alto de la ventana */
  max-width: 700px;
  max-height: 450px;

  position: relative; /* permite posicionar los elementos de forma absoluta dentro del game-box */
  overflow: hidden; /* previene que los elementos salgan visualmente del game-box */
  user-select: none; /* previene que los elementos del game-box sean resaltados al hacer click */

  background-image: url("../images/fondo.jpg");

  background-position: center;
  background-size: cover;

  border-width: 20px; 
  border-style: solid;
  border-image: url("../images/borde.png") 30 round;

}

#final-title {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.85); 
  border: 4px solid #3d0707; 
  border-radius: 20px; 
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); 
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 20px; 
  padding: 30px 20px; 
}

.title-game-over {
  font-family: "Game Over", sans-serif;
  font-weight: 700; 
  font-size: 100px; 
  color: #ffcc00; 
  margin: 0 0 10px 0;
  text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.5); 
  letter-spacing: 5px; 
}

#final-title img {
  margin: 20px 0;
  width: 150px; 
  height: auto;
  filter: brightness(2) drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
}

#result, #end-time {
  font-size: 22px;
  color: #fff;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#storage-container {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.85); 
  border: 4px solid #3d0707; 
  border-radius: 20px; 
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); 
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  margin-bottom: 10px; 
  margin-top: 0;
  padding: 0 20px 20px 20px; 
  
}

#storage-container > h3 {
  color: #ffcc00; 
}

#storage > div {
  font-size: 15px;
  color: #fff;
  margin-top: 7px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.button-restart {
  color: #fff;
  font-size: 24px;
  line-height: 1.5;
  padding: 20px 40px; 
  border-radius: 12px;
  font-family: 'Georgia', serif;
  font-weight: bold;
  text-decoration: none;
  background-image: linear-gradient(
    to right,
    rgba(224, 222, 221, 0.9) 0%,
    rgba(224, 222, 221, 0.575) 50%,
    rgba(224, 222, 221, 0.253) 100%
  ); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  border: 4px solid rgba(0, 0, 0, 0.4); 
  display: inline-block;
  margin: 20px 0 0 0;
  transition: transform 0.3s ease;
  text-align: center;
  background-color: rgb(0, 0, 0);
}

.button-restart:hover {
  background-image: linear-gradient(
    to right,
    rgba(235, 56, 160, 0.37) 0%,
    rgba(235, 56, 160, 0.20) 50%,
    rgba(235, 56, 160, 0.10) 100%
  ); 
  transform: scale(1.05); 
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8); 
}

.button-restart:active {
  background-color: rgba(49, 9, 46, 1); 
  transform: scale(0.95); 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); 
}

#game-screen,
#game-over-screen {
  display: none;
}

#game-over-screen {
  margin-bottom: 30px;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (max-width: 700px) {
  #game-box {
    width: 80vw;
    height: auto;
  }
}

@media (max-height: 450px) {
  #game-box {
    height: 50vh;
    width: auto;
  }
}
