@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Questrial&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  overflow: auto;
  position: relative;
  padding: 20px;
  box-sizing: border-box;
  background-color: #f8f9fa;
}

.container {
  z-index: 10;
  position: relative;
  max-width: 90vw;
}

h1 {
  color: #2c3e50;
  margin-bottom: 10px;
  position: relative;
}

h2 {
  font-size: 32px;
  margin-top: 0;
  color: #e66161;
}

.error-code {
  font-size: 120px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  color: #9e1717;
}

.error-code img {
  width: 120px;
  height: 120px;
}

.pelota {
  width: 120px;
  height: 120px;
}

p {
  font-size: 20px;
  margin-bottom: 30px;
}

.boton-volver {
  display: inline-block;
  padding: 12px 24px;
  font-size: 18px;
  background-color: #64d2ee;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s;
}

.boton-volver:hover {
  background-color: #459ed1;
}


#contador {
  font-weight: bold;
  color: #e66161;
  font-size: 22px;
  transition: transform 0.3s ease;
}

#contador.animate {
  transform: scale(1.3);
}

.decoracion {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  display: block;
}

@keyframes moverNube {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.nube1 {
  top: 280px;
  left: 30px;
  width: 400px;
  animation: moverNube 6s ease-in-out infinite;
}

.nube2 {
  top: 50px;
  right: 150px;
  width: 550px;
  animation: moverNube 8s ease-in-out infinite;
}

.nube3 {
  top: 600px;
  right: 100px;
  width: 300px;
  animation: moverNube 7s ease-in-out infinite;
}



@media (max-width: 768px) {
  .error-code {
    font-size: 80px;
    gap: 10px;
  }

  .error-code img,
  .pelota {
    width: 80px;
    height: 80px;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.2em;
  }

  p {
    font-size: 16px;
  }

  .boton-volver {
    font-size: 16px;
    padding: 10px 20px;
  }

  .nube1 {
    width: 200px;
    top: 200px;
    left: 20px;
  }

  .nube2 {
    width: 250px;
    top: 30px;
    right: 50px;
  }

  .nube3 {
    width: 180px;
    top: 500px;
    right: 40px;
  }

}
