/* Personagem 3D Button Custom */
.character-3d-btn-custom {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 4px 16px 0 rgba(17,24,39,0.10);
  border-radius: 9999px;
  padding: 0.5rem 0.75rem;
  min-width: 44px;
  /* min-height: 44px; */
  cursor: pointer;
  position: relative;
  transition: width 0.35s cubic-bezier(0.4,0,0.2,1), background 0.25s, box-shadow 0.25s;
  /* width: 44px; */
  overflow: hidden;
}
.character-3d-btn-custom:hover {
  width: 310px;
  background: #fff;
  box-shadow: 0 8px 24px 0 rgba(17,24,39,0.18);
}
.character-3d-icon {
  color: #111827 !important;
  min-width: 24px;
  min-height: 24px;
  z-index: 2;
  transition: color 0.2s;
}
.character-3d-text {
  color: #111827 !important;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 0.5rem;
  opacity: 0;
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.3s, max-width 0.35s, margin-left 0.3s;
  display: none;
}
.character-3d-btn-custom:hover .character-3d-text {
  opacity: 1;
  max-width: -webkit-fill-available;
  margin-left: 0.5rem;
  display: block;
}
:root {
  --transition-duration: 0.4s;
  --transition-timing: ease-in-out;
}
body {
  font-family: "Inter", sans-serif;
  color: #374151; /* gray-700 */
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-color: #f0f2f5; /* Fallback for pages without specific bg */
}

/* Page Transitions & Base Styles */
.page {
  transition: opacity var(--transition-duration) var(--transition-timing),
    transform var(--transition-duration) var(--transition-timing),
    filter var(--transition-duration) var(--transition-timing);
  width: 100%;
  min-height: 100vh;
  position: absolute; /* Needed for smooth transitions and stacking */
  top: 0;
  left: 0;
}
.hidden-page {
  opacity: 0 !important;
  transform: scale(0.95) !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
  z-index: -1 !important; /* Send to back */
  display: none !important; /* Keep as block for transition */
}

/* Initial state for a page that will become visible */
.page-entering {
  opacity: 0;
  transform: scale(1.05);
  filter: blur(8px);
}
/* Active state for a visible page */
.page-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  pointer-events: auto;
  z-index: 10; /* Bring to front */
}

.fade-in-up {
  animation: fadeInUp 0.7s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-out-up {
  animation: fadeOutUp 0.3s ease-in-out forwards;
}
.fade-in-down {
  animation: fadeInDown 0.4s 0.2s ease-in-out forwards;
  opacity: 0;
}
@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Styles */
.card {
  background: rgba(
    255,
    255,
    255,
    0.7
  ); /* Slightly more transparent for glass effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem; /* rounded-3xl */
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); /* Softer shadow */
}
.card-opaque {
  /* For cards needing solid background */
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}
.card-inner {
  background: rgba(249, 250, 251, 0.7); /* gray-50 with alpha */
  border: 1px solid rgba(243, 244, 246, 0.5); /* gray-100 with alpha */
  border-radius: 1rem; /* More rounded */
}

/* Button Styles */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.75rem; /* rounded-xl */
}
.btn-dark {
  background-color: #111827;
  color: white;
}
.btn-dark:hover {
  background-color: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.btn-light {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.btn-light:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.btn-green {
  background-color: #10b981;
  color: white;
} /* Exemplo: bg-green-500 */
.btn-green:hover {
  background-color: #059669;
} /* Exemplo: bg-green-600 */

/* Pricing Toggle */
.plan-toggle button {
  border-radius: 0.5rem;
} /* rounded-lg */
.plan-toggle button.active {
  background-color: white;
  color: #111827;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* Generator Specific Styles */
.generator-body-bg {
  background-color: #f0f2f5;
  background-image: radial-gradient(
      circle at center,
      #dbeafe88 0.5px,
      transparent 0.5px
    ),
    radial-gradient(circle at center, #e2e8f088 0.5px, transparent 0.5px);
  background-size: 30px 30px; /* Smaller dots */
  background-position: 0 0, 15px 15px;
}
.glassmorphic {
  background: rgba(
    255,
    255,
    255,
    0.5
  ); /* Reduced alpha for more blur visibility */
  backdrop-filter: blur(18px); /* Increased blur */
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem; /* rounded-3xl */
}
.input-field {
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(229, 231, 235, 0.7); /* gray-200 with alpha */
  border-radius: 0.75rem; /* rounded-xl */
  transition: all 0.2s ease-in-out;
  padding: 0.75rem 1rem; /* p-3 */
}
.input-field:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.5); /* slate-800 focus */
  border-color: #1e293b; /* slate-800 */
  background-color: rgba(255, 255, 255, 0.85);
}
.input-field::placeholder {
  color: #9ca3af;
} /* gray-400 */
.prompt-textarea {
  resize: none;
}

.mode-btn,
.style-btn,
.ratio-btn,
#generate-btn,
#download-btn,
#upload-logo-btn,
.segment-btn, /* Adicionado para incluir os botões de segmento */
.palette-type-btn, /* Adicionado para incluir os botões de tipo de paleta */
.palette-style-btn, /* Adicionado para incluir os botões de estilo de paleta */
.style-btn-tipografia-type, /* NOVO: Adicionado para os botões de tipo de tipografia */
.style-btn-tipografia-style, /* NOVO: Adicionado para os botões de estilo de tipografia */
.style-btn-imagem, /* NOVO: Adicionado para os botões de estilo de imagem */
.style-btn-imagem-type, /* NOVO: Adicionado para os botões de tipo de imagem */
.ratio-btn-imagem, /* NOVO: Adicionado para os botões de proporção de imagem */
.style-btn-personagem-type, /* NOVO: Adicionado para os botões de tipo de personagem */
.style-btn-personagem-style, /* NOVO: Adicionado para os botões de estilo de personagem */
.style-btn-mockup-type, /* NOVO: Adicionado para os botões de tipo de mockup */
.style-btn-mockup-style, /* NOVO: Adicionado para os botões de estilo de mockup */
.pattern-btn-fundo,
.logo-type-btn /* NOVO: Adicionado para os botões de tipo de logo */ {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.75rem; /* rounded-xl */
}
.mode-btn:hover:not(.active),
.style-btn:hover:not(.active),
.ratio-btn:hover:not(.active),
.segment-btn:hover:not(.active), /* Adicionado */
.palette-type-btn:hover:not(.active), /* Adicionado */
.palette-style-btn:hover:not(.active), /* Adicionado */
.style-btn-tipografia-type:hover:not(.active), /* NOVO: Hover para tipo de tipografia */
.style-btn-tipografia-style:hover:not(.active), /* NOVO: Hover para estilo de tipografia */
.style-btn-imagem:hover:not(.active), /* NOVO: Hover para estilo de imagem */
.style-btn-imagem-type:hover:not(.active), /* NOVO: Hover para tipo de imagem */
.ratio-btn-imagem:hover:not(.active), /* NOVO: Hover para proporção de imagem */
.style-btn-personagem-type:hover:not(.active), /* NOVO: Hover para tipo de personagem */
.style-btn-personagem-style:hover:not(.active), /* NOVO: Hover para estilo de personagem */
.style-btn-mockup-type:hover:not(.active), /* NOVO: Hover para tipo de mockup */
.style-btn-mockup-style:hover:not(.active), /* NOVO: Hover para estilo de mockup */
.pattern-btn-fundo:hover:not(.active),
.logo-type-btn:hover:not(.active) /* NOVO: Hover para tipo de logo */ {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.8);
}
#generate-btn:hover:not(:disabled),
#download-btn:hover:not(:disabled),
#upload-logo-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.mode-btn.active {
  background-color: #1e293b;
  color: white;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.3);
}
.style-btn.active,
.palette-type-btn.active, /* Adicionado */
.palette-style-btn.active, /* Adicionado */
.style-btn-tipografia-type.active, /* NOVO: Ativo para tipo de tipografia */
.style-btn-tipografia-style.active, /* NOVO: Ativo para estilo de tipografia */
.style-btn-imagem.active, /* NOVO: Ativo para estilo de imagem */
.style-btn-imagem-type.active, /* NOVO: Ativo para tipo de imagem */
.style-btn-personagem-type.active, /* NOVO: Ativo para tipo de personagem */
.style-btn-personagem-style.active, /* NOVO: Ativo para estilo de personagem */
.style-btn-mockup-type.active, /* NOVO: Ativo para tipo de mockup */
.style-btn-mockup-style.active, /* NOVO: Ativo para estilo de mockup */
.pattern-btn-fundo.active,
.logo-type-btn.active /* NOVO: Ativo para tipo de logo */ {
  background-color: #334155;
  color: white;
} /* slate-700 */

/* Nova regra para o botão de segmento ativo */
.segment-btn.active {
  background-color: #334155; /* Cor de fundo para o estado ativo */
  color: white; /* Cor do texto para o estado ativo */
  border: 2px solid #111827; /* Borda escura para destaque (alterado para 2px) */
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.2); /* Sombra para destaque */
}

/* Regras específicas para os botões de proporção de imagem */
.ratio-btn-imagem.active {
  /* NOVO: Ativo para proporção de imagem */
  background-color: #334155;
}
.ratio-btn-imagem.active div {
  /* NOVO: Ativo para o div dentro do botão de proporção de imagem */
  background-color: white;
}
.ratio-btn-imagem.active span {
  /* NOVO: Ativo para o span dentro do botão de proporção de imagem */
  color: white;
}

.canvas-placeholder.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px; /* Smaller spinner */
  height: 60px;
  border-radius: 50%;
  background-color: rgba(51, 65, 85, 0.1); /* Lighter pulse */
  animation: pulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: 10;
}
@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}
#active-icon-bg {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 0.75rem; /* rounded-xl */
}

/* Hero section card animation */
.hero-process-card {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  filter: blur(5px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out,
    filter 0.6s ease-out;
}
.hero-process-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* "Tudo que voce recebe" Carousel */
.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1.5rem; /* gap-6 */
  padding-bottom: 1rem; /* For scrollbar visibility */
}
.carousel-container::-webkit-scrollbar {
  height: 8px;
}
.carousel-container::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
} /* slate-300 */
.carousel-item {
  flex: 0 0 auto;
  width: calc(
    100% / 1 - 1rem
  ); /* Full width on smallest screens, minus some gap */
  scroll-snap-align: start;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.carousel-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
@media (min-width: 640px) {
  /* sm */
  .carousel-item {
    width: calc(100% / 2 - 1rem);
  }
}
@media (min-width: 1024px) {
  /* lg */
  .carousel-item {
    width: calc(100% / 3 - 1rem);
  }
}

/* Profile Page Styles */
.profile-avatar-bg {
  background-image: linear-gradient(to right bottom, #868f96, #596164);
}
.stat-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.toggle-checkbox:checked {
  right: 0;
  border-color: #1e293b;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #1e293b;
}
