/* Animações para o site banner.top */

/* Animação de entrada para os elementos */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação de pulso para botões e elementos interativos */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Animação de gradiente em movimento */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animação de brilho para elementos destacados */
@keyframes shine {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animação de flutuação suave */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Aplicação das animações aos elementos */

/* Logo animada */
.logo h1 {
  animation: fadeIn 1.2s ease-out;
}

/* Efeito de brilho na logo */
.logo::after {
  content: '';
  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%
  );
  background-size: 200% 100%;
  animation: shine 3s infinite linear;
  pointer-events: none;
}

/* Animação para o campo de pesquisa */
.search-container {
  animation: fadeIn 0.8s ease-out 0.3s backwards;
}

/* Animação para os resultados da pesquisa */
.movie-card {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

/* Aplicar atraso sequencial para cada card */
.movie-card:nth-child(1) { animation-delay: 0.1s; }
.movie-card:nth-child(2) { animation-delay: 0.2s; }
.movie-card:nth-child(3) { animation-delay: 0.3s; }
.movie-card:nth-child(4) { animation-delay: 0.4s; }
.movie-card:nth-child(5) { animation-delay: 0.5s; }
.movie-card:nth-child(6) { animation-delay: 0.6s; }
.movie-card:nth-child(7) { animation-delay: 0.7s; }
.movie-card:nth-child(8) { animation-delay: 0.8s; }
.movie-card:nth-child(9) { animation-delay: 0.9s; }
.movie-card:nth-child(10) { animation-delay: 1.0s; }

/* Animação para botões */
.btn-primary {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}

.btn-primary:active {
  animation: pulse 0.3s ease-out;
}

/* Animação para o modal */
.modal-content {
  animation: fadeIn 0.4s ease-out;
}

/* Animação para a seção de prévia */
.preview-section, .customize-section, .final-result-section {
  animation: fadeIn 0.6s ease-out;
}

/* Animação para a área de upload */
.upload-area:hover {
  animation: pulse 1.5s infinite ease-in-out;
}

/* Animação para o resultado final */
.final-image {
  animation: float 6s infinite ease-in-out;
}

/* Animação para mensagem de carregamento */
.loading {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loading div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading div:nth-child(1) {
  left: 8px;
  animation: loading1 0.6s infinite;
}

.loading div:nth-child(2) {
  left: 8px;
  animation: loading2 0.6s infinite;
}

.loading div:nth-child(3) {
  left: 32px;
  animation: loading2 0.6s infinite;
}

.loading div:nth-child(4) {
  left: 56px;
  animation: loading3 0.6s infinite;
}

@keyframes loading1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes loading3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}

@keyframes loading2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}

/* Animação para notificações */
.notification {
  animation: fadeIn 0.3s ease-out, fadeOut 0.5s ease-in 2.5s forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Efeito de transição para as seções */
.search-section,
.results-section,
.preview-section,
.customize-section,
.final-result-section {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hidden-section {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Animação para o botão de copiar link */
#copy-link:active {
  animation: pulse 0.3s ease-out;
}

/* Efeito de hover para os cards de filmes */
.movie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(106, 17, 203, 0.4), rgba(37, 117, 252, 0.4));
  opacity: 0;
  transition: opacity var(--transition-speed);
  z-index: 1;
}

.movie-card:hover::before {
  opacity: 1;
}

/* Efeito de zoom suave para imagens */
.movie-card img {
  transition: transform var(--transition-speed);
}

.movie-card:hover img {
  transform: scale(1.1);
}
