/* Общие стили для тела страницы */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #F4F4F4;
    color: #333333;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Карта */
#map {
    height: 600px;
    width: 100%;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Секции трубопровода */
.pipeline-section {
    width: 18%;
    height: 40px;
    background-color: #28a745; /* Зеленый по умолчанию */
    border-radius: 20px;
    margin: 10px 1%;
    display: inline-block;
    transition: background-color 0.5s, transform 0.5s;
}

.pipeline-section.high-pressure {
    background-color: #dc3545; /* Красный при высоком давлении */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
    animation: blink 1s infinite alternate;
}

.pipeline-section.leak {
    position: relative;
}

.pipeline-section.leak:after {
    content: "";
    position: absolute;
    left: 50%;
    top: -10px;
    width: 10px;
    height: 50px;
    background: blue;
    transform: rotate(-30deg);
    animation: leakAnimation 1s infinite alternate;
}

/* Анимации */
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes leakAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Индикаторы статуса */
.status-indicator {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 10px;
}

.status-normal {
    color: #fff;
    background-color: #28a745;
}

.status-accident {
    color: #fff;
    background-color: #dc3545;
}

/* Карточки */
.card {
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Контейнер прогресса */
.progress-container {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.progress-bar {
    width: 0;
    height: 100%;
    background-color: #007bff;
    transition: width 1s ease-in-out;
}

/* Поле ввода эпох */
#epochsInput {
    width: 150px;
}

/* Стили для прогресса */
.progress {
    height: 25px;
}

#progressBar {
    width: 0%;
}

/* Таблицы */
.table {
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    color: #333333;
}

.table th {
    background-color: #F8F9FA;
    color: #666666;
}

/* Поля ввода */
input.form-control {
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    color: #333333;
    padding: 10px;
}

input.form-control:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Кнопки */
.btn-primary {
    background-color: #007BFF;
    border-color: #007BFF;
    color: #FFFFFF;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #F4F4F4;
    border-color: #E0E0E0;
    color: #333333;
}

.btn-secondary:hover {
    background-color: #E0E0E0;
    color: #007BFF;
}

/* Навигационная панель */
.navbar {
    background-color: #FFFFFF; /* Белый фон */
    border-bottom: 1px solid #E0E0E0; /* Лёгкая граница */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Лёгкая тень */
}

.nav-link {
    color: #007BFF; /* Синий акцент */
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #0056b3; /* Более тёмный синий */
}

.navbar-brand img {
    height: 40px;
}

/* Блоки квадратов */
.block-square {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.block-square:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Фиксированная высота для контейнеров графиков */
.chart-container {
    position: relative;
    height: 100%; /* Установите желаемую высоту */
    width: 100%;
}

/* Обеспечиваем, что canvas не превышает размеры контейнера */
.chart-container canvas {
    height: 100% !important;
    width: 100% !important;
}

.bg-light-beige {
    background-color: #f5f5dc; /* Бледно-бежевый цвет */
}

.block-square {
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-height: 200px;
}

.block-square:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}