body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #423535;
  }

  /* grid */

.crafting-area {
    width: 300px; 
    padding: 10px;
    background-color: rgba(126, 137, 138, 0.3);
    border-radius: 8px;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center; 
    position: absolute; 
    margin-top: 10px;
    left: 50%; 
    transform: translate(-50%, -50%); 
    padding-bottom: 30px;
  }

  .crafting-grid {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
    gap: 10px;
    margin-bottom: 20px;
  }

  .slot {
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .slot:hover {
    transform: scale(1.05);
  }

    /* inventario */
 
    .inventory-container {
      width: 600px;
      height: 120px;
      background-color: rgba(126, 137, 138, 0.3);
      padding: 10px;
      box-shadow: 0 0px 20px rgba(0, 0, 0, 0.3);
      border-radius: 20px;
      margin-top: 570px;
      position: absolute;
      visibility: visible;
      z-index: 1; 
  }
     
    .inventory {
      display: flex;
      gap: 15px;
      padding: 10px;
      background-color: 0;
      overflow-x: auto; 
      width: 97%; 
      white-space: nowrap; 
    }
    
    
    #search-input {
      width: 98%;
      padding: 5px;
      border-radius: 100px;
      border: 1px solid rgba(126, 137, 138, 0.3);
    }  
    
    .item {
      flex: 0 0 auto;
      width: 50px; 
      height: 50px;
      margin: 5px;
    }
    
    .item img {
      width: 100%;
      height: auto;
    }

    /* sroll */

    .inventory::-webkit-scrollbar {
      height: 6px; 
    }
    
    .inventory::-webkit-scrollbar-track {
      background: transparent; 
    }
    
    .inventory::-webkit-scrollbar-thumb {
      background-color: rgba(126, 137, 138, 0.5);
      border-radius: 10px;
    }
    
    .inventory::-webkit-scrollbar-thumb:hover {
      background-color: rgba(126, 137, 138, 0.7);
    }
    
   
    .inventory {
      scrollbar-width: thin; 
      scrollbar-color: rgba(126, 137, 138, 0.5) transparent; 
    }
    


  .buttons-container {
    display: flex;
    gap: 10px;
  }
  

  .button-with-image {
    border-radius: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    cursor: pointer;
  }
  
  .button-with-image img {
    width: 50px;
    height: 50px;
  }
  
  .button-with-image:hover {
    transform: scale(1.1);
    background-color: #dbe5e5; 
    z-index: 1; 
  }


  
  #attempt-counter {
    font-size: 20px;
    color: #abb6b0;
    position: fixed;
    top: 20px; 
    left: 20px; 
    background-color: rgba(126, 137, 138, 0.3);
    padding: 8px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(34, 34, 34, 0.433);
  }


.craft-result {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 5px;
  background-color: transparent;
}

#craft-result-item {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 110px;
  height: 110px;
  border-radius: 8px;
  background-color: rgba(126, 137, 138, 0.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.5s ease;
  opacity: 0;
}

#craft-result-item img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
}

#craft-result-item.active {
  opacity: 1;
}


#victory-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  z-index: 1000;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.modal-content {
  text-align: center;
}

.modal-content h2 {
  color: #4CAF50; 
}

.modal-content button {
  padding: 10px 20px;
  margin-top: 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#victory-gif-container img {
    width: 200px;
    height: 200px;
    margin-top: 20px;
}

.modal-content button:hover {
  background-color: #45a049;
}

.game-locked {
  pointer-events: none; 
}

#timer {
  font-size: 18px;
  font-weight: bold;
  color: #f39c12;
  text-align: center; 
  z-index: 1; 
  margin-top: 10px; 
}

.hidden-inventory {
  display: none !important;
}



.buttontut {
  position: fixed; 
  top: 70px; 
  right: 20px;
  z-index: 1000; 
}

.buttontut {
  background-color: transparent; 
  border: none;
  cursor: pointer; 
  padding: 10px; 
}

.buttontut img {
  width: 40px;
  height: 40px; 
  transition: transform 0.3s ease-in-out;
}

.buttontut:hover img {
  transform: scale(1.2); 
}

.buttontut:focus {
  outline: none;
}

.crafting-grid-example {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  margin-top: 20px;
}

.crafting-slot {
  width: 50px;
  position: relative;
  height: 50px;
  border: 2px solid #000;
  border-radius: 1px;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.crafting-slot img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.crafting-slot img {
  width: 90%;
  height: 90%;
  object-fit: contain; 
}

.crafting-slot.correct {
  background-color: green; 
}

.crafting-slot.misplaced {
  background-color: yellow; 
}

.crafting-slot.wrong {
  background-color: rgb(160,40,40); 
}


.tutorial-modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); 
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.tutorial-modal-content {
  background-color: #625959;
  padding: 20px;
  border-radius: 10px;
  width: 50%;
  max-width: 600px; 
  max-height: 80vh; 
  overflow-y: auto; 
  text-align: left;
  box-sizing: border-box; 
}

.tutorial-modal-content::-webkit-scrollbar-thumb {
  background-color: #888; 
  border-radius: 10px; 

}

.tutorial-modal-content::-webkit-scrollbar {
  width: 10px; 
}

.tutorial-modal button {
  background-color: #4CAF50;
  position: relative;
  top: -250px;
  right: -150px;
  color: white;
  width: 40px; 
  height: 40px;
  border: none;
  border-radius: 20%;
  cursor: pointer;
  font-size: 16px;
}

.tutorial-modal button:hover {
  background-color: #45a049;
}

.buttoninfo {
  position: fixed; 
  top: 20px; 
  right: 20px; 
  z-index: 1000; 
}

.buttoninfotut {
  background-color: transparent; 
  border: none; 
  cursor: pointer; 
  padding: 10px; 
}

.buttoninfotut img {
  width: 40px; 
  height: 40px; 
  transition: transform 0.3s ease-in-out; 
}

.buttoninfo:hover img {
  transform: scale(1.2);
}

.buttoninfotut:focus {
  outline: none; 
}


.info-modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); 
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.info-modal-content {
  background-color: #625959;
  padding: 20px;
  border-radius: 10px;
  width: 50%; 
  max-width: 600px; 
  text-align: center;
  box-sizing: border-box; 
}
.info-modal-content h2 {
  margin-top: 0;
}

.info-modal button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
}

.info-modal button:hover {
  background-color: #45a049;
}

.crafting-grid-example {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 10px; 
  width: fit-content; 
  margin: 20px auto; 
  padding: 0; 
}

.item img.selected {
  outline: 2px solid #4CAF50;
  border-radius: 4px;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 600px) {
  /* Ajusta a largura da área de crafting */
  .crafting-area {
      width: 250px; /* Menor largura para caber melhor na tela */
  }

  /* Ajusta a grid de crafting */
  .crafting-grid {
      grid-template-columns: repeat(3, 70px); /* Maior tamanho para os slots */
      grid-template-rows: repeat(3, 70px); 
      gap: 8px;
  }

  /* Tamanho dos slots de crafting no celular */
  .slot {
      width: 70px;
      height: 70px;
  }

  /* Ajusta os itens no inventário */
  .inventory-container {
      width: 97%; /* Faz o inventário ocupar toda a largura da tela */
      height: 120px;
      padding: 10px;
      box-shadow: 0 0px 20px rgba(0, 0, 0, 0.3);
      margin-top: 600px;
  }

  .inventory {
      display: flex;
      gap: 10px; /* Ajusta o espaço entre os itens */
      padding: 10px;
      background-color: transparent;
      overflow-x: auto; 
      width: 100%;
      white-space: nowrap;
  }

  .item {
      width: 60px; /* Maior largura para os itens */
      height: 60px;
      margin: 5px;
  }

  .item img {
      width: 100%;
      height: auto;
  }

  /* Ajusta o tamanho da fonte e o layout do contador de tentativas */
  #attempt-counter {
      font-size: 16px; /* Fonte menor para telas pequenas */
      padding: 6px 10px;
  }

  /* Ajustes no modal de vitória */
  #victory-modal {
      width: 80%;
      height: auto;
  }

  /* Ajuste nos botões flutuantes */
  .buttontut {
      top: 60px;
      right: 10px;
  }

  .buttoninfo {
    top: 10px;
    right: 10px;
}

  /* Ajustes nas imagens do botão de tutorial */
  .buttontut img, .buttoninfotut img {
      width: 40px;
      height: 40px;
  }

  /* Ajuste no modal de informações */
  .info-modal-content {
      width: 80%;
      max-width: 500px;
  }

  .tutorial-modal-content {
    width: 65%;
    max-width: 500px;
}

  /* Ajusta o espaço entre os slots */
  .crafting-slot {
      width: 60px;
      height: 60px;
  }

  /* Estilo para o item selecionado */
  .item img.selected {
      outline: 2px solid #4CAF50;
      border-radius: 4px;
      transform: scale(1.1); /* Leve aumento no item selecionado */
  }
}
