body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  color: white;
  overflow: hidden;
}

.contenedor {
  width: 70%;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid lime;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  position: relative;
}

.titulo {
  font-family: 'Monoton', cursive;
  font-size: 3.5rem;
  font-weight: bold;
  text-transform: uppercase;
  background: linear-gradient(
    270deg,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    violet,
    magenta,
    red
  );
  background-size: 600% 600%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: arcoiris 6s linear infinite;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  letter-spacing: 2px;
}

@keyframes arcoiris {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

p {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 20px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"] {
  width: 60%;
  max-width: 480px;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid magenta;
  border-radius: 5px;
  background: white;
  color: black;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background: magenta;
  color: black;
  font-weight: bold;
  cursor: pointer;
  animation: botonFlash 1s infinite;
}

@keyframes botonFlash {
  0% { background: magenta; }
  50% { background: lime; }
  100% { background: magenta; }
}

#respuesta {
  margin-top: 20px;
  background: white;
  color: black;
  font-size: 1.1rem;
  padding: 15px;
  border-radius: 5px;
  min-height: 140px;
  text-align: left;
  overflow: hidden;
}

#respuesta p {
  margin: 8px 0;
  padding: 6px;
  background: #f7f7f7;
  border-radius: 4px;
  color: black;
  font-family: "Comic Sans MS", "Courier New", cursive, monospace;
}

.particula {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: lime;
  border-radius: 50%;
  pointer-events: none;
  opacity: 1;
  animation: desaparecer 0.8s forwards;
}

@keyframes desaparecer {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50px + 100px*var(--randx)), calc(-50px + 100px*var(--randy))) scale(0);
    opacity: 0;
  }
}

.gif {
  position: absolute;
  width: 80px;
  height: 80px;
  pointer-events: none;
}

.esquina {
  width: 100px;
  height: 100px;
}

#esq1 { top: 10px; left: 10px; }
#esq2 { top: 10px; right: 10px; }
#esq3 { bottom: 10px; left: 10px; }
#esq4 { 
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 100px;
  height: 100px;
  z-index: 10;
}

.rebotante {
  width: 50px;
  height: 50px;
}

.fade {
  animation: fundir 2s infinite alternate;
}

@keyframes fundir {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
