.routes-section {
    padding: 40px 0;
    position: relative;
}

.page-bg {
    position: fixed; /* Фиксируем на весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Растягиваем изображение */
    z-index: -2; /* Самый нижний слой */
}

.page-wrapper {
    position: relative;
    min-height: 100vh; /* Растягиваем на весь экран */
    overflow: hidden; /* Скрываем лишнее */
}

.overlay {
    position: fixed; /* Затемнение на весь экран */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Затемнение, можно настроить прозрачность */
    z-index: -1; /* Слой между фоном и контентом */
}


.route-create-form,
.routes-table-container,
.modal,
.header-container{
    position: relative;
    z-index: 2; /* Контент поверх фона */
}


.route-form-title {
    font-family: 'DegularDemo', sans-serif;
    font-size: 1.5em;
    color: #7FEE64;
    margin-bottom: 15px;
}

.routes-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Растягивает изображение, сохраняя пропорции */
    z-index: 0; /* Изображение на заднем плане */
    pointer-events: none; /* Чтобы клики проходили сквозь изображение */
}


.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-control {
    background: #333;
    border: 1px solid #7FEE64;
    color: #DDFFDC;
    padding: 1vh 12px;
    border-radius: 5px;
    font-family: 'SpaceMono', monospace;
    flex-grow: 1;
}

.form-control::placeholder {
    color: #999;
}

.routes-table-container {
    background: #222;
    padding: 20px 40px;
    border-radius: 20px;
    transition: height 0.3s ease; /* Убираем all, используем только height */
    overflow: hidden; /* Скрываем лишнее при уменьшении */
}

.routes-table-title {
    font-family: 'DegularDemo', sans-serif;
    font-size: 1.8em;
    color: #7FEE64;
    margin-bottom: 20px;
}

.routes-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SpaceMono', monospace;
    color: #DDFFDC;
    transition: all 0.3s ease;
}

.routes-table th,
.routes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.routes-table tbody {
    transition: height 0.3s ease;
}

.routes-table tr.route-row {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.routes-table tr.route-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.routes-table th {
    background: #333;
    color: #7FEE64;
    font-weight: bold;
}

.routes-table td {
    vertical-align: middle;
}

.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    color: #7FEE64;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: #65D64D;
}

.view-btn {
    text-decoration: none;
}

.edit-btn {
    color: #DDFFDC;
}

.delete-btn {
    color: #FF6B6B;
}

.text-center {
    text-align: center;
}

/* Стили для кастомного модального окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: none; /* Изначально скрыто */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.modal.active {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.modal-content {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #DDFFDC;
    font-family: 'SpaceMono', monospace;
    max-width: 400px;
    width: 100%;
    border: 2px solid #FF6B6B;
    box-shadow: 0 0 10px #FF6B6B;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content h3 {
    font-family: 'DegularDemo', sans-serif;
    color: #7FEE64;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.button-danger {
    background: #FF6B6B;
    color: #0B0B0B;
}

.button-danger:hover {
    background: #E55A5A;
}


        /* Общие стили для страницы */
        body {
        }


        .routes-section {
            position: relative;
            z-index: 1;
            padding: 40px 0;
        }

        /* Стили для формы */
.route-create-form {
    margin-bottom: 40px;
    padding: 20px;
    background: #222;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

        .route-form-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #7FEE64;
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 20px;
        }

        .form-inline {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .form-control {
            background: #333;
            border: 1px solid #7FEE64;
            color: #DDFFDC;
            padding: 10px 12px;
            border-radius: 5px;
            font-family: 'SpaceMono', monospace;
            box-sizing: border-box;
            width: auto;
        }

        .form-control::placeholder {
            color: #999;
        }

        /* Кастомизация календаря */
        input[type="datetime-local"] {
            background: #333;
            border: 1px solid #7FEE64;
            color: #DDFFDC;
            position: relative;
        }

        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            filter: invert(80%) sepia(50%) saturate(200%) hue-rotate(60deg); /* Зелёная иконка */
            cursor: pointer;
        }

        input[type="datetime-local"]::-webkit-datetime-edit {
            color: #DDFFDC;
            font-family: 'SpaceMono', monospace;
        }

        /* Стили для таблицы */
        .routes-table-container {
            padding: 20px;
            background: #222;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
            transition: height 0.3s ease;
        }

        .routes-table-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #7FEE64;
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 20px;
        }

        .routes-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-family: 'Plus Jakarta Sans', sans-serif;
            color: #fff;
        }

        .routes-table th,
        .routes-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #444;
        }

        .routes-table th {
            background: #333;
            color: #7FEE64;
            font-weight: 700;
            font-size: 1rem;
            text-transform: uppercase;
        }

        .routes-table td {
            background: #222;
            color: #fff;
            font-size: 0.95rem;
        }

        .routes-table tr:hover td {
            background: #333;
            transition: background 0.2s ease;
        }

        .routes-table .actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 5px;
        }

        .action-icon {
            width: 2rem;
            height: 2rem;
            transition: transform 0.2s ease;
        }

        .action-btn:hover .action-icon {
            transform: scale(1.1);
        }

        /* Модальные окна */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            align-items: center;
            justify-content: center;
            z-index: 1000; /* Выше всего контента */
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .modal.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: #222;
            padding: 20px;
            border-radius: 10px;
            max-width: 400px;
            width: 90%;
            color: #fff;
            font-family: 'Plus Jakarta Sans', sans-serif;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        }

        .modal-content h3 {
            color: #7FEE64;
            font-size: 1.5rem;
            margin-bottom: 15px;
        }

        .modal-content p {
            font-size: 1rem;
            margin-bottom: 20px;
        }

        .modal-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .button {
            padding: 10px 20px;
            border-radius: 50px;
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .button-primary {
            background: #7FEE64;
            color: #0B0B0B;
            border: none;
        }

        .button-primary:hover {
            background: #6FD056;
        }

        .button-secondary {
            color: #7FEE64;
            border: 2px solid #7FEE64;
            background: none;
        }

        .button-secondary:hover {
            background: #7FEE64;
            color: #0B0B0B;
        }

        .button-danger {
            background: #FF4D4D;
            color: #fff;
            border: none;
        }

        .button-danger:hover {
            background: #E64444;
        }

        /* Анимация строк таблицы */
        .route-row {
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .route-row.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Адаптивность */
        @media (max-width: 768px) {

            .route-create-form {
                display: list-item;
            }
            .form-inline {
                flex-direction: column;
            }

            .form-control {
                width: 100%;
            }

            .button-primary {
                width: 100%;
                text-align: center;
            }

            .routes-table-container {
                overflow-x: auto;
            }

        }

        @media (max-width: 400px) {
            .page-bg {
            }
        }