/* style.css */

/* Reset-ish */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f2f2f2;
  color: #333;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* .screen elements are stacked; only one is "active" at a time */
.screen {
  display: none;
  width: 100%;
  height: 100%;
}
.screen.active {
  display: flex;
  flex-direction: column;
}

/*
  Unlock screen & memory screen both
  center their content.
*/
.unlock-container,
.memory-container {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Input styling */
#unlock-code {
  width: 250px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
}
#unlock-code:focus {
  border-color: #999;
}

/* Buttons styling */
#unlock-button,
#back-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: #e0e0e0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}
#unlock-button:hover,
#back-button:hover {
  background-color: #d5d5d5;
}
#unlock-button:active,
#back-button:active {
  background-color: #ccc;
}

/* Memory Screen */
.memory-back {
  width: 100%;
  display: flex;
  justify-content: flex-start; /* Button sits to the left */
  padding: 1rem;
}
.back-button {
  font-size: 1rem;
  background-color: #e0e0e0;
}

/* Ensure the image & text fit on virtually every screen */
.memory-image {
  max-width: 90%;
  max-height: 60vh; /* Limit vertical size so it fits without scrolling */
  object-fit: contain; /* or cover, depending on your preference */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.memory-text {
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
  padding: 0 1rem; /* some horizontal padding */
  line-height: 1.4;
  color: #555;
}

/*
  Make sure the memory screen itself can scroll
  if needed on smaller devices, but hopefully
  it's minimal with max-height on the image
*/
#memory-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Responsive considerations */
@media (max-width: 600px) {
  #unlock-code {
    width: 80%;
  }
  .memory-text {
    font-size: 1rem;
  }
}
