	body {
  font-family: system-ui, sans-serif;
  background: #1e1e2e; /* Catpuccin Base */
  color: #cdd6f4; /* Catpuccin Text */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

.container {
  margin: 40px auto;
  background: #181825; /* Catpuccin Mantle */
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 12px #0008;
  max-width: 700px; /* Slightly wider to accommodate the larger input */
  width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}

h1 {
  text-align: center;
  color: #cba6f7; /* Catpuccin Mauve (as a nice accent) */
  margin-top: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

input,
select {
  padding: 0.75rem; /* Slightly increased padding */
  border: 1px solid #313244; /* Catpuccin Surface0 for a subtle border */
  border-radius: 8px; /* Slightly more rounded */
  font-size: 1rem;
  background: #1e1e2e; /* Catpuccin Base */
  color: #cdd6f4; /* Catpuccin Text */
}

button {
  padding: 0.8rem 1.5rem; /* Adjusted padding */
  font-size: 1.1rem; /* Slightly larger font */
  background-color: #a6e3a1; /* Catpuccin Green (as a primary action color) */
  color: #11111b; /* Catpuccin Crust (dark text on the button) */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease; /* Smooth transition for hover */
}

button:hover {
  background-color: #94e2d5; /* Catpuccin Teal (a slightly different shade on hover) */
}

.output {
  margin-bottom: 2rem; /* Output at the top */
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Increased gap for better separation */
}

.output img {
  max-width: 100%;
  border-radius: 8px;
  border: 2px solid #cba6f7; /* Catpuccin Mauve for image border */
}

/* For the status messages */
.status {
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
}

.status.loading {
  background-color: #313244; /* Catpuccin Surface0 */
  color: #fabd2f; /* Catpuccin Peach */
}

.status.success {
  background-color: #2c6e49; /* Similar to your original success color */
  color: #a6e3a1; /* Catpuccin Green */
}

.status.error {
  background-color: #7b1e1e; /* Similar to your original error color */
  color: #f38ba8; /* Catpuccin Red */
}

.status.warning {
  background-color: #55501e; /* Similar to your original warning color */
  color: #f9e2af; /* Catpuccin Yellow */
}

/* Image display - Adjusted for Catpuccin */
.images-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.image-item {
  border: 1px solid #45475a; /* Catpuccin Overlay1 for a subtle border */
  padding: 15px;
  border-radius: 10px;
  background-color: #1e1e2e; /* Catpuccin Base */
}

.generated-image {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #585c70; /* Catpuccin Overlay2 */
}

.image-url {
  margin-top: 10px;
}

.image-url input {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  background: #313244; /* Catpuccin Surface0 */
  color: #cdd6f4; /* Catpuccin Text */
  border: 1px solid #45475a; /* Catpuccin Overlay1 */
  margin-bottom: 0.5rem;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-url-btn {
  flex: 1;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  background-color: #74c7ec; /* Catpuccin Sapphire */
  color: #11111b; /* Catpuccin Crust */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
  min-width: 100px;
}

.copy-url-btn:hover {
  background-color: #89b4fa; /* Catpuccin Sky */
}

/* Auto-expanding input styling */
.auto-expanding-input-container {
  position: relative;
  width: 100%;
}

.auto-expanding-input {
  width: 100%;
  min-height: 60px;
  padding: 0.75rem;
  border: 1px solid #313244;
  border-radius: 8px;
  font-size: 1rem;
  background: #1e1e2e;
  color: #cdd6f4;
  resize: none;
  overflow: hidden;
  transition: border-color 0.3s;
  box-sizing: border-box;
  line-height: 1.5;
}

.auto-expanding-input:focus {
  outline: none;
  border-color: #cba6f7; /* Catpuccin Mauve focus */
  box-shadow: 0 0 0 2px rgba(203, 166, 247, 0.3);
}

/* Prompt styling */
.prompt-label {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

/* Loader styling */
.loader {
  color: #cba6f7; /* Catpuccin Mauve */
  text-align: center;
  padding: 1rem;
  font-weight: bold;
  font-size: 1.1rem;
  animation: pulse 1.2s infinite;
}

.hidden {
  display: none;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Download Button Styling */
.download-btn {
  flex: 1;
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  background-color: #f9e2af; /* Catpuccin Yellow */
  color: #11111b; /* Catpuccin Crust */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none; /* Remove default link underline */
  transition: background-color 0.2s ease;
  text-align: center;
  min-width: 100px;
}

.download-btn:hover {
  background-color: #e5c890; /* Darker shade of Catpuccin Yellow */
}

/* Error styling */
.error-container {
  background-color: rgba(243, 139, 168, 0.1); /* Catpuccin Red with opacity */
  border: 1px solid #f38ba8; /* Catpuccin Red */
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.error-icon {
  font-size: 1.5rem;
}

.error-message {
  color: #f38ba8; /* Catpuccin Red */
  font-weight: 500;
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 1rem 0;
  background: #181825; /* Catpuccin Mantle */
  color: #cdd6f4; /* Catpuccin Text */
  border-top: 1px solid #313244; /* Catpuccin Surface0 */
  font-size: 0.9rem;
  width: 100%;
}

.prompt-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #a6e3a1; /* Catpuccin Green for the prompt */
  background-color: #1e1e2e; /* Match image item background */
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #45475a; /* Catpuccin Overlay1 */
}

.prompt-text p:first-child {
  font-weight: bold;
  margin-bottom: 0.3rem;
}

/* Mobile Support */
@media (max-width: 768px) {
  .container {
    margin: 20px auto;
    padding: 1.5rem;
    border-radius: 8px;
    width: calc(100% - 1rem);
  }

  h1 {
    font-size: 1.75rem;
  }

  form {
    gap: 0.75rem;
  }

  input,
  select,
  button {
    padding: 0.6rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .auto-expanding-input {
    padding: 0.6rem;
    font-size: 0.9rem;
    min-height: 50px;
  }

  button {
    padding: 0.7rem 1.2rem;
  }

  .images-container {
    gap: 1rem;
    margin-top: 1rem;
  }

  .image-item {
    padding: 10px;
    border-radius: 8px;
  }

  .image-url input {
    font-size: 0.8rem;
    padding: 0.5rem;
    border-radius: 4px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .copy-url-btn, 
  .download-btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
  }

  .loader {
    font-size: 1rem;
  }

  footer {
    font-size: 0.8rem;
    padding: 0.7rem 0;
  }

  .error-container {
    padding: 10px;
  }

  .error-icon {
    font-size: 1.2rem;
  }

  .error-message {
    font-size: 0.9rem;
  }
}

/* Touch device specific adjustments */
@media (hover: none) {
  button:active,
  .copy-url-btn:active,
  .download-btn:active {
    transform: scale(0.97);
  }
}


/* Add these styles to your existing CSS to handle the error state */

.auto-expanding-input.error {
  border-color: #f38ba8; /* Catpuccin Red for error */
  box-shadow: 0 0 0 2px rgba(243, 139, 168, 0.3);
}

.prompt-error {
  color: #f38ba8; /* Catpuccin Red */
  font-size: 0.85rem;
  margin-top: 0.3rem;
  padding-left: 0.2rem;
}

/* Status display enhancements */
.status {
  min-height: 2rem;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
}

/* Ensure error container is visible and stands out */
.error-container {
  background-color: rgba(243, 139, 168, 0.1); /* Catpuccin Red with opacity */
  border: 1px solid #f38ba8; /* Catpuccin Red */
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Make the form-row class visible for side-by-side size and quantity */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row label {
  flex: 1;
  min-width: 150px;
}

/* Ensure inputs have consistent styling */
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #313244;
  border-radius: 8px;
  font-size: 1rem;
  background: #1e1e2e;
  color: #cdd6f4;
  cursor: pointer;
}

/* Fix button color to match the screenshot */
button[type="submit"] {
  background-color: #a6e3a1; /* Catpuccin Green */
  color: #11111b;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button[type="submit"]:hover {
  background-color: #94e2d5; /* Catpuccin Teal */
}

button[type="submit"]:active {
  transform: scale(0.98);
}
    /* Additional styles to complement your existing CSS */
    /* Character counter styling */
    .char-counter {
      position: absolute;
      right: 10px;
      bottom: -20px;
      font-size: 0.8rem;
      color: #bac2de; /* Catppuccin Subtext1 */
      opacity: 0.7;
    }

    /* Reset button styling */
    .reset-btn {
      padding: 0.8rem 1.5rem;
      font-size: 1.1rem;
      background-color: #313244; /* Catppuccin Surface0 */
      color: #cdd6f4; /* Catppuccin Text */
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.1s ease;
      margin-left: 10px;
    }

    .reset-btn:hover {
      background-color: #45475a; /* Catppuccin Overlay1 */
    }

    .reset-btn:active {
      transform: scale(0.98);
    }

    /* Example prompts styling */
    .examples-container {
      margin: 1rem 0;
      font-size: 0.9rem;
    }

    .examples-container summary {
      cursor: pointer;
      color: #89b4fa; /* Catppuccin Blue */
      font-weight: 500;
      padding: 0.5rem 0;
      user-select: none;
    }

    .examples-container summary:hover {
      color: #b4befe; /* Catppuccin Lavender */
    }

    .example-list {
      margin-top: 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      background: #1e1e2e; /* Catppuccin Base */
      border: 1px solid #313244; /* Catppuccin Surface0 */
      border-radius: 8px;
      padding: 0.75rem;
    }

    .example-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem;
      border-radius: 6px;
      background: #181825; /* Catppuccin Mantle */
    }

    .example-item span {
      padding-right: 0.5rem;
      color: #a6e3a1; /* Catppuccin Green */
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .example-prompt {
      padding: 0.4rem 1rem;
      font-size: 0.85rem;
      background-color: #cba6f7; /* Catppuccin Mauve */
      color: #11111b; /* Catppuccin Crust */
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.1s ease;
      flex-shrink: 0;
    }

    .example-prompt:hover {
      background-color: #f5c2e7; /* Catppuccin Pink */
    }

    /* Form actions container */
    .form-actions {
      display: flex;
      margin-top: 1.5rem;
    }

    /* Timing info styles */
    .timing-info {
      margin-top: 1.5rem;
      padding: 1rem;
      background: #181825; /* Catppuccin Mantle */
      border: 1px solid #313244; /* Catppuccin Surface0 */
      border-radius: 8px;
      font-size: 0.9rem;
    }

    .timing-info h3 {
      color: #cba6f7; /* Catppuccin Mauve */
      margin-top: 0;
      margin-bottom: 0.75rem;
      font-size: 1rem;
      text-align: center;
    }

    .timing-info table {
      width: 100%;
      border-collapse: collapse;
    }

    .timing-info table tr:not(:last-child) {
      border-bottom: 1px solid #313244; /* Catppuccin Surface0 */
    }

    .timing-info table td {
      padding: 0.5rem;
    }

    .timing-info table td:first-child {
      color: #bac2de; /* Catppuccin Subtext1 */
    }

    .timing-info table td:last-child {
      text-align: right;
      color: #a6e3a1; /* Catppuccin Green */
      font-family: monospace;
    }

    /* Improve cursor feedback */
    .generated-image {
      cursor: pointer;
    }

    .generated-image:hover {
      opacity: 0.9;
      box-shadow: 0 0 0 2px #cba6f7; /* Catppuccin Mauve */
    }

    /* Keyboard shortcut hint */
    .keyboard-hint {
      font-size: 0.8rem;
      color: #bac2de; /* Catppuccin Subtext1 */
      opacity: 0.7;
      margin-top: 0.5rem;
      text-align: right;
    }
  