body {
  font-family: 'Arial', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-image: url('https://alittlemoreenglish.weebly.com/uploads/2/6/6/3/26638990/untitled-design-3_orig.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.container {
  background-color: rgba(44, 62, 80, 0.6);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 85%;
  max-width: 700px;
  margin-bottom: 20px;
}

/* Footer Styles */
.footer {
  text-align: center;
  padding: 10px;
  font-size: 0.9em;
  color: #ddd;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

h1 {
  font-size: 3em;
  margin-bottom: 25px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  color: #ecf0f1;
}

#letter-cards,
#selected-letters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  width: 100%;
  flex-wrap: wrap;
}

#selected-letters {
  min-height: 70px;
  background-color: rgba(52, 73, 94, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px;
}

.letter-card {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2.2em;
  font-weight: bold;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease-in-out;
}

.letter-card:hover {
  transform: scale(1.1);
}

.letter-card:active {
  cursor: grabbing;
  transform: scale(0.95);
}

button {
  padding: 16px 32px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2em;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-top: 25px;
}

button:hover {
  background-color: #2980b9;
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

#message {
  margin-top: 25px;
  font-size: 1.4em;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

#score {
  margin-top: 25px;
  font-size: 1.5em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 1.2s ease-out;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

#timer {
  font-size: 1.6em;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  margin-bottom: 15px;
}

#congratulations {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(52, 152, 219, 0.8);
  color: #fff;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  text-align: center;
  font-size: 1.3em;
  animation: fadeIn 0.8s ease-out;
}

#congratulations h2 {
  font-size: 2.8em;
  margin-bottom: 12px;
  color: #fff200;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#congratulations p {
  font-size: 1.5em;
}

#finalCongratulations {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(44, 62, 80, 0.9);
  color: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  z-index: 1001;
  text-align: center;
  font-size: 1.2em;
}

#finalCongratulations h2 {
  font-size: 3em;
  margin-bottom: 15px;
  color: #f39c12;
}

#finalCongratulations p {
  font-size: 1.6em;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1002;
}

/* Styles for the settings modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: auto;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  top: 50%;
  transform: translateY(-50%);
  text-align: left;
  color: #333;
}

.modal-content h2 {
  font-size: 2em;
  margin-bottom: 15px;
  color: #3498db;
}

.modal-content label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  resize: vertical;
  min-height: 150px;
}

.modal-content button {
  background-color: #2ecc71;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  cursor: pointer;
  width: auto;
  border-radius: 5px;
  font-size: 1.1em;
}

.modal-content button:hover {
  opacity: 0.8;
}

.close {
  position: absolute;
  right: 25px;
  top: 0;
  color: #000;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

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

/* Style for Settings Button */
#settings-button {
  background-color: #f39c12;
  color: white;
  padding: 16px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2em;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-top: 25px;
}

#settings-button:hover {
  background-color: #d68910;
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

#toggle-directions {
  background-color: #9e8b6d;
  color: white;
  padding: 16px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2em;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-top: 25px;
}

#category-selection {
  margin-bottom: 20px;
}

#categories-select {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

#vocabulary-source {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

body.category-baseball {
  background-image: url('baseball.jpg');
}

body.category-basketball {
  background-image: url('basketball.jpg');
}

body.category-badminton {
  background-image: url('badminton.jpg');
}

body.category-tennis {
  background-image: url('tennis.jpg');
}

body.category-volleyball {
  background-image: url('volleyball.jpg');
}

body.category-soccer {
  background-image: url('soccer.jpg');