body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 512px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  padding: 10px;
}

textarea,
button {
  width: 100%;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-top: 10px;
}

textarea {
  box-sizing: border-box;
  height: 68px;
  padding: 8px;
  resize: none;
}

button {
  position: relative;
  padding: 10px;
  background-color: #4caf50;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 10px;
}

button:disabled {
  background-color: #a5d6a7;
  cursor: not-allowed;
}

.spinner {
  margin-left: 8px;
  width: 20px;
  height: 20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

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

#image-container {
  width: 100%;
  height: 512px;
  margin-top: 16px;
  border: 1px solid #ccc;
}

#generated-image {
  max-width: 100%;
  max-height: 100%;
  display: none;
}

.style-hint {
  font-size: 0.8em;
  color: #6c757d;
  margin-top: 4px;
}

.error-message {
  color: red;
  display: none;
  font-size: 0.9em;
}

#turnstile-widget {
  margin: 20px;
}
