:root {
  --primary-color: #4CAF50;
  --secondary-color: #FFC107;
  --accent-color: #FF5722;
  --background-color: #E8F5E9;
  --snake-color: #388E3C;
  --food-color: #F44336;
  --border-color: #1B5E20;
}

body {
  font-family: 'Comic Neue', 'Bubblegum Sans', cursive;
  background-color: var(--background-color);
}

.game-container {
  max-width: 600px;
  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;
  margin-bottom: 20px;
  background-color: #F1F8E9;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.score {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.game-controls {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

#start-button, #pause-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: #66BB6A;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#pause-button {
  background-color: var(--secondary-color);
}

#pause-button:hover {
  background-color: #FFCE43;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#game-canvas {
  background-color: #F1F8E9;
  border: 8px solid var(--border-color);
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  height: auto;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.difficulty-btn {
  background-color: #E0E0E0;
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.difficulty-btn:hover {
  transform: translateY(-3px);
}

.difficulty-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.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;
}

.game-over.show {
  opacity: 1;
  pointer-events: all;
}

.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;
}

.directions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  background-color: #F1F8E9;
  padding: 15px;
  border-radius: 15px;
}

.directions p {
  margin: 5px 0;
  font-size: 1.1rem;
}

.key-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 5px;
  margin: 15px 0;
  max-width: 150px;
}

.key {
  padding: 10px;
  background-color: #E0E0E0;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.key.up {
  grid-column: 2;
  grid-row: 1;
}

.key.left {
  grid-column: 1;
  grid-row: 2;
}

.key.down {
  grid-column: 2;
  grid-row: 3;
}

.key.right {
  grid-column: 3;
  grid-row: 2;
}

.mobile-controls {
  display: none;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.mobile-btn {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.snake-character {
  position: absolute;
  width: 100px;
  left: 20px;
  bottom: 20px;
  transform: rotate(-15deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-15px) rotate(-5deg);
  }
}

@media (max-width: 768px) {
  .mobile-controls {
    display: flex;
  }
  
  .game-info {
    flex-direction: column;
    gap: 10px;
  }
  
  #game-canvas {
    height: 320px;
  }
}

.sound-btn {
  background-color: var(--secondary-color);
  color: white;
  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);
} 