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

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  color: white;
  overflow: hidden;
  position: relative;
  background: #12002b;
}

.gradient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background-size: 500% 500%;
  animation: movingGradient 11s ease-in-out infinite;
  transition: opacity 2s ease-in-out;
  pointer-events: none;
}

.active-gradient {
  opacity: 1;
}

.base-gradient {
  background: linear-gradient(
    130deg,
    #12002b,
    #5b0a91,
    #ff4ecd,
    #00c8ff,
    #240046,
    #ff9de2
  );
}

.yes-gradient {
  background: linear-gradient(
    130deg,
    #003b3f,
    #007f7f,
    #00d4ff,
    #1effa5,
    #005f73,
    #9effe0
  );
}

.no-gradient {
  background: linear-gradient(
    130deg,
    #2b0000,
    #7a1200,
    #ff3c00,
    #ff7a18,
    #b80000,
    #ffd166
  );
}

.maybe-gradient {
  background: linear-gradient(
    130deg,
    #240046,
    #5a189a,
    #ff4ecd,
    #ff8ad8,
    #9d4edd,
    #ffb3ec
  );
}

@keyframes movingGradient {
  0% {
    background-position: 0% 50%;
  }

  25% {
    background-position: 50% 100%;
  }

  50% {
    background-position: 100% 50%;
  }

  75% {
    background-position: 50% 0%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.background-effects {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(35px);
  opacity: 0.65;
  mix-blend-mode: screen;
}

.blob-one {
  width: 330px;
  height: 330px;
  background: #ff4ecd;
  top: 8%;
  left: 8%;
  animation: floatOne 8s ease-in-out infinite;
}

.blob-two {
  width: 420px;
  height: 420px;
  background: #00c8ff;
  bottom: 5%;
  right: 6%;
  animation: floatTwo 10s ease-in-out infinite;
}

.blob-three {
  width: 260px;
  height: 260px;
  background: #ffe66d;
  top: 55%;
  left: 18%;
  animation: floatThree 7s ease-in-out infinite;
}

@keyframes floatOne {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(90px, 80px) scale(1.25);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes floatTwo {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-110px, -90px) scale(1.2);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes floatThree {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, -110px) scale(1.15);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

.light-ring {
  position: absolute;
  width: 900px;
  height: 900px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent,
    rgba(255, 78, 205, 0.25),
    transparent,
    rgba(0, 200, 255, 0.25),
    transparent
  );
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0.7;
  animation: spinLight 16s linear infinite;
}

@keyframes spinLight {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.12);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }
}

.game-container {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 95%;
  max-width: 1000px;
  padding: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.ball-area {
  position: relative;
  width: 950px;
  height: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle-text {
  position: absolute;
  top: 315px;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 5;
  animation: circleTextSpin 7s linear infinite;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.circle-text span {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  color: white;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(255, 78, 205, 0.95),
    0 0 30px rgba(0, 200, 255, 0.9);
}

.circle-hidden {
  opacity: 0;
  visibility: hidden;
}

@keyframes circleTextSpin {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  100% {
    transform: translateX(-50%) rotate(360deg);
  }
}

#eightBallButton {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 600px;
  height: 600px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 4;
  transform: translateX(-50%);
  transition: opacity 0.2s ease, filter 0.2s ease;
  animation: ballFloat 4s ease-in-out infinite;
}

@keyframes ballFloat {
  0% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-18px);
  }

  100% {
    transform: translateX(-50%) translateY(0);
  }
}

#eightBallButton:hover:not(:disabled) {
  transform: translateX(-50%) scale(1.06);
  filter: brightness(1.15);
}

#eightBallButton:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#eightBallImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 35px 30px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 25px rgba(255, 255, 255, 0.35));
}

.shake {
  animation: shakeBallFast 0.45s linear infinite !important;
}

@keyframes shakeBallFast {
  0% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }

  8% {
    transform: translateX(calc(-50% - 50px)) translateY(-12px) rotate(-14deg);
  }

  16% {
    transform: translateX(calc(-50% + 50px)) translateY(12px) rotate(14deg);
  }

  24% {
    transform: translateX(calc(-50% - 42px)) translateY(10px) rotate(-12deg);
  }

  32% {
    transform: translateX(calc(-50% + 42px)) translateY(-10px) rotate(12deg);
  }

  40% {
    transform: translateX(calc(-50% - 36px)) translateY(-10px) rotate(-10deg);
  }

  48% {
    transform: translateX(calc(-50% + 36px)) translateY(10px) rotate(10deg);
  }

  56% {
    transform: translateX(calc(-50% - 30px)) translateY(8px) rotate(-8deg);
  }

  64% {
    transform: translateX(calc(-50% + 30px)) translateY(-8px) rotate(8deg);
  }

  72% {
    transform: translateX(calc(-50% - 24px)) translateY(-6px) rotate(-6deg);
  }

  80% {
    transform: translateX(calc(-50% + 24px)) translateY(6px) rotate(6deg);
  }

  88% {
    transform: translateX(calc(-50% - 16px)) translateY(-4px) rotate(-4deg);
  }

  100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
}

#questionInput {
  width: 100%;
  max-width: 750px;
  padding: 16px 8px;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  color: white;
  font-size: 18px;
  outline: none;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: none;
}

#questionInput::placeholder {
  color: #f2f2f2;
}

#questionInput:focus {
  border-bottom-color: white;
  background: transparent;
  box-shadow: none;
}

#hint {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 18px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

#answerBox {
  min-height: 75px;
  padding: 16px;
  background: transparent;
  border: none;
  font-size: 26px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.8),
    0 0 28px rgba(255, 78, 205, 0.8),
    0 0 40px rgba(0, 200, 255, 0.65);
}

@media (max-width: 950px) {
  body {
    overflow-y: auto;
  }

  .game-container {
    width: 100%;
    padding: 12px;
  }

  .ball-area {
    width: 100%;
    height: 650px;
  }

  .circle-text {
    top: 265px;
  }

  .circle-text span {
    font-size: 25px;
  }

  #eightBallButton {
    width: 450px;
    height: 450px;
    top: 40px;
  }
}

@media (max-width: 520px) {
  .ball-area {
    height: 550px;
  }

  .circle-text {
    top: 220px;
  }

  .circle-text span {
    font-size: 20px;
  }

  #eightBallButton {
    width: 360px;
    height: 360px;
    top: 45px;
  }

  #answerBox {
    font-size: 22px;
  }
}