body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

h1 {
  text-align: center;
  font-family:  'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.5rem;
  margin-top: 5px;
  margin-bottom: 5px;
 }
 
#mainContainer {
  display: flex;
    flex-direction: column;
    align-items: center; 
}

 #messageContainer {
  width: 90vw;
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
  padding: 5px;
  min-height: calc(2em + 40px); 
  max-height: 80px; 
  overflow: hidden; 
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center; 
}

#messageButtonContainer {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

#messageContainer .button {
  display: inline-flex;
  cursor: pointer;
  text-decoration: none;
  background-color: #404040;
  color: white;
  padding: 5px 5px;
  border-radius: 30px;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  justify-content: center;
  align-items: center;
  margin-top: 1px; /* Adds spacing between text and button */
}

 #gameBoard {
   display: inline-flex;
   align-items: center;
   flex-direction: column;
   width: auto;
 }
 
 .letterBox {
   border: 2px solid gray;
   border-radius: 3px;
   margin: 2px;
   font-size: 2.5rem;
   font-weight: bold;
   width: min(10vw, 2.5rem);
  height: min(10vw, 2.5rem);
   display: flex;
   justify-content: center;
   align-items: center;
   text-transform: uppercase;
   font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
 }

 .circularBox {
  border: 2px solid gray;
  width: min(10vw, 2.5rem);
  height: min(10vw, 2.5rem); 
  border-radius: 50%; 
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
 }
 

 .filledBox {
   border: 2px solid gray;
 }
 
 .letterRow {
   display: flex;
    position: relative;
 }
 
 .solution{
   display: flex;
 }
 
 #keyboardContainer {
   margin: 1rem 0;
   display: flex;
   flex-direction: column;
   align-items: center;
 }

.hidden {
  visibility: hidden
 }
 
 #keyboardContainer div {
   display: flex;
 }
 
 .secondRow {
   margin: 0.5rem 0;
 }
 
 .keyboardButton {
   font-size: min(4vw, 1.5rem); 
   font-weight: 700;
   padding: 0.5rem;
   margin: 0 2px;
   cursor: pointer;
   text-transform: uppercase;
   font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
   transition: background-color 1s ease-in-out;
   border: 1px solid gray
 }

 .fadeOutPartial {
  transition: opacity 0.1s ease-in-out;
  opacity: .25;
}

.fadeOut {
  transition: opacity 1s ease-in-out;
  opacity: 0;
}

.disabled {
  opacity: 0.25;
  transition: opacity .25s ease-in-out;
}

.enabled {
  transition: opacity .25s ease-in-out;
  opacity: 1;
}

.keyboardColor {
  background-color: lightgoldenrodyellow;
}

#openingGameContainer {
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100vw; 
  height: 100vh; 
  padding-top: 100px
}

#insideOpeningGameContainer {
  background-color: white;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 2px ridge lightgray;
  box-shadow: 0 0 10px gray;
  max-width: 90vw; 
  width: 100%; 
  flex-direction: column;
  box-sizing: border-box;
  border-radius: 8px;
}

#insideOpeningGameContainer h2 {
  margin-bottom: 16px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 24px;
  text-align: left;
}

#insideOpeningGameContainer p {
  font-size: 16px;
  padding-bottom: 6px;
  margin: 0;
  line-height: 24px;
  text-align: left;
}

#insideOpeningGameContainer figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 5px 0;
  text-align: center;
}

#insideOpeningGameContainer figcaption {
  font-size: 14px; /* Smaller font size */
  color: blue; /* Blue font color */
  margin-top: 5px;
  word-wrap: break-word; /* Ensures captions wrap automatically */
  max-width: 90%; /* Restrict width to avoid overflow */
  text-align: center;
}

#insideOpeningGameContainer .button {
  cursor: pointer;
  text-decoration: none;
  background-color: #404040;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

#openingButtonContainer {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.floatingText {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  /* color: #28a745;  */
  animation: floatUp 2s ease-out forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
      transform: translate(50px, 0); /* Start further to the right */
      opacity: 1;
  }
  100% {
      transform: translate(50px, -50px); /* Move upwards */
      opacity: 0;
  }
}

#toggleModeContainer {
    display: flex;
    align-items: center; /* Aligns text and toggle vertically */
    justify-content: center; /* Centers horizontally */
    gap: 15px; /* Adds space between text and switch */
    margin-bottom: 15px;
    transition: opacity 0.5s ease
}

#toggleModeButton {
  display: inline-flex;
  cursor: pointer;
  text-decoration: none;
  background-color: #404040;
  color: white;
  padding: 5px 5px;
  border-radius: 30px;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  justify-content: center;
  align-items: center;
  margin-top: 1px; /* Adds spacing between text and button */
}

.hide{
  opacity: 0;
  pointer-events: none; /* Prevent interaction after disappearing */
}

#scoreWrapper {
  display: flex;
  gap: 30px;
}

.scoreBox {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center label and textbox */
  text-align: center;
}

.textBox {
  width: 30px;
  text-align: center;
}

.toggle-container {
  display:flex;
  align-items:center;
  margin-top: 20px;
  gap: 10px
}

.toggle-slider {
  position:relative;
  width: 50px;
  height: 25px;
  background-color: #ccc;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  transition: left 0.3s;
}

.toggle-container.active .toggle-slider {
  background-color: #4caf50;
}

.toggle-container.active .toggle-slider::before {
  left: 26px;
}
