body{
font-family: 'Nunito', sans-serif;
}

input, button {
  font-weight: 600;
}


.main-title {
  font-family: 'Audiowide', cursive;
  /* font-weight: 700; */
  font-size: 2.0em;
  margin: 0;
  color: #fff;
  text-align: center;
}

#our_solution {
  font-weight: 300;
}


h1 {
  margin: 0;
  padding: 0.1em;
  background: #335190;
  color: #fff;
  text-align: center;
}

#content {
  text-align: center;
}


p {
	font-size: 1.1em;
	margin-bottom: 10px;
}

form {
	margin-bottom: 20px;
}

.input-container {
  position: relative;
  display: inline-flex;
  height: 2.9em;
}

#next_word {
  display: block;
  margin: 0 auto;
  padding-left: 0.1em;  
  padding-right: 0.1em;  
}

input {
  font-size: 1.4em;
  padding: 0.6em 1em; 
  padding-left: 0.8em;
  box-sizing: border-box;
  max-width: 4em; 
  height: 1.7em; 
  text-align: center;
  caret-color: #335190;
}

input:focus {
  outline: none;
  border: 2px solid #4CAF50;
}

.go-button {
  font-size: 1.4em;
  padding: 0.1em 0.5em; 
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 0.5em;
  height: 1.75em; 
  box-sizing: border-box;
}

button {
	font-size: 1.1em;
	padding: 5px 10px;
	background-color: #4CAF50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

button:hover {
	background-color: #3e8e41;
}

.hidden {
	display: none;
}


#start_word, #end_word {
  font-weight: 700;
  text-transform: uppercase;
}

#next_word {
  font-weight: bold;
  text-transform: uppercase;
}


#next_word::placeholder {
  color: rgba(0, 0, 0, 0.2); 
  letter-spacing: 2px;  
  text-align: center;
}

.word-ladder {
  font-family: 'Audiowide', cursive;
  font-weight: bold;
  text-transform: uppercase;
  line-height: 1.5;
  font-size: 1.3em;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f5f5f5;
}

#user_ladder {
    display: none;
}

.puzzle {
  font-family: 'Audiowide', cursive;
    font-size: 1.5em;
    color: #335190;
}

.celebratory {
    color: #4CAF50; 
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
}

.message-box {
  visibility: visible; 
  height: 2em;
}
.message {
  line-height: 2em;
}

#ladder_solution:empty {
  display: none;
}

#example_ladder {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
  width: fit-content;
  margin: 0 auto; /* center the example_ladder div */
  display: none; /*show only if user is inexperienced */
}

#intro_message {
  display: none; /*show only if user is inexperienced */
  font-weight: 300;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

#show_ladder {
  display: none;
}


#user_ladder {
  text-align: center;
}

#example_ladder_popup {
  margin-top: 20px;
  font-size: 1.1rem;
}


body.popup-open #intro_message,
body.popup-open #user_ladder,
body.popup-open #next_word,
body.popup-open form,
body.popup-open footer,
body.popup-open #our_solution,
body.popup-open #ladder_solution,
body.popup-open #show_ladder,
body.popup-open #hint,
body.popup-open #new_puzzle,
body.popup-open #ending_word {
  filter: blur(4px);
}

.popup {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 500px;
  background-color: white;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 1em;
  line-height: 1.4;
  display: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.popup h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 1.2;
}

.popup h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
}

.popup p {
  margin-top: 0;
  margin-bottom: 20px;
}


.popup button {
  background-color: #3d72b3;
  color: white;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.popup button:hover {
  background-color: #2e598a;
}

.popup-open body {
  overflow-y: hidden;
}

footer {
  background-color: #f4f3f3;
  color: rgba(74, 74, 74, 0.7);
  padding: 5px;
  text-align: center;
  font-size: 16px;
  line-height: 1.0;
  width: 100%;
  margin-top: 10em;
}
footer a {
  font-size: 18px;
  color: rgba(74, 74, 74, 0.7);
  text-decoration: underline;
  margin: 0 10px;
}

footer p, nav {
  margin: 0;
  margin-bottom: 5px;
}

.popup.visible {
  display: block;
}

#countdown { 
display: none; 
font-size: 1.0em;
color:  #335190;
}

#progress-message {
    white-space: pre-wrap;
}
#xp-display {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.9em;
  font-weight: bold;
  color: white;
  text-decoration: underline;
  text-decoration-thickness: 0.02em;
}
#xp-display:hover {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  text-decoration-thickness: 0.07em;
}

#level-display {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 0.9em;
  font-weight: bold;
  color: white;
}
@keyframes xp-update-animation-add {
  0% {
    opacity: 1;
    color: white;
  }
  50% {
    opacity: 1;
    color: #4CAF50;
  }
  100% {
    opacity: 1;
    color: white;
  }
}

@keyframes xp-update-animation-deduct {
  0% {
    opacity: 1;
    color: white;
  }
  50% {
    opacity: 1;
    color: #F44336;
  }
  100% {
    opacity: 1;
    color: white;
  }
}

.xp-update-animation-add {
  animation: xp-update-animation-add 1s ease-out;
}

.xp-update-animation-deduct {
  animation: xp-update-animation-deduct 1s ease-out;
}

#xp-display:hover {
  text-decoration: underline;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
}

.xp-popup {
  padding: 20px;
  font-size: 18px;
  text-align: left;
}

.xp-popup h2 {
  margin-bottom: 25px;
  font-size: 26px;
  font-weight: bold;
  text-align: center;
}

.xp-popup p {
  margin-bottom: 15px;
}

.xp-popup ul {
  margin: 0 0 15px 20px;
}

.xp-popup li {
  margin-bottom: 10px;
}

.xp-popup button {
  font-size: 18px;
  padding: 10px 30px;
  margin-top: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
#xp-breakdown-message {
  background-color: azure;
  border-radius: 5px;
  padding: 0px 20px; 
  margin-bottom: 20px;
  text-align: center;
  width: 80%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

#xp-message {
  font-size: 1.2em;
  font-weight: 600;
  color: #4a4a4a;
  line-height: 1.5;
}

#xp-message span {
  color: #0070f3;
}

#xp-message .total-points {
  font-size: 1.5em; 
  font-weight: bold;
  color: #333; 
  margin-bottom: 2px; 
  display: block;
}

#xp-message .component {
  font-size: 1em;
  text-indent: 20px;
  display: block;
}

