/* =========================================
   ANIMATED GRADIENT BACKGROUND
========================================= */
.gradient-bg {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(120deg, #000000, #1a1a1a, #3a2b00, #000000);
  background-size: 300% 300%;
  animation: gradientMove 12s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =========================================
   FIRST ANIMATION DEMO – CONFETTI BUTTON
========================================= */
.animation-demo {
  text-align: center;
  font-family: "Poppins", sans-serif;
  margin-bottom: 80px;
}

#confettiBtn {
  background: #000;
  color: #f7d774;
  border: 2px solid #f7d774;
  padding: 14px 32px;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

#confettiBtn:hover {
  background: #f7d774;
  color: #000;
  transform: scale(1.05);
}

#welcomeMessage {
  margin-top: 40px;
  font-size: 2rem;
  color: #f7d774;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s ease;
}

#welcomeMessage.show {
  opacity: 1;
  transform: translateY(0);
}

/* Confetti falling */
.confetti {
  position: fixed;
  top: -10px;
  border-radius: 50%;
  opacity: 0.9;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Emoji particles floating upward */
.emoji {
  position: fixed;
  bottom: -20px;
  animation: floatUp ease-out forwards;
  opacity: 0.9;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-120vh) scale(1.4); opacity: 0; }
}

/* =========================================
   SECOND ANIMATION DEMO – 3D FLIP CARD
========================================= */
.flip-card-container {
  perspective: 1000px;
  margin-bottom: 80px;
}

.flip-card {
  width: 260px;
  height: 180px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
  cursor: pointer;
}

.flip-card:hover {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Front side */
.flip-card-front {
  background: #111;
  border: 2px solid #f7d774;
  color: #f7d774;
}

.flip-card-front .icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* Back side */
.flip-card-back {
  background: #f7d774;
  color: #000;
  transform: rotateY(180deg);
  text-align: center;
  padding: 20px;
}

/* =========================================
   THIRD ANIMATION DEMO – MAGIC 8 BALL
========================================= */

.eightball-container {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Magic 8 Ball sphere */
.eightball {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 30% 30%, #222, #000);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(247, 215, 116, 0.4);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Spin animation */
.eightball.spin {
  animation: spinBall 1.2s ease;
}

@keyframes spinBall {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Shake animation */
.eightball.shake {
  animation: shakeBall 0.8s ease;
}

@keyframes shakeBall {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}

/* Triangle window */
.triangle {
  width: 0;
  height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-bottom: 120px solid #1a1a1a;
  position: absolute;
  top: 40px;
  left: 30px;
  filter: drop-shadow(0 0 10px rgba(247, 215, 116, 0.5));
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Answer text */
#eightballAnswer {
  position: absolute;
  top: 55px;
  width: 100px;
  text-align: center;
  font-size: 1rem;
  color: #f7d774;
  font-family: "Poppins", sans-serif;
  text-shadow: 0 0 8px rgba(247, 215, 116, 0.8);
}


