* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #eee;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
}

h1 {
  margin-bottom: 10px;
}

p {
  margin-bottom: 20px;
}

#question {
  margin-bottom: 20px;
}

#userQuestion {
  padding: 0.625rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 300px;
  font-size: 1rem;
}

#ball {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at center, #3c006e 50%, #120026);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(128, 0, 255, 0.8),
    0 0 30px rgba(255, 255, 255, 0.1) inset;
  position: relative;
}

#ball:hover {
  animation: idle 2s infinite ease-in-out;
}

@keyframes idle {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

#centerCircle {
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle at center,
    rgba(190, 140, 255, 0.9) 0%,
    rgba(128, 0, 255, 0.5) 70%,
    rgba(60, 0, 110, 0.4) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  padding: 20px;
  box-shadow: 0 0 25px rgba(190, 140, 255, 0.8), 0 0 40px rgba(128, 0, 255, 0.6),
    inset 0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  color: #fff;
  user-select: none;
  transition: font-size 0.5s ease;
  white-space: normal;
  line-height: 1.2;
  backdrop-filter: blur(2px);
}

#answer {
  font-size: 2rem;
  color: white;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease, transform 1.5s ease;
  text-align: center;
}

#answer.visible {
  font-size: 2rem;
  opacity: 1;
  transform: translateY(0);
}

#answer.eightMode {
  font-size: 6rem;
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}
