/* Общие стили */
*, body {
    margin: 0;
    padding: 0;
    /*box-sizing: border-box; */
    font-family: 'JetBrains Mono', "Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial;
}
:root {
    --cell-size: 1.5vw;
}

#newGameButton {
  max-height: 30px;
  margin-right: 12px;
}

.logo {
  border-radius: 2px;
  cursor: pointer;
  padding: auto;
}

#newGameButton:hover path {
  fill: #aa3908; /* Измените цвет на желаемый */
}


@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/JetBrainsMono-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/JetBrainsMono-Medium.ttf') format('truetype');
}


button, a {
    font-family: 'JetBrains Mono', "Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial;
}

body, html {
    overflow: hidden;
  position: fixed;
  width: 100%;
  background-color: white;
}


/* Стили игрового поля */
#board {
    display: grid;
    grid-template-columns: repeat(150, var(--cell-size));
    grid-template-rows: repeat(150, var(--cell-size));
    grid-gap: 1px;
  background: #eae2e2;
  border: 1px solid #eae2e2;
}

#horizontal-coordinates, #vertical-coordinates {
    display: grid;
    grid-gap: 1px;
}


.cell {
    height: var(--cell-size);
   /* border: 1px solid #cfcfcf; */
  background-color: #ffffff;
  

}

.cell:hover {
    background-color: #f0f0f0;
}

.cell.taken {
    background-color: #333;
    border: 1px solid #404040;
}


#taskPanel.hidden {
    display: none;
}


/* Стили координат */
.highlighted-coordinate {
    font-weight: 800;
    color: black;
}



#vertical-coordinates > div, #horizontal-coordinates > div {
    height: var(--cell-size);
    width: var(--cell-size);
    display: flex;
  text-align: center; 
  font-weight: 400;
}

.cell, #vertical-coordinates > div {
    box-sizing: border-box;
}

#vertical-coordinates {
  grid-template-rows: repeat(150, var(--cell-size));
    position: sticky;
    left: 0;
    flex-direction: column;
    height: calc(150 * var(--cell-size));
    align-items: center;

}


#horizontal-coordinates {
  grid-template-columns: repeat(150, var(--cell-size));
    position: sticky;
    top: 0;
    width: auto;
    height: var(--cell-size);

    align-items: center;
    justify-content: center;
    padding-left: var(--cell-size);

}

/* Стили кнопок */





 /* #taskCoordinates div {
    margin-left: 4px; 
    margin-right: 4px;
display: inline-block;  /* элементы будут горизонтальными 


}*/



.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}













.mainbuttons {
    display: flex;
    align-items: center; /* This will vertically align the items to the center, making them appear at the same height */
    justify-content: flex-end; /* This aligns your items to the end of the main axis */
}




.custom-button:hover, .custom-button2:hover {
    transform: translateY(-1px);
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
}

.custom-button:active, .custom-button2:active {
    transform: translateY(1px);
}


/* Дополнительные стили контейнеров */
.outer-container {
    overflow-y: auto;
    font-size: 12px;
      height: calc(100vh - 60px);


  }

}

#horizontal-coordinates-container {
    overflow-x: auto;
    white-space: nowrap;
}

#horizontal-coordinates div {
    min-width: calc(2 * (100vw / 150));
    overflow: hidden;
}


.board-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  width: calc(150 * var(--cell-size));
}

#board-container {
    display: flex;
    flex-direction: column;  
    align-items: flex-start;
    min-height: calc(150 * var(--cell-size) + var(--cell-size) + 1vw);
  padding-top: 12px;
  color: #cdc9c6;
}

/* Медиа-запрос для мобильных устройств */
@media screen and (max-width: 768px) {

  :root {
      --cell-size: 8vw;
  }

  .outer-container {
      height: calc(100vh - 60px);
  }
  
  #taskCoordinates div {
  margin-left: 2px;
  margin-right: 2px;

  }

    #vertical-coordinates, #horizontal-coordinates {
        font-size:12px;
    }


      .mainbuttons {
          position: fixed;    /* Фиксация на экране */
          bottom: 10px;          /* В нижней части экрана */
          left: 0;            /* Выровнять по левому краю экрана */
          width: 100%;        /* Ширина по всему экрану */
          z-index: 1000;      /* Чтобы быть уверенным, что кнопки всегда будут сверху */
          /* Добавьте другие стили для оформления по вашему усмотрению */
      }

    .custom-button {
        font-size: 14px;
    }





}



#taskPanel {
    top: 0;
    left: 100%;
    background-color: white;  /* чтобы фон панели был непрозрачным */
    margin-left: 10px;  /* отступ от кнопки */
}

.taskandother {
    display: flex;
  width: 100%; /* или установите нужную вам высоту */
    align-items: center;
  flex-direction: row;
    position: relative;
    top:8px;
  left: 30px;
  z-index:105;
  justify-content: space-between;
}



.custom-button2 svg {
    height: 100%; /* Высота SVG будет растягиваться на всю высоту кнопки */
    width: auto; /* Ширина SVG будет масштабироваться пропорционально высоте */
}


.custom-button {
    background-color: #efeeef;
    color: black;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    margin: 0 10px;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#newBoardButton{
  margin-left:10px;
}
.custom-button2 {
padding: 8px 12px;
align-items: flex-start;
gap: 10px;
  background-color: #dad8da61;
  color: #000000a3;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 18px;
 display: flex;
    align-items: center;
    justify-content: center;
  margin-right: 8px;
  
  /*height:40px */
}

.nextprev, .mainbuttons {
  display: flex; /* Establishes a flex container */
  align-items: stretch; /* Stretch the children to fit the container's height */
  /* Other styles */
}


.highlighted {
  display: inline-flex;
  height: 28px;
  padding: 4px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 2px;
  background: #d4e344;
}

.bhighlighted {
  display: inline-flex;
  padding: 4px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 2px;
  border: 1px solid grey;
  margin-left: 10px;
}


.blinking {
    animation: blinking 0.5s infinite;
}


#menuContainer {
    display: flex;
    align-items: center; /* Центрирует элементы по вертикали */
    justify-content: space-between; /* Распределяет свободное пространство между элементами */
    position: sticky;
    top: 0;
    z-index: 1000;

    padding: 10px; /* Добавьте отступ для лучшего внешнего вида */
}

/* Отделяйте элементы друг от друга с помощью margin */
.nextprev, #taskCoordinates, .mainbuttons {
    margin-right: 10px; /* Отступ справа */
}

.nextprev, .mainbuttons {
  flex-shrink: 0;
}


/* Для контейнера */
#menuContainer {
    display: flex;
    align-items: center;
    /* Оставляем остальные стили без изменений */
}


.zoom-buttons {
    position: fixed;   /* фиксируем позицию элемента */
    bottom: 60px;      /* отступ снизу экрана */
    left: 4.4vw;        /* отступ слева */
    z-index: 1000;     /* чтобы контейнер был поверх других элементов */
    display: grid;     /* выстроим кнопки в ряд */
    gap: 10px;         /* добавим небольшое расстояние между кнопками */
}

.zoom-buttons button:disabled {
    color: #c2c2c2;
    cursor: auto; 
}


#board.zoomed-out {
   grid-gap: 0px;
  background: #ffffff;
  border: none;

}




#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    text-align: center;
}


.navigation-container {
    display: flex;
    align-items: center;  // Выравнивание элементов по вертикали
}




@keyframes flashAnimation {
  0%, 100% { background-color: #333333; }
  50% { background-color: #db3700; }

}

.red-flash {
  animation: flashAnimation 2s;

}


.centralcontent {
    display: flex; /* Активируем Flexbox */
    align-items: center; /* Выравниваем элементы по вертикали */
    justify-content: flex-start; /* Выравниваем элементы по горизонтали от начала */
    flex-wrap: wrap; /* Разрешаем элементам переноситься на новую строку */

}

.centralcontent span{
  color:grey;
}

  #taskCoordinates {
      display: flex; /* Если внутри #taskCoordinates также должны быть элементы в строку */
      align-items: center; /* Выравнивание элементов внутри #taskCoordinates */
  }

:root {

    transition: --cell-size 0.5s ease; /* переход для размера клетки */
}



#board {
    transition: grid-gap 0.3s ease;
}

.sign{
  padding: 11px;
  font-size: 10px;
}

#coordinateDisplay {
    position: absolute;
    display: none;
    z-index: 1200; /* Убедитесь, что элемент находится над другими элементами */
    background-color: #ffffff7d; /* Цвет фона */
    border: 0px solid #6b6a66; /* Граница вокруг элемента */
    padding: 5px; /* Отступы внутри элемента */
    font-size: 14px; /* Размер шрифта */
    pointer-events: none; /* Убедитесь, что элемент не мешает взаимодействию с клетками */
  border-radius:3px;
  color: #404040;

}

.highlight-next-level {
    background-color: #b1d26a; /* Зеленый цвет фона для подсветки */
  color:green;
    transition: background-color 0.5s ease; /* Плавное изменение фона */
}

#nextLevel {
    transition: background-color 0.5s ease; /* Плавный переход для обычного состояния кнопки */
}


#targetIndicator {
    position: fixed; /* Используем fixed для фиксации прицела */
    left: 50%; /* Центрируем по горизонтали */
    top: 50%; /* Центрируем по вертикали */
    transform: translateY(50%); /* Смещаем прицел, чтобы его центр был в центре экрана */
    /* Остальные стили остаются прежними */
}

.highlighted-cell {
  /*background-color: #c7c7c7;  Цвет подсветки */
    transition: background-color 0.1s; /* Плавное изменение цвета */
  border:1px dashed gray;
}


.outer-container {
    transform-origin: 0% 0%;
}

/* Стили для тултипа */
.tooltip-text {
    display: none;
    position: fixed;
    right: 10px; /* Отступ справа */
    top: 10px; /* Отступ сверху */
    background-color: black;
    color: white;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    width: 200px; /* Ширина тултипа */
}

/* Стили для кнопки закрытия */
.close-btn {
    background-color: #f44336;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

