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

body {
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  padding: 50px;
  color: #333;
}

h1 {
  font-size: 3rem;
  margin-bottom: 30px;
  color: #333;
}

#game-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.color-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 10px;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  background-repeat: no-repeat;
  background-size: cover;
}

#green {
  background: radial-gradient(circle at center, #4caf50 0%, #2e7d32 100%);
}

#red {
  background: radial-gradient(circle at center, #f44336 0%, #c62828 100%);
}

#yellow {
  background: radial-gradient(circle at center, #ffeb3b 0%, #fbc02d 100%);
}

#blue {
  background: radial-gradient(circle at center, #2196f3 0%, #1565c0 100%);
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  transform: scale(1.15);
  filter: brightness(1.3);
  box-shadow: 0 0 20px rgba(255,255,255,0.7);
}

#game-status {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #333;
}

#start-btn {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1.2rem;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#start-btn:hover {
  transform: scale(1.05);
}

#start-btn:hover {
  background-color: #45a049;
}

#status {
  font-weight: bold;
}

#level-message {
  font-size: 24px;
  font-weight: bold;
  color: green;
  text-align: center;
  margin-top: 20px;
  opacity: 0; /* Initially hidden */
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  display: none; /* Make sure it's hidden initially */
}

#level-message.show {
  opacity: 1;
  display: block;
  transform: scale(1.1);
}

/* shake effect for wrong answer */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

#game-container.shake {
  animation: shake 0.4s;
}

#level-message.show {
  opacity: 1; /* Fade in the message */
  display: block; /* Make it visible */
}

.my-text {
  font-size: 1.5rem;
  margin-top: 20px;
  color: #333;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: none;
}
.my-text.show {
  opacity: 1;
  display: block;
  transition: opacity 0.5s ease-in-out;
}

/* responsive */
@media (max-width: 600px) {
  .color-btn {
    width: 70px;
    height: 70px;
    margin: 6px;
  }
  h1 {
    font-size: 2.2rem;
  }
  #level-message {
    font-size: 20px;
  }
}
