/* Основные стили */
body {
    background: linear-gradient(to right, #0f172a, #0e2034, #0e1d30);
    margin: 0;
    font-family: 'Helvetica Neue', sans-serif;
    color: #0f0a0a;
   
    display: flex;
    flex-direction: column;
    align-items: center;
  

}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: 75px;
    padding: 0 20px;
    background: linear-gradient(to right, #0f172a, #0e2034, #0e1d30);
    box-sizing: border-box;
    border-bottom: 0px solid rgb(229, 231, 235);
    z-index: 9999;
    color-scheme: dark;
    cursor: pointer;
  }
  

.nav__list {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav__item {
    display: block;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 15px;
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    text-align: left;
    color: rgb(255, 255, 255);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 5px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}
#app {
    display: flex;
    width: 97%;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

#controls {
    width: 350px;
    padding: 10px;
    border-right: 1px solid #ccc;
    background-color: #f9f9f9;
}

#chartArea {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

h3 {
    margin-top: 0;
}

/* Стили инпутов и селектов */
input, select {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #f9fafb;
    font-size: 1em;
    color: #374151;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Обязательно добавляем это свойство */
}

input:focus, select:focus {
    border-color: #3b82f6; /* Синяя рамка при фокусе */
    background-color: #ffffff;
}

button {
    padding: 10px;
    font-size: 1.1em;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

#speedControls, #speedControl, #valueControls {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Отступ между кнопками */
}

#increaseSpeed,#drawVerticalLine,#setMarkerTimeButton, #startButton, #pauseButton, #decreaseSpeed, #increaseValue, #decreaseValue, #stopButton, #deleteLine {
    flex: 1;
}

#realtimeChart {
    width: 1600px;
    height: 856px;
    background-image: url('БуранV0.png');
    background-size: cover;
    background-position: center;
    border: 1px solid #ccc;
    border-radius: 8px;
}




.maxValueBox {
    padding: 5px;
    margin: 5px;
    border: 1px solid #ccc;
    width: 150px;
    text-align: center;
}


/* Стили для переключателя */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Скрываем стандартный checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Основной стиль переключателя */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

/* Круглая кнопка для переключателя */
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Стили для активного состояния переключателя */
input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* Общий стиль для обёртки */
.chart-wrapper {
    width: 100%; /* Контейнер занимает всю ширину */
    padding: 10px; /* Отступы внутри обёртки */

}

/* Канвас в контейнере */
#realtimeChart {
    min-width: 600px; /* Минимальная ширина для нормального отображения */
    max-width: 1600px; /* Максимальная ширина */
    width: 100%; /* Растягивается на всю ширину родителя */
    height: auto; /* Автоматическая высота */
}

/* Условие для маленьких экранов */
@media (max-width: 768px) {
    .chart-wrapper {
        width: 100%; /* Сохраняем ширину на мобильных устройствах */
    }
    #realtimeChart {
        min-width: 500px; /* Минимальная ширина для канваса */
    }
}


/* Контейнер для загрузки */
.upload-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Для контроля скрытого элемента */
}

/* Скрываем стандартное поле ввода */
#uploadImage {
    display: none; /* Полностью скрывает элемент */
}

/* Стили для кнопки загрузки */
.upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-label:hover {
    background-color: #0056b3;
}

/* Иконка загрузки */
.upload-label i {
    margin-right: 8px;
    font-size: 18px;
}
