/* Bear Snake Game CSS */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background-color: #f8f8f8;
  color: #333;
}

h1 {
  color: #8B4513;
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  color: #CD853F;
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.game-container {
  margin: 20px 0;
  border: 4px solid #8B4513;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  width: 100%;
  max-width: 500px;
}

.controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.game-info {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  font-weight: bold;
}

.score-container {
  background-color: #f3e5d8;
  padding: 8px 15px;
  border-radius: 20px;
  color: #8B4513;
}

button {
  padding: 10px 20px;
  background-color: #CD853F;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #8B4513;
}

#gameCanvas {
  border: 2px solid #CD853F;
  background-color: #f9f9f9;
  margin: 0 auto;
  display: block;
}

#touchControls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  width: 150px;
  margin: 20px auto;
}

.touch-btn {
  padding: 15px;
  background-color: #CD853F;
  color: white;
  border: none;
  border-radius: 5px;
  text-align: center;
  user-select: none;
  font-weight: bold;
}

.touch-btn:hover {
  background-color: #8B4513;
}

#upButton { grid-column: 2; grid-row: 1; }
#leftButton { grid-column: 1; grid-row: 2; }
#rightButton { grid-column: 3; grid-row: 2; }
#downButton { grid-column: 2; grid-row: 3; }

.instructions {
  background-color: #f3e5d8;
  border-left: 4px solid #CD853F;
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
}

.instructions h3 {
  color: #8B4513;
  margin-top: 0;
}

.footer {
  margin-top: 30px;
  text-align: center;
  color: #888;
  font-size: 0.9em;
}