/* Контейнер для элементов управления (находится под игрой) */
.controls-container {
  width: 100%;
  max-width: 512px;
  margin: 20px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Верхняя панель: джойстик и A/B кнопки */
.upper-controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10%;
}

.joystick-container {
  position: relative;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #333, #000);
  border: 3px solid #555;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
  margin-left: 10%;
  /* Без абсолютного позиционирования, если вы хотите, чтобы он располагался в потоке родителя */
}

.joystick {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: radial-gradient(circle at 35% 35%, #fff, #aaa);
  border: 2px solid #ccc;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  margin: 0;
}


/* Контейнер для кнопок A/B (оставляем ваши размеры и отступ) */
.ab-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-right: 15%;
  margin-top: -5%;
}

/* Общий стиль для обёртки кнопки с меткой */
.ab-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Позиционирование для кнопки A (расположена слева и ниже) */
.a-item {
  left: 5px;
  bottom: 5px;
}

/* Позиционирование для кнопки B (расположена правее и выше) */
.b-item {
  right: 5px;
  top: 5px;
}

/* Стиль метки (label) — отображается над кнопкой */
.ab-label {
  font-size: 16px;
  margin-bottom: 4px;
  color: #5E5E5E;
  user-select: none;
}

/* Стиль для кнопок A/B (без текста) */
.ab-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #5f5f9e, #505070 60%, #333 90%);
  box-shadow: 0 0 0 3px #666 inset;
  cursor: pointer;
  user-select: none;
}

/* Нижняя панель: кнопки Start и Select по центру */
.lower-controls {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex;
  justify-content: center;
}

.bottom-button {
  width: 80px;
  height: 40px;
  background: none;
  color: #7E7E7E;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  user-select: none;
}

.bottom-button:active {
  background: #888;
}
