body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f0e2d5; /* creamy */
  font-family: sans-serif;
  overflow: hidden;
}

/* Background Pattern */
.background {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image: url("photos/wf.png"), url("photos/wf.png"), url("photos/wf.png");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 0px 0px, 500px 500px, 200px 200px;
  background-position: 5% 10%, 100% 100%, 10% 40%;
}



/* Title Glow */
#mainTitle {
  font-size: 6rem;
  font-family: 'Mo';
  color: #658535;
  text-align: center;
  cursor: pointer;
  text-shadow: 0 0 35px #E7A6A1;
  transition: transform 0.2s;
}

#mainTitle:hover {
  transform: scale(1.05);
}

.hidden {
  display: none;
}

.container {
  text-align: center;
}

.password-text {
  font-size: 1.55rem;
  font-family: 'TYPE1';
  margin-bottom: 25px;
  font-weight: bold;
  color: #2f2f2f;
}

.squares {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.square {
  width: 55px;
  height: 65px;
  font-size: 2rem;
  text-align: center;
  border: 2px solid #e5e5ea; /* subtle but visible */
  border-radius: 12px;
  outline: none;
  background: #fafafa; /* soft off-white */
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 3px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  color: #333;
  font-weight: 600;
}

/* Focused input */
.square:focus {
  border-color: #1C1C2E; /* iOS blue */
  box-shadow:
    0 0 6px rgba(0,122,255,0.4),
    inset 0 1px 2px rgba(0,0,0,0.08);
  background: #fff;
}



/* Dancing animation */
@keyframes dance {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-5px); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(5px); }
  100% { transform: translateY(0); }
}

/* Success */
.square.success {
  border-color: #34C759; /* Apple green */
  background: #f9fff9;
  box-shadow: 0 0 8px rgba(52,199,89,0.5);
  animation: dance 0.4s ease;
}

/* Error */
.square.error {
  border-color: #FF3B30; /* Apple red */
  background: #fff5f5;
  box-shadow: 0 0 8px rgba(255,59,48,0.5);
  animation: dance 0.4s ease;
}



/* Hint message */
.hint {
  color: #6B4F4F;
  margin-top: 20px;
  font-family: 'TYPE1';
  font-style: italic;
  font-size: 1.5rem; /* bigger */
}

/* Message */
#typedMessage {
  font-size: 1.7rem;
  white-space: pre-wrap;
  color: #333;
}

/* Mute button */
.mute-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#message {
  font-size: 1.2rem;
  font-family: 'TYPE1';
  line-height: 1.2;
  text-align: left;
  padding: 40px;
  white-space: pre-wrap; /* keeps line breaks */
  position: relative;
  overflow-y: auto;   /* enable vertical scroll if needed */
  max-height: 80vh;   /* optional: limit height to viewport */
}

/* Cursor (hidden by default) */
.typing-cursor {
  display: none;
  position: relative;
  border-right: 2px solid black;
  margin-left: 2px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Caret */
#message::after {
  content: "|";
  display: inline-block;
  margin-left: 4px;
  opacity: 1;
  animation: blink 0.8s infinite;
  font-weight: bold;
  color: #000;
}
@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}



/* Typewriter style 1 */
@font-face {
  font-family: 'Type1';
  src: url('fonts/type1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}



/* Wildflower style */
@font-face {
  font-family: 'Mo';
  src: url('fonts/Mo.ttf') ;
}


