body {
  background: #111;
  color: white;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  text-align: center;
}

input {
  padding: 10px;
  width: 250px;
  border-radius: 5px;
  border: none;
  margin-bottom: 10px;
}

button {
  padding: 10px 20px;
  background: #444;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background: #666;
}

/* 8-ball outer */
.eight-ball {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle at 30% 30%, #333, #000);
  border-radius: 50%;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  transform-style: preserve-3d;
}

/* Inner circle */
.inner {
  width: 120px;
  height: 120px;
  background: #0a0a2a;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 4px solid #1a1a4a;
  position: relative;
}

/* Liquid triangle */
.triangle {
  width: 0;
  height: 0;
  border-left: 35px solid transparent;
  border-right: 35px solid transparent;
  border-bottom: 60px solid rgba(0, 80, 200, 0.9);
  position: absolute;
  top: 40px;
  filter: drop-shadow(0 0 8px rgba(0, 120, 255, 0.5));
  transform-origin: center;
  animation: liquidFloat 3s ease-in-out infinite;
}

@keyframes liquidFloat {
  0%   { transform: translateY(0px) rotate(0deg); }
  50%  { transform: translateY(4px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Answer text */
.answer-text {
  color: white;
  font-size: 1.1rem;
  text-align: center;
  padding: 10px;
  z-index: 2;
}

/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.5s ease;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* Glow pulse */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0px rgba(0, 150, 255, 0.0); }
  50% { box-shadow: 0 0 25px rgba(0, 150, 255, 0.8); }
  100% { box-shadow: 0 0 0px rgba(0, 150, 255, 0.0); }
}

.glow {
  animation: pulseGlow 1.2s ease-out;
}

/* 3D spin animation */
@keyframes spin3D {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  25%  { transform: rotateX(15deg) rotateY(-15deg); }
  50%  { transform: rotateX(-10deg) rotateY(20deg); }
  75%  { transform: rotateX(10deg) rotateY(-10deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}

.spin-3d {
  animation: spin3D 0.6s ease;
}

/* Thinking animation */
.thinking {
  opacity: 0.4;
  animation: thinkingPulse 0.8s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%   { opacity: 0.4; }
  50%  { opacity: 1; }
  100% { opacity: 0.4; }
}