body {
  font-family: Arial, sans-serif;
  background-color: #e6f3ff;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  color: #2c5282;
  text-align: center;
}

.duck-container {
  text-align: center;
  font-size: 40px;
  margin: 20px 0;
}

.input-section {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

textarea {
  width: calc(100% - 24px);
  height: 200px;
  margin: 10px 0;
  padding: 10px;
  border: 2px solid #4299e1;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

textarea.error {
  border-color: #e53e3e;
  animation: shake 0.5s;
}

.error-message {
  color: #e53e3e;
  margin-top: 5px;
  display: none;
  animation: fadeIn 0.3s;
}

label[for='names'] {
  font-weight: 700;
  font-size: 1.1em;
}

.controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

input[type='number'] {
  width: 80px;
  padding: 8px;
  border: 2px solid #4299e1;
  border-radius: 5px;
  font-size: 16px;
}

input[type='checkbox'] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.beta-badge {
  background: linear-gradient(45deg, #ff4e50, #f9d423);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7em;
  font-weight: bold;
  text-transform: uppercase;
  margin-left: 8px;
  display: inline-block;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

button {
  background-color: #4299e1;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2c5282;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.flock {
  background-color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}

.flock.visible {
  opacity: 1;
  transform: translateY(0);
}

.flock h3 {
  color: #2c5282;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
}

.duck {
  display: inline-block;
  animation: waddle 1s infinite;
}

.share-section {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.5s;
}

.share-section button {
  background-color: #38a169;
}

.share-section button:hover {
  background-color: #2f855a;
}

/* Animations */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes waddle {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.grouping-mode-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grouping-mode-container select {
  padding: 8px;
  border: 2px solid #4299e1;
  border-radius: 5px;
  font-size: 16px;
  background-color: white;
}

#soundToggle {
  background-color: #48bb78;
  color: white;
  margin-left: 10px;
}

#soundToggle:hover {
  background-color: #38a169;
}

#soundToggle.sound-off {
  background-color: #e53e3e;
}

#soundToggle.sound-off:hover {
  background-color: #c53030;
}
