/* Estilos para Modal de Celebração */

/* Modal de celebração */
#celebration-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#celebration-modal.show {
  opacity: 1;
  visibility: visible;
}

/* Conteúdo do modal */
.celebration-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.7) translateY(50px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

#celebration-modal.show .celebration-content {
  transform: scale(1) translateY(0);
}

/* Efeito de brilho no fundo */
.celebration-content::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
  100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
}

/* Emoji de celebração */
.celebration-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-10px) scale(1.1);
  }
}

/* Título */
.celebration-title {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
      0 0 10px rgba(255, 255, 255, 0.2);
  }
  to {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
      0 0 20px rgba(255, 255, 255, 0.4);
  }
}

/* Mensagem */
.celebration-message {
  color: #f0f0f0;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Nível destacado */
.celebration-level {
  color: #ffd700;
  font-weight: bold;
  font-size: 1.3em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Botão continuar */
.celebration-button {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.celebration-button:hover {
  background: linear-gradient(135deg, #45a049, #4caf50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.celebration-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

/* Animação de entrada */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Animação de saída */
@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .celebration-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .celebration-emoji {
    font-size: 3rem;
  }

  .celebration-title {
    font-size: 2rem;
  }

  .celebration-message {
    font-size: 1rem;
  }

  .celebration-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* Modo escuro */
html.dark #celebration-modal {
  background-color: rgba(0, 0, 0, 0.8);
}

html.dark .celebration-content {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  border: 1px solid #4a5568;
}

html.dark .celebration-title {
  color: #f7fafc;
}

html.dark .celebration-message {
  color: #e2e8f0;
}

/* Partículas decorativas no modal */
.celebration-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.celebration-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffd700;
  border-radius: 50%;
  animation: float 3s infinite ease-in-out;
}

.celebration-particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}
.celebration-particle:nth-child(2) {
  left: 20%;
  animation-delay: 0.5s;
}
.celebration-particle:nth-child(3) {
  left: 30%;
  animation-delay: 1s;
}
.celebration-particle:nth-child(4) {
  left: 40%;
  animation-delay: 1.5s;
}
.celebration-particle:nth-child(5) {
  left: 50%;
  animation-delay: 2s;
}
.celebration-particle:nth-child(6) {
  left: 60%;
  animation-delay: 2.5s;
}
.celebration-particle:nth-child(7) {
  left: 70%;
  animation-delay: 3s;
}
.celebration-particle:nth-child(8) {
  left: 80%;
  animation-delay: 3.5s;
}
.celebration-particle:nth-child(9) {
  left: 90%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(100px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}
