* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  padding: 1rem;
  min-height: 100vh;
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

form {
  margin-top: 0 !important;
}

form {
  background: rgba(30, 30, 46, 0.8);
  padding: 2rem;
  border-radius: 16px;
  max-width: 650px;
  margin: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

form::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.1) 0%, rgba(229, 46, 113, 0) 70%);
  z-index: -1;
  animation: rotate 20s linear infinite;
}

label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
  color: #ffb86c;
  font-size: 0.95rem;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 36, 0.7);
  color: #fff;
  transition: all 0.3s ease;
}

textarea {
  margin-bottom: 0px !important;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #ff8a00;
  box-shadow: 0 0 0 2px rgba(255, 138, 0, 0.3);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  padding: 14px;
  font-size: 18px;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}

button:hover {
  transform: translatey(-2px);
  box-shadow: 0 6px 20px rgba(255, 138, 0, 0.4);
}

.advanced {
  display: block;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.maisopcoes {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  background: linear-gradient(90deg, #4e4376, #2b5876);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.maisopcoes:hover {
  background: linear-gradient(90deg, #3a2d6d, #1a3a5a);
  transform: translatey(-2px);
}

.warning {
  color: #ff6b6b;
  text-align: center;
  margin-bottom: 25px;
  padding: 12px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
  border-left: 4px solid #ff6b6b;
}

.sidebar {
  background: rgba(30, 30, 46, 0.8);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
  flex: none;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.logo {
  max-width: 250px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.5));
}

.logo-container::after {
  content: "";
  display: block;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff8a00, transparent);
  margin: 15px auto;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal img {
  max-width: 85%;
  max-height: 85%;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(255, 138, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: #ff8a00;
  transform: scale(1.2);
}

.image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.download-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  color: white;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.download-btn:hover {
  background: rgba(255, 138, 0, 0.9);
  transform: translatey(-2px);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.status {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  background: rgba(255, 138, 0, 0.1);
  border-left: 4px solid #ff8a00;
  animation: pulse 2s infinite;
}

.status.error {
  background: rgba(244, 67, 54, 0.1);
  border-left-color: #f44336;
  animation: none;
}

.status.success {
  background: rgba(76, 175, 80, 0.1);
  border-left-color: #4CAF50;
  animation: none;
}

.image-placeholder {
  position: relative;
  padding: 20px;
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 46, 0.5);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
}

.placeholder-text {
  margin-top: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 2rem auto;
  width: 100%;
  margin-top: 30px;
  transition: opacity 0.3s ease;
}

.gallery img {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.loading-spinner {
  display: none;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 138, 0, 0.3);
  border-radius: 50%;
  border-top-color: #ff8a00;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


body.generating .loading-spinner {
  display: block;
}

body.generating .placeholder-icon {
  display: none;
}


#placeholder-gallery, #main-gallery {
  display: grid;
    column-count: 4;
    gap: 12px;
}


.gallery-placeholders {
  display: none;
}

body.generating .gallery {
  opacity: 0.7;
}

body.generating #placeholder-gallery {
  display: grid;
}

.gallery-container {
  flex: 1;
  column-count: 2;
  column-gap: 14px;
  padding: 20px;
  display:grid;
}

.select-search-wrapper {
  position: relative;
}

.select-search-input {
  width: 100%;
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: none;
  padding: 12px;
  background: rgba(30, 30, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  outline: none;
}

select:focus + .select-search-input, .select-search-input:focus {
  display: block;
}

.custom-select {
  position: relative;
  margin-bottom: 18px;
  z-index: 9999;
}

.custom-select.open {
  z-index: 9999;
}

.custom-select-wrapper {
  display: none;
}

.select-button {
  width: 100%;
  padding: 12px;
  text-align: left;
  background: rgba(20, 20, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}

.select-button:hover {
  border-color: #ff8a00;
}

.select-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  padding-right: 20px;
}

.select-button::after {
  content: "▼";
  font-size: 0.8em;
  margin-left: 10px;
  position: absolute;
  right: 15px;
}

.select-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: rgba(30, 30, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 8px 8px;
  z-index: 20;
  margin-top: 5px;
  border-top: none;
}

.select-option {
  padding: 12px 15px;
  cursor: pointer;
  color: #ddd;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
}

.select-option:hover {
  background: rgba(255, 138, 0, 0.2);
  color: white;
}

.select-option.selected {
  background: rgba(255, 138, 0, 0.3);
  color: white;
}

.select-option.placeholder {
  color: #888;
  font-style: italic;
}

.menu-tabs {
  display: flex;
  background: rgba(20, 20, 36, 0.7);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 25px;
}

.aba {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: #aaa;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-size: 0.95rem;
}

.aba.active {
  background: linear-gradient(135deg, #ff8a00, #e52e71);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}

.aba:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 20px;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  border: 1px solid #ff8a00;
}

.tab-content {
  display: none;
  margin: 0;
}

.tab-content.active {
  display: block;
  margin: 0;
  padding:0;
}

/*
.sidebar::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.1) 0%, rgba(229, 46, 113, 0) 70%);
  z-index: -1;
  animation: rotate 20s linear infinite;
}
  */

.placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.remove-btn {
  background: #f44;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.remove-btn:hover {
  background: #c00;
  transform: scale(1.1);
}

#imagePreviewContainer {
  display: none;
  margin-top: 10px;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  padding: 10px;
  border: 1px dashed #ddd;
  border-radius: 5px;
}

#imagePreview {
  max-width: 100px;
  max-height: 100px;
  border-radius: 5px;
  object-fit: contain;
}

.image-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 20px;
  background: linear-gradient(90deg, #736b62, #b09ba3);
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 5px;
}

.image-btn:hover {
  opacity: 0.9;
}

.image-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.gold-icon {
  color: gold;
}
#floating-footer {
  position: fixed;
  bottom: 0;
  left: 50%;                /* começa no centro da tela */
  transform: translateX(-50%); /* ajusta para centralizar */
  width: 60%;

  color: #ddd;
  font-size: 0.85em;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.44);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wall-grid {
  column-count: 4;
  column-gap: 14px;
  padding: 20px;
}

@media (max-width: 768px) {
  .wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    column-count: unset; /* desativa o column-count */
  }

  .wall-card {
    aspect-ratio: 1 / 1;
    width: 100%;
  }

  .wall-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
  }
}

.wall-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  z-index: 5;
  align-items: center;
}

.wall-actions button, .wall-actions a {
  box-sizing: border-box;
  margin: 0;
  position: relative;
  top: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 1em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  line-height: 1;
  vertical-align: middle;
}

.wall-card {
  background: none;
  display: inline-block;
  margin: 0 0 14px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.wall-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.wall-card:hover {
  transform: scale(1.03);
}


.wall-card {
  position: relative; /* necessário para que os filhos com position:absolute fiquem contidos */

}

.wall-actions {
  visibility: hidden;  /* escondido por padrão */
  opacity: 0;
  transition: all 0.2s ease;
}

.wall-card:hover .wall-actions {
  visibility: visible;
  opacity: 1;
}

.add-to-wall-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  line-height: 1;
}

.image-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.add-to-wall-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.credit-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ centraliza filhos horizontalmente */
  text-align: center;  /* ✅ alinha o texto */
  gap: 0.5rem;
  background-color: transparent;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 0.5px solid #ff8a00; /* <== define borda completa */
  font-size: 0.875rem;
  width: 100%;

}


.credit-bar-container .usuario {
  color: #d8b4fe; /* text-purple-300 */
  font-size: 1rem;
}

.credit-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.credit-bar-background {
  background-color: #4b5563; /* bg-gray-600 */
  width: 140px;
  height: 0.5rem;
  border-radius: 9999px;
  overflow: hidden;
}

.credit-bar-fill {
  background-color: #34d399; /* bg-green-400 */
  height: 0.5rem;
  border-radius: 9999px;
  transition: width 0.3s ease-in-out;
}




.icone-scroll-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.scroll-left, .scroll-right {
  background-color: transparent;
  background: linear-gradient(90deg, #ff8a00, #e52e71);
  border: none;
  color: white;
  font-size: 1.25rem;
  width: 15%;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  margin-top: 0px;
  box-shadow: none
}
.scroll-left:hover, .scroll-right:hover {
  opacity: 1;
}

.icone-grid-container {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  max-width: 100%;
  scrollbar-width: none; /* Firefox */
}

.icone-grid-container::-webkit-scrollbar {
  display: none; /* Chrome */
}


.icone-grupo {
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
  flex-shrink: 0;
  background-color: transparent;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s;
}

.icone-grupo.selected {
  border-color: #f472b6; /* rosa */
  transform: scale(1.1);
}

.icone-grupo:hover {
  border-color: #999; /* cinza discreto no hover */
}


.page-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar,
.content-area {
  width: 100%;
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Desktop: sidebar à esquerda, gallery e wall em coluna à direita */
@media (min-width: 768px) {

  .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .page-wrapper {
  margin: 0 auto;
  max-width: 1400px;
}


  .sidebar {
    width: 400px;
    flex-shrink: 0;
  }

  .content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  #gallery-container {
    margin-bottom: 1rem;
  }

  .wall-grid {
    flex: 1;
  }
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  top: 0;
  left: 0;
  pointer-events: none; /* Para que cliques passem por ele */
}


.btn {
  background: linear-gradient(90deg, #76389a, #e52e71);
  text-align: center;
  font-size: 0.875rem; /* small */
  border-radius: 4px;
  border: none;
  cursor: pointer;
    width: 15%;
  transition: background-color 0.2s ease-in-out;
  display: inline-flex;
justify-content: center;
align-items: center;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.btn-outline-light {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

.refine-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 270px;
  margin: 0px 0;
  font-weight: 500;
  color: #f5f5f5;
  font-size: 0.95rem;
}

.refine-toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  width: 40px;
  height: 22px;
  background-color: #444;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s;
  margin-left: 12px;
}

.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

input[type="checkbox"]:checked + .slider {
  background-color: #44d664;
}

input[type="checkbox"]:checked + .slider::before {
  transform: translateX(18px);
}
