body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #282c34;
  color: white;
}

* {
  box-sizing: border-box;
}

.App {
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.App-header {
  padding: 1rem;
}

.App-header h1 {
  margin: 0;
  font-size: 2rem;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

footer {
  padding: 1rem;
  font-size: 0.8rem;
  color: #aaa;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.score-board {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.game-board {
  display: grid;
  background-color: #111;
  border: 2px solid #444;
  border-radius: 4px;
  position: relative;
  touch-action: none;
}

.cell {
  background-color: transparent;
}

.snake {
  background-color: #4CAF50;
  border-radius: 2px;
}

.food {
  background-color: #FF5722;
  border-radius: 50%;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.1s;
}

.button:active {
  transform: scale(0.98);
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}

.start-button {
  background-color: #4CAF50;
  color: white;
}

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

.start-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.pause-button {
  background-color: #FFC107;
  color: black;
}

.pause-button.paused {
  background-color: #2196F3;
  color: white;
}

.pause-button:hover {
  background-color: #e5ac00;
}

.pause-button.paused:hover {
  background-color: #0b7dda;
}

.pause-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.restart-button {
  background-color: #F44336;
  color: white;
}

.restart-button:hover {
  background-color: #d32f2f;
}

.instructions {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #aaa;
  text-align: center;
  width: 100%;
}

.game-over {
  color: #F44336;
  font-weight: bold;
}

@media (max-width: 768px) {
  .App-header h1 {
    font-size: 1.5rem;
  }
  
  .button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}