body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #1a1a1a;
  color: #fff;
  font-family: 'Georgia', sans-serif;
}

.game-container {
  text-align: center;
}

h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #4caf50;
}

.score-container {
  margin: 20px 0;
}

.score {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(20, 20px);
  grid-template-rows: repeat(20, 20px);
  gap: 1px;
  background-color: #333;
  border: 2px solid #555;
  margin: 0 auto;
}

.cell {
  width: 20px;
  height: 20px;
  background-color: #1a1a1a;
}

.snake {
  background-color: #4caf50;
  border-radius: 5px;
  animation: pulse 0.5s infinite alternate;
}

.snake2 {
  background-color: #2196f3;
  border-radius: 5px;
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.food {
  background-color: #f44336;
  border-radius: 50%;
  animation: spin 2s infinite linear;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.obstacle {
  background-color: #777;
  border-radius: 3px;
}

#start-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1.2rem;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

.level-menu {
  margin-bottom: 20px;
}

.level-menu label {
  font-size: 1.2rem;
  margin-right: 10px;
}

.level-menu select {
  padding: 5px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #555;
  background-color: #333;
  color: #fff;
}

.sound-control {
  margin: 10px 0;
  font-size: 1rem;
  color: #fff;
}

.sound-control label {
  cursor: pointer;
}

.sound-control input[type="checkbox"] {
  margin-right: 5px;
}

@media (max-width: 600px) {
  .game-board {
      grid-template-columns: repeat(20, 15px);
      grid-template-rows: repeat(20, 15px);
  }

  .game-board div {
      width: 15px;
      height: 15px;
  }

  h1 {
      font-size: 2rem;
  }

  .score {
      font-size: 1.2rem;
  }

  #start-button {
      font-size: 1rem;
      padding: 8px 16px;
  }

  .level-menu label {
      font-size: 1rem;
  }

  .level-menu select {
      font-size: 0.9rem;
  }
}