body {
  font-family: "Arial", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100dvh;
  background-color: #f4f4f4;
}

/* Default light theme styles */
body {
  background-color: white;
  color: black;
  /* ... other styles ... */
}

/* The Modal */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.intro-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Reem Kufi Fun", sans-serif;
  font-size: 1.5em;
}

/* Modal Content */
.modal-content {
  font-family: "Cabin", sans-serif;
  background-color: #fefefe;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: clamp(
    300px,
    60%,
    60%
  ); /* Could be more or less, depending on screen size */
  border-radius: 5px;
  font-size: 1.2em;
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 32px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

ul > img,
.image-wrapper > img {
  width: 45%;
  height: auto;
  padding: 20px 0;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block; /* or block depending on your layout */
  width: 100%;
}

.bad::after {
  content: "X";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5em; /* adjust as needed */
  font-weight: bold;
  color: red;
  z-index: 1;
  pointer-events: none; /* makes the X non-interactive */
  overflow: hidden;
}

.good::after {
  content: "✔"; /* Unicode check mark symbol */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5em; /* adjust as needed */
  font-weight: bold;
  color: lime;
  z-index: 1;
  pointer-events: none; /* makes the X non-interactive */
  overflow: hidden;
}

header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  height: 10%;
}


.game-title {
  width: 100%;
  text-align: center;
  letter-spacing: tighter;
  font-size: 2.875rem;
  letter-spacing: 10px;
  font-weight: 700;
  margin-bottom: 1em;
  /* font-family: 'Cabin', sans-serif; */
  font-family: 'Reem Kufi Fun', sans-serif;
  /* font-family: "Rubik Mono One", monospace; */
  font-size: 2em;
  text-align: center;
  text-transform: uppercase;
  text-anchor: middle;
  fill: #333;
  position: relative;
}

#new-game,
#dark-mode-toggle,
#share-button,
#reset-game {
  padding: 5px;
  height: 75px;
  width: 75px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
  background-color: transparent;
  /* background-color: rgba(239, 239, 239, 0.362);  A shade of green for a fresh look */
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease-out, filter 0.3s ease-out;
}

#new-game:hover,
#dark-mode-toggle:hover,
#share-button:hover,
#reset-game:hover {
  background-color: #b1b0b0; /* A slightly darker shade for hover effect */
}

.svg {
  width: 100%;
  height: auto;
}

.game-container {
  position: relative;
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.5s ease-out;
  animation: fade-in 0.5s ease-out forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.top-game-container {
  padding: 10px 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.word-display,
.target-word,
.target-word-container {
  display: flex;
  justify-content: center;
  color: black;
  align-items: center;
  font-size: 2rem;
}

.target-letter {
  font-size: 3em;
  margin: 0 5px;
  padding: 5px 25px;
  border: none;
  border: 1px solid rgb(183, 183, 183);
  border-radius: 5px;
  background-color: transparent;
  font-family: 'Source Code Pro', monospace;
}

.letter {
  font-size: 3em;
  margin: 0 5px;
  padding: 5px 25px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  color: black;
  border: 2px solid #333;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
  /* font-family: 'Reem Kufi Fun', sans-serif; */
  /* font-family: "Rubik Mono One", monospace; */
  font-family: 'Source Code Pro', monospace;
}

.letter:hover {
  background-color: #f7f7f7;
}

#guess-input {
  font-size: 1.2em;
  padding: 10px;
  margin-right: 10px;
}

.turns {
  position: absolute;
  top: 0;
  right: 0;
}

.virtual-keyboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keyboard-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.key,
.submit {
  font-family: 'Reem Kufi Fun', sans-serif;
  /* font-family: "Source Code Pro", monospace; */
  padding: 20px 20px;
  cursor: pointer;
  border: none;
  color: black;
  font-size: 1.3em;
  background-color: #f4f4f4;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

.key:hover,
.submit:hover {
  background-color: #e0e0e0;
}

.settings {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: rgba(255, 0, 0, 0.7); /* Red by default */
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transform-origin: center center;
  animation: spin 3s linear infinite, fall 3s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fall {
  from {
    top: -10px;
  }
  to {
    top: 100%;
  }
}

/* Dark theme styles */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
  /* ... other dark mode specific styles ... */
}

body.dark-mode .modal-content {
  background-color: #494949;
  color: #e0e0e0;
}

body.dark-mode .close {
  color: #e0e0e0;
}

button.dark-mode {
  color: #e0e0e0;
  /* ... other button styles for dark mode ... */
}

body.dark-mode .letter {
  border-bottom: 2px solid #e0e0e0;
}

body.dark-mode .letter:hover {
  background-color: #494949;
}

body.dark-mode .letter {
  color: #e0e0e0;
  border: 1px solid rgb(183, 183, 183);
}

body.dark-mode .game-container {
  background-color: #2d2d2d;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .game-description {
  color: rgba(225, 225, 225, 0.828);
}

body.dark-mode #guess-input {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border: 1px solid #e0e0e0;
}

body.dark-mode .key,
body.dark-mode .submit {
  background-color: #3a3a3a;
  color: #e0e0e0;
  box-shadow: 2px 2px 5px rgba(255, 255, 255, 0.085);
}

body.dark-mode .key:hover,
body.dark-mode .submit:hover {
  background-color: #2d2d2d;
}

body.dark-mode .feedback,
body.dark-mode .turns {
  color: #e0e0e0;
}

body.dark-mode #new-game,
body.dark-mode #dark-mode-toggle,
body.dark-mode #share-button,
body.dark-mode #reset-game {
  /* background-color: rgba(37, 37, 37, 0.362); */
  filter: invert(1);
}

@media screen and (min-width: 1000px) {
  .key {
    padding: 25px 35px;
  }

  .good::after,
  .bad::after {
    font-size: 7em;
  }
}

@media screen and (max-width: 600px) {
  .key {
    padding: 15px 16px;
  }
  .good::after,
  .bad::after {
    font-size: 3em;
  }
}

@media screen and (max-width: 500px) {
  .key {
    font-size: 1em;
    padding: 15px 10px;
  }
}
