body {
  display: flex;
  justify-content: center;
  height: 100vh;
  margin: 0;
  background-image: url("/images/gameplay_background.png");
  background-size: cover;
}

@font-face {
  font-family: 'japan';
  src: url('fonts/Jarene.otf') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.custom-font {
  font-family: 'japan', sans-serif; /* Используйте кастомный шрифт */
  color: black; /* Цвет текста */
  text-shadow:
          -1px -1px 0px white,
          1px -1px 0px white,
          -1px 1px 0px white,
          1px 1px 0px white; /* Окантовка черного цвета */
}

.custom-font2 {
  font-family: 'japan', sans-serif; /* Используйте кастомный шрифт */
  color: black; /* Цвет текста */
  text-shadow:
          -1px -1px 0px #ffdf61,
          1px -1px 0px #f8ce59,
          -1px 1px 0px #f69b29,
          1px 1px 0px #f5c760; /* Окантовка черного цвета */
}


#game {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 90vmin;
  max-width: 400px;
}

#board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background-image: url("/images/background_field.png");
  padding: 5px;
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 1;
  position: relative;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.tile-0 { background: transparent; color: transparent; } /* Прозрачный для пустых ячеек */


#score {
  font-size: 1.5em;
  margin: 20px 0;
  height: 50px;
  width: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("/images/score_field.png");
  text-align: center;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-items: center;
  align-content: center;
}

button {
  font-size: 2em;
  background-image: url("/images/Button.png");
  color: white;
  cursor: pointer;
  border: none; /* Убирает рамку кнопки */
  background-repeat: no-repeat; /* Изображение не повторяется */
  background-size: contain; /* Изображение масштабируется для заполнения кнопки */
  width: 150px; /* Ширина кнопки */
  height: 150px; /* Высота кнопки */
  background-color: transparent; /* Убирает фон кнопки */
  padding: 0; /* Убирает отступы */
  outline: none; /* Убирает обводку при фокусе */
}


#status {
  margin-top: 10px;
  font-size: 1.2em;
}

.cell {
  background-image: url("/images/gameplay_field.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 5px;
  display: flex; /* Flexbox для центрирования текста */
  align-items: center; /* Центрирование по вертикали */
  justify-content: center; /* Центрирование по горизонтали */
  width: 100%; /* Полная ширина ячейки */
  height: 100%; /* Полная высота ячейки */
  min-width: 0; /* Минимальная ширина для отзывчивости */
  min-height: 0; /* Минимальная высота для отзывчивости */
  position: relative; /* Для позиционирования текста по центру */
  box-sizing: border-box; /* Учитываем отступы и границы в размерах */
}


.cen {
  display: flex;
  flex-direction: column;
  align-content: center;
  align-self: center;
  align-items: center;
  justify-content: center; /* Выравнивание дочерних элементов по центру */
  flex: 1; /* Занимает все доступное пространство по высоте */

}

