:root {
  --primary-color: #9C27B0;
  --secondary-color: #FFD54F;
  --correct-color: #4CAF50;
  --incorrect-color: #F44336;
  --background-color: #F3E5F5;
  --button-bg: #fff;
  --button-selected: #E1BEE7;
  --star-color: #FFD54F;
}

body {
  font-family: 'Comic Neue', 'Bubblegum Sans', cursive;
  background-color: var(--background-color);
  background-image: linear-gradient(rgba(156, 39, 176, 0.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(156, 39, 176, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background-color: #F3E5F5;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.score, .level-info {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
}

.question {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  background-color: #E1BEE7;
  padding: 10px 15px;
  border-radius: 10px;
  margin: 10px 0;
  display: inline-block;
  position: relative;
}

#time-left {
  display: inline-block;
  min-width: 40px;
  text-align: center;
}

.stars-container {
  position: relative;
  background-color: #303F9F;
  background-image: radial-gradient(#5C6BC0 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 15px;
  height: 300px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.star {
  position: absolute;
  background-color: var(--star-color);
  width: 20px;
  height: 20px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.9);
  }
}

.answer-container {
  margin: 20px 0;
}

.number-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.number-btn {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--button-bg);
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
}

.number-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.number-btn.correct {
  background-color: var(--correct-color);
  color: white;
  border-color: var(--correct-color);
  animation: correctPulse 1s;
}

@keyframes correctPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.number-btn.incorrect {
  background-color: var(--incorrect-color);
  color: white;
  border-color: var(--incorrect-color);
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

#start-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#start-button:hover {
  background-color: #7B1FA2;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.sound-btn {
  background-color: var(--secondary-color);
  color: #333;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sound-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.instructions {
  background-color: #F3E5F5;
  padding: 15px;
  border-radius: 15px;
  margin-top: 20px;
}

.instructions h3 {
  color: var(--primary-color);
  margin-top: 0;
}

.instructions p {
  margin: 5px 0;
}

.level-complete, .game-over {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 100;
}

.level-complete.show, .game-over.show {
  opacity: 1;
  pointer-events: all;
}

.level-complete-text, .game-over-text {
  color: white;
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.final-score {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: 30px;
}

.moon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #F5F5F5;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.moon::before {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  background-color: #E0E0E0;
  border-radius: 50%;
}

.moon::after {
  content: '';
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: 15px;
  height: 15px;
  background-color: #E0E0E0;
  border-radius: 50%;
}

.shooting-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: white;
  border-radius: 50%;
  opacity: 0;
  z-index: 5;
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  width: 30px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

@keyframes shootingStar {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(300px, 300px);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .game-info {
    flex-direction: column;
    gap: 10px;
  }
  
  .stars-container {
    height: 250px;
  }
} 