body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: url('/images/tropical-background-anime.png') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #fff;
}

.container {
  background-color: rgba(0, 51, 34, 0.7);
  padding: 40px 20px;
  border-radius: 15px;
  max-width: 800px;
  margin: 40px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

h1 {
  font-size: 2.8em;
  margin-bottom: 15px;
}

h2 {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
}

p, ol {
  font-size: 1.1em;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 20px;
  color: #e8f5e9;
}

ol {
  text-align: left;
  padding-left: 20px;
}

ol li {
  margin-bottom: 12px;
}

.button-group {
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.button-group button {
  min-width: 200px;
}

button {
  background-color: #80cbc4;
  color: #003322;
  padding: 14px 28px;
  font-size: 1em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

button:hover {
  background-color: #4db6ac;
  color: #ffffff;
}

button:focus {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

#confirmationForm {
  max-width: 400px;
  margin: auto;
  padding: 20px;
}

#confirmationForm input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 1em;
}

#confirmationForm button {
  margin: 5px;
  font-size: 1em;
  padding: 10px 20px;
}


#preview {
  margin-top: 30px;
  display: none;
}

#error {
  color: #ffdddd;
  margin-top: 20px;
}

img {
  max-width: 90%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


#colorCanvas {
  border: 2px solid white;
  border-radius: 8px;
  cursor: crosshair;
  background-color: white;
  display: block;
  image-rendering: pixelated; /* helps preserve line crispness */
}

@media (max-width: 480px) {
  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .button-group button {
    width: 90%;
  }
}

/* 🌀 Spinner */
#spinner {
  display: none;
  text-align: center;
  margin-top: 20px;
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #009688;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 🖼️ Image Preview */
#preview {
  display: none;
  margin-top: 20px;
  text-align: center;
}

#uploadedImage {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
