body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(155deg, #1e2446, #b7222c);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  margin: 0;
  overflow: hidden;
}

.container {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px 50px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  animation: containerEntrance 0.8s ease-out;
  position: relative;
  z-index: 1;
  width: 1000px;
}
.container img{
  width: 300px;
  animation: titlePulse2 3s infinite alternate-reverse;
}
@keyframes containerEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


@keyframes titlePulse2 {
  0% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }

  100% {
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  }
}


@keyframes titlePulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }

  100% {
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  }
}

.inputs {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin: 20px 0;
}

.digit {
  width: 150px;
  height: 150px;
  font-size: 6rem;
  font-weight: 800;
  text-align: center;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  outline: none;
  transition: all 0.3s;
  animation: digitEntrance 0.5s ease-out;
}

.digit:nth-child(1) {
  animation-delay: 0.2s;
}

.digit:nth-child(2) {
  animation-delay: 0.4s;
}

.digit:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes digitEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.digit:focus {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
}

.digit.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

button {
  padding: 10px 20px;
  border: none;
  background: #1e2446;
  color: #fff;
  font-size: 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  animation: buttonEntrance 0.8s ease-out;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

@keyframes buttonEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

button:hover {
  background: #b7222c;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
}

button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }

  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.resultado {
  margin-top: 20px;
  font-size: 3rem;
  font-weight: bold;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resultado.ganador {
  animation: ganadorAnimation 1s ease-out;
  color: #00ff88;
}

@keyframes ganadorAnimation {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.resultado.perdedor {
  animation: perdedorAnimation 0.5s ease-out;
}

@keyframes perdedorAnimation {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  50% {
    transform: translateX(10px);
  }

  75% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(0);
  }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #f00;
  opacity: 0;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(1000px) rotate(360deg);
    opacity: 0;
  }
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-element {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }

  25% {
    transform: translateY(-20px) translateX(10px) rotate(90deg);
  }

  50% {
    transform: translateY(0) translateX(20px) rotate(180deg);
  }

  75% {
    transform: translateY(20px) translateX(10px) rotate(270deg);
  }

  100% {
    transform: translateY(0) translateX(0) rotate(360deg);
  }
}
