body {
  font-family: 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* background: #2c3e50; */
  color: #fff;
  margin: 0;
  padding: 0;
  overflow: hidden;

  /* Add background image */
  background-image: url('https://alittlemoreenglish.weebly.com/uploads/2/6/6/3/26638990/untitled-design-3_orig.png');
  background-size: cover;
  /* This ensures the image covers the entire area */
  background-position: center;
  /* Centers the image in its container */
  background-repeat: no-repeat;
  /* Prevents the image from repeating */
}

.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;
}

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;
}

@keyframes celebrate {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#congratulations.animate {
  animation: celebrate 1.2s ease-in-out;
}

#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;
}