@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --primary-color: #4a148c;
  --secondary-color: #6a1b9a;
  --background-color: #000000;
  --surface-color: #1d1d1d;
  --on-surface-color: #ffffff;
  --error-color: #b00020;
  --success-color: #1b5e20;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Karla', sans-serif;
  background: linear-gradient(135deg, #2d0a4a 0%, #3a0c5a 15%, #4a1570 30%, #380b58 45%, #3a0c5a 60%, #2d0a4a 75%, #1f0635 90%, #2d0a4a 100%);
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120vh;
  margin-bottom: 150px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

#prompt-input {
  text-align: center;
  line-height: 2;
  display: block;
  width: calc(100% - 0.5rem);
  min-width: 300px;
  box-sizing: border-box;
  padding: 0.5rem;
}

#selectOptions {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 90%;
  gap: 10px;
}
body {
  padding-top: 80px;
}

#refresh-icon, .language-select {
  position: fixed;
  top: 20px;
  z-index: 9999;
}

#refresh-icon {
  right: 20px;
}

.language-select {
  right: 60px;
}

.nav-bar {
  background: rgba(45, 10, 74, 0.9);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.nav-bar a {
  text-decoration: none;
  color: #e0e0e0;
  font-size: 18px;
  margin: 0 10px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-bar a:hover {
  color: #ffffff;
}

.nav-bar a.active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

h1, h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

h1 { 
  font-size: 2.5rem; 
  color: #ffffff;
}
h2 { 
  font-size: 1.8rem; 
  color: var(--primary-color);
}

.input-group {
  margin: 0 auto 2rem auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}

.input-group textarea,
.input-group input {
  margin: 0 auto;
  max-width: 900px;
  width: calc(100% - 2rem);
  text-align: center;
}

.input-group > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group > div {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.input-group > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.input-controls {
  position: absolute;
  top: -30px;
  left: 0;
  right: 5%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 25px;
  z-index: 2;
}

@media (min-width: 1200px) {
  .input-controls {
    left: calc((100% - 900px) / 2);
    right: calc((100% - 900px) / 2 + 5%);
  }
}

#clipart-icon {
  float: left;
  margin-right: auto;
  border-radius: 50%;
}

label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--on-surface-color);
  text-align: center;
  width: 100%;
  font-size: 0.95rem;
}

label i {
  color: var(--primary-color);
}

input, select, textarea {
  width: 90%;
  max-width: 900px;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  height: 50px;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  line-height: 50px;
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Karla', sans-serif;
  background: #000000;
  backdrop-filter: blur(10px);
  color: #e0e0e0;
  text-align: center;
  box-sizing: border-box;
}

textarea {
  min-height: 100px;
  max-height: 300px;
  resize: vertical;
  margin: 0 auto;
  display: block;
  width: 90%;
  max-width: 900px;
}

input::placeholder, textarea::placeholder {
  color: #bbbbbb;
}

input:focus, select:focus, textarea:focus {
  border-color: #bb86fc;
  box-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
}

button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #bb86fc 0%, #6a1b9a 50%, #4a148c 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  max-height: 50px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.2);
}

#generateButton {
  max-height: 50px;
  overflow: hidden;
}

button:hover {
  background: linear-gradient(135deg, #d4b3ff 0%, #bb86fc 50%, #6a1b9a 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
}

button:active {
  transform: translateY(0);
}

.images-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 1200px;
  padding: 0;
  justify-items: center;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2d0a4a 0%, #3a0c5a 30%, #4a1570 60%, #5a2080 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(90, 32, 128, 0.3);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(45, 10, 74, 0.5);
}

.image-wrapper:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 45px rgba(187, 134, 252, 0.2);
  border-color: rgba(187, 134, 252, 0.3);
}

.generated-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: all 0.3s ease;
  display: block;
  transform: scale(1);
}

.generated-image.loaded {
  opacity: 1;
}

.image-wrapper:hover .generated-image {
  transform: scale(1.05);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes neural-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.5); opacity: 1; }
}

.neural-node {
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  animation: neural-pulse 2s infinite ease-in-out;
}

.neural-node:nth-child(1) { top: 0; left: 50%; animation-delay: 0s; }
.neural-node:nth-child(2) { top: 25%; left: 25%; animation-delay: 0.3s; }
.neural-node:nth-child(3) { top: 25%; right: 25%; animation-delay: 0.6s; }
.neural-node:nth-child(4) { bottom: 25%; left: 25%; animation-delay: 0.9s; }
.neural-node:nth-child(5) { bottom: 25%; right: 25%; animation-delay: 1.2s; }
.neural-node:nth-child(6) { bottom: 0; left: 50%; animation-delay: 1.5s; }

.config-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.config-group > div {
  flex: 1;
}

@media (max-width: 768px) {
  .config-group {
    flex-direction: column;
  }

  .input-group label {
    text-align: center;
    width: 100%;
  }

  input, textarea {
    max-width: 100%;
  }

}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
    width: calc(100% - 1rem);
    margin: 40px auto 20px auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .config-group {
    flex-direction: column;
  }

  .favorite-button {
    width: 25px;
    height: 25px;
  }

  .favorite-button svg {
    width: 16px;
    height: 16px;
  }

  button {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }

  .input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
  }

  .input-group label {
    text-align: center;
    width: 100%;
  }

  input, textarea {
    /* max-width: 100%; This is redundant with width: 100% */
  }
}

#progress-bar {
  width: 100%;
  height: 10px;
  background-color: #444444;
  border-radius: 5px;
  margin-top: 1rem;
  overflow: hidden;
}

#progress-bar-inner {
  width: 0;
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

#message {
  text-align: center;
  margin-top: 1rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error { color: var(--error-color); }
.success { color: var(--success-color); }

#queue-status {
  text-align: center;
  margin-top: 1rem;
  font-weight: 700;
}

.model-info {
  font-size: 0.9rem;
  color: #cccccc;
  margin-top: 0.5rem;
}

.thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  transition: opacity 0.5s ease;
}

#prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.suggestion-chip {
  background-color: #2c2c2c;
  border-radius: 16px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: var(--on-surface-color);
}

.suggestion-chip:hover {
  background-color: var(--secondary-color);
  color: white;
}

#previous-prompts {
  margin-top: 1rem;
}

#previous-prompts select {
  width: 100%;
  background-color: #2c2c2c;
  color: var(--on-surface-color);
  border: 2px solid #444444;
}

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

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.2) 50%,
    rgba(255,255,255,0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.spell-check-suggestion {
  position: absolute;
  left: 0;
  bottom: -20px;
  font-size: 0.8rem;
  color: var(--error-color);
  cursor: pointer;
}

.spell-check-suggestion:hover {
  text-decoration: underline;
}

.highlight {
  background-color: #ffff00;
}

.favorite-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.favorite-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.favorite-button i {
  color: white;
  font-size: 14px;
}

.highres-download-button {
  position: absolute;
  top: 10px;
  right: 50px;
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.highres-download-button:hover {
  background: linear-gradient(135deg, #66BB6A 0%, #388E3C 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.5);
}

.highres-download-button i {
  color: white;
  font-size: 12px;
}

/* High-resolution download button for favorites */
.favorite-image-container .highres-download-button {
  position: absolute;
  top: 8px;
  right: 48px;
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.favorite-image-container .highres-download-button:hover {
  background: linear-gradient(135deg, #66BB6A 0%, #388E3C 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.5);
}

.favorite-image-container .highres-download-button i {
  color: white;
  font-size: 11px;
}

/* High-Resolution Download Notifications */
.download-notification {
  font-family: 'Karla', sans-serif;
  font-weight: 400;
  border-radius: 10px !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.download-notification .notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-notification .notification-icon {
  font-size: 1.1em;
  flex-shrink: 0;
}

.download-notification .notification-message {
  font-size: 0.9em;
  line-height: 1.4;
}

/* Animation keyframes for notifications */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

#favorites-gallery {
  margin-top: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #1f0635 0%, #2d0a4a 25%, #3a0c5a 50%, #4a1570 75%, #5a2080 100%);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(90, 32, 128, 0.4);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(45, 10, 74, 0.6);
  text-align: center;
}

#favorites-gallery h2 {
  color: #e0e0e0;
  margin-bottom: 15px;
  font-size: 1.5em;
}

#favorites-gallery h2 .fas.fa-heart {
  color: #ff4d4d;
  margin: 0 10px;
}

#favorites-gallery .warning-message {
  color: #ffcc00;
  font-size: 0.9em;
  margin-bottom: 20px;
}

#delete-all-favorites {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

#delete-all-favorites:hover {
  background-color: #cc0000;
}

#delete-all-favorites .fas.fa-trash-alt {
  margin-right: 8px;
}

#favorites-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 20px;
  min-height: 100px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2d0a4a 0%, #3a0c5a 30%, #4a1570 60%, #5a2080 100%);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(90, 32, 128, 0.3);
  color: #e0e0e0;
  box-shadow: 0 8px 32px rgba(45, 10, 74, 0.5);
}

.favorite-image {
  flex: 1 1 150px;
  max-width: 200px;
  background-color: #2a2a2a;
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.favorite-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .favorite-image {
    flex-basis: 120px;
    max-width: 150px;
  }
}

footer {
  position: fixed;
  bottom: 0;
  text-align: center;
  left: 0;
  right: 0;
  background-color: black;
  border-top: 1px solid #6a1b9a;
  width: 100%;
}

footer p {
  font-size: 14px;
  color: white;
}

.selectContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 20px;
  padding: 0 1rem;
  max-height: 50px;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}

.selectContainer select {
  width: 100%;
  min-width: 140px;
  margin: 0;
}

@media (max-width: 768px) {
  .selectContainer {
    grid-template-columns: repeat(2, 1fr);
    width: calc(100% - 2rem);
  }
}

@media (max-width: 480px) {
  .selectContainer {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

#improveSlogan {
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#improveSlogan:hover,
#improveSlogan:active {
  color: #d9a2fb;
}

#improveSlogan {
  padding: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#brandName {
  color: lime;
  font-size: 20px;
  text-align: center;
  width: 100%;
  margin-bottom: 10px;
}

#slogan {
  color: #fd30e2;
  font-size: 18px;
  font-weight: light;
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

#waitGif {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: fixed;
width: 40%;
height: auto;
z-index: 99999999;
}

#refresh-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  z-index: 9999;
}

#selectContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 90%;
  gap: 10px;
}

.favorite-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.share-button, .delete-button {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 12px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1;
}

.share-button {
  bottom: 8px;
  left: 8px;
}

.delete-button {
  top: 32px;
  right: 8px;
}

.download-button, .share-button:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #00ff00;
}

.download-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  color: white;
  border: none;
  width: 16px;
  height: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
  font-size: 12px;
  padding: 0;
  z-index: 10;
}

.download-button:hover {
  color: #00ff00;
}

.delete-button:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #ff0000;
}

.delete-all-button {
  background-color: #2c2c2c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  width: fit-content;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 40px;
}

.delete-all-button:hover {
  background-color: #ff0000;
  transform: translateY(-2px);
}

#download-all-zip {
  background-color: transparent;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  
  font-size: 0.9rem;
  
}

#download-all-zip:hover {
  background-color: #00aa00;
  transform: translateY(-2px);
}

.delete-all-button i, #download-all-zip i {
  font-size: 16px;
}

/* Dropzone Styles */
.dropzone {
  border: 2px dashed rgba(90, 32, 128, 0.5);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  background: #000000;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px auto;
  max-width: 90%;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
}

.dropzone.dragover {
  background: rgba(45, 10, 74, 0.2);
  border-color: #5a2080;
}

.dropzone-content {
  color: #ffffff;
}

.dropzone-content i {
  font-size: 36px;
  color: #5a2080;
  margin: 15px 0 10px 0;
}

.dropzone-hint {
  font-size: 0.8em;
  color: #aaaaaa;
  margin-top: 5px;
}

/* Thumbnail Grid Styles */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 60px));
  gap: 8px;
  margin: 25px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  justify-content: center;
  min-height: 0;
}

.thumbnail-grid:empty {
  display: none;
}

.thumbnail-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  background: #2c2c2c;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.remove-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}

#refresh-icon:hover {
  transform: rotate(180deg);
  transition: transform 0.5s ease;
}

.language-select {
  position: fixed;
  top: 20px;
  left: 10px;
  z-index: 9999;
  background: transparent;
  color: white;
  border: none;
  padding: 2px;
  cursor: pointer;
  font-size: 16px;
  width: 35px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.language-select:focus {
  outline: none;
}

.selectContainer select {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.image-action-button {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.download-button {
  top: 8px;
  left: 8px;
}

.share-button {
  top: 8px;
  right: 8px;
}

.preview-button {
  bottom: 8px;
  left: 8px;
}

.add-to-collection-button {
  bottom: 8px;
  right: 8px;
}

.image-action-button:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
}

.download-button:hover { color: #00ff00; }
.share-button:hover { color: #00ffff; }
.preview-button:hover { color: #ffff00; }
.add-to-collection-button:hover { color: #ff00ff; }

.add-to-collection-button:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #bb86fc;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
  margin: 10% auto;
  padding: 25px;
  border: 1px solid #444;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
  color: #bb86fc;
  margin-top: 0;
}

.modal-content .input-group {
  margin-bottom: 15px;
}

.modal-content label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: #aaa;
  font-weight: bold;
}

.modal-content label i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  color: #bb86fc;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea {
  width: 100%;
  padding: 10px;
  background-color: #000000;
  border: 1px solid #555;
  color: #e0e0e0;
  border-radius: 4px;
  box-sizing: border-box;
}

.modal-content textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-content button {
  background-color: #bb86fc;
  color: #121212;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.modal-content button:hover {
  background-color: #a06cd5;
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.modal-content.success-flash {
    background-color: #003d00;
    transition: background-color 0.5s ease-out;
}

#message.error {
    background-color: #5d0000;
}

/* Processing Modal Styles */
.processing-modal {
  display: flex;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.processing-content {
  background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
  color: #e0e0e0;
  padding: 40px;
  border-radius: 20px;
  border: 2px solid #bb86fc;
  box-shadow: 0 20px 60px rgba(187, 134, 252, 0.3);
  text-align: center;
  min-width: 400px;
  max-width: 90vw;
}

.processing-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.processing-header i {
  font-size: 32px;
  color: #bb86fc;
}

.processing-header h3 {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
  font-weight: 600;
}

.processing-status {
  font-size: 16px;
  margin-bottom: 25px;
  color: #bbbbbb;
  min-height: 20px;
}

.processing-bar-container {
  position: relative;
  width: 100%;
  height: 12px;
  background-color: #333333;
  border-radius: 6px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid #555555;
}

.processing-progress {
  height: 100%;
  background: linear-gradient(90deg, #bb86fc 0%, #6a1b9a 50%, #4a148c 100%);
  border-radius: 6px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(187, 134, 252, 0.5);
}

.processing-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.processing-spinner {
  margin-top: 20px;
}

.processing-spinner i {
  font-size: 24px;
  color: #bb86fc;
}

@media (max-width: 600px) {
  .processing-content {
    padding: 30px 20px;
    min-width: 300px;
  }
  
  .processing-header h3 {
    font-size: 20px;
  }
  
  .processing-header i {
    font-size: 28px;
  }
}

/* --- Refine Prompt Icon Styles --- */

@keyframes blink-colors {
  0%   { color: #bb86fc; } /* Purple */
  25%  { color: #6a1b9a; } /* Darker Purple */
  50%  { color: #03dac6; } /* Teal (Contrast) */
  75%  { color: #cf6679; } /* Error/Reddish */100% { color: #bb86fc; } /* Back to Purple */
}

.refine-prompt-icon {
    cursor: pointer !important;
    margin: 0 5px; /* Add some space around the icon */
    vertical-align: middle; /* Align icon nicely with text */
    font-size: 1.1em; /* Slightly larger than label text */
    animation: blink-colors 3s infinite step-end; /* Apply blinking animation */
    transition: transform 0.2s ease;
    z-index: 9999 !important;
    position: relative;
}

.refine-prompt-icon:hover {
    transform: scale(1.2);
}

/* Remove specific label style */
/* 
label[for="prompt-input"] {
    display: inline-flex; 
    align-items: center;
}
*/