/* Estilos Gerais para Todos os Modais */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background-image: url('../img/modal.png');
  background-size: 100% 100%;
  margin: 5% auto;
  padding: 50px;
  width: 80%;
  max-width: 950px;
  min-height: 650px;
  color: #3a2c1a;
  font-family: 'Press Start 2P', cursive;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* Elementos Comuns */
.close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.modal-content h2 {
  margin-top: 150px;
}

.modal-content input {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid #5e3a1a;
  padding: 10px;
  width: 50%;
  margin: 15px 0;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
}

.modal-content button {
  background: #5e3a1a;
  color: #f0e6d2;
  border: black;
  padding: 12px 25px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  margin: 10px 5px;
}

.modal-content button:hover {
  background: #38220e;
}

.feedback {
  margin-top: 10px;
  min-height: 20px;
  font-size: 0.8rem;
}

/* Estilos Específicos */
.puzzle-image {
  max-width: 100%;
  max-height: 200px;
}

#binaryCode,
#morseCode {
  margin-top: 40px;
}

#playSequence {
  background-color: rgb(173, 96, 2);
  border-radius: 20px;
}

/* Puzzle Musical */
.note-buttons-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0;
}

.note-button {
  padding: 0.5rem;
  background-color: #4a4a4a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.user-sequence-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 2rem;
  margin: 1rem 0;
}

.user-note {
  padding: 0.5rem;
  background-color: #48503c;
  color: white;
  border-radius: 4px;
}

/* Botões de Teste*/
.test-buttons {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.test-buttons button {
  padding: 8px 12px;
  font-size: 0.7rem;
}

/* Puzzle Lunar */
.moon-dates {
  margin: 20px 0;
  text-align: center;
}

.date-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.date-item {
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  font-size: 0.7rem;
  min-width: 100px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.moon-clue {
  margin: 25px 0;
  text-align: center;
}

.moon-clue p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.moon-example, .moon-options, .moon-slots {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 10px 0;
  font-size: 24px;
}

.moon-options {
  margin-top: -20px;
}

.moon-slots div {
  width: 40px;
  height: 40px;
  border: 2px dashed #555;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.3);
}

.moon-options button {
  background-color: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.moon-options button:hover {
  transform: scale(1.2);
  background-color: rgba(255, 255, 255, 0.4);
  border-color: #fff;
}

.moon-options button,
.moon-slots div {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  font-size: 20px;
  text-align: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*Modal Final - Baú*/

.chest-container {
  text-align: center;
  margin-top: 8rem;
}

.chest-container p {
  width: 70%;
  display: block;
  margin: auto;
  margin-top: 20px;
  line-height: 20px;
}

.chest-container img {
  width: 30%;
}

