:root {
  --primary-color: #3F51B5;
  --secondary-color: #FFC107;
  --correct-color: #4CAF50;
  --incorrect-color: #F44336;
  --background-color: #E8EAF6;
  --number-bg: #fff;
  --number-selected: #BBDEFB;
}

body {
  font-family: 'Comic Neue', 'Bubblegum Sans', cursive;
  background-color: var(--background-color);
}

.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: #E3F2FD;
  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: #E8EAF6;
  padding: 10px 15px;
  border-radius: 10px;
  margin: 10px 0;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.number-line-container {
  position: relative;
  margin: 60px 0 30px;
  padding: 0 20px;
}

.number-line {
  display: flex;
  overflow-x: auto;
  padding: 20px 40px;
  background-color: #F5F5F5;
  border-radius: 10px;
  position: relative;
  min-height: 80px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  scrollbar-width: none; /* For Firefox */
}

.number-line::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Opera */
}

.number-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--primary-color);
  transform: translateY(-50%);
}

.number {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--number-bg);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  margin: 0 10px;
  font-size: 1.5rem;
  font-weight: bold;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  cursor: pointer;
  z-index: 2;
}

.number.selected {
  background-color: var(--number-selected);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(63, 81, 181, 0.5);
}

.number.correct {
  background-color: var(--correct-color);
  color: white;
  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.incorrect {
  background-color: var(--incorrect-color);
  color: white;
  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);
  }
}

.pointer {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: var(--secondary-color);
  transition: left 0.3s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.control-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#select-number {
  background-color: var(--secondary-color);
  color: #333;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

#start-button {
  background-color: var(--correct-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: #66BB6A;
  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: #E3F2FD;
  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;
}

@media (max-width: 768px) {
  .game-info {
    flex-direction: column;
    gap: 10px;
  }
  
  .number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
} 