/* Модальное окно для ошибок */
#error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none; /* Изначально скрыто */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#error-modal.active {
    opacity: 1;
}
.modal-content {
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    padding: 20px;
    border-radius: 10px;
    width: 400px; /* Фиксированная ширина */
    min-height: 100px; /* Минимальная высота для фиксированного вида, но можно адаптировать */
    text-align: center;
    border-top: 1px solid #272727;
    box-shadow: 0 4px 15px rgb(0 0 0);
    animation: simpleFade 0.5s ease forwards;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем содержимое по вертикали */
    overflow-y: auto; /* Если текст очень длинный, добавляем скролл */
}
#error-message {
    color: #FFEB3B;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    word-wrap: break-word; /* Перенос слов для длинного текста */
}
.close {
    float: right;
    cursor: pointer;
    font-size: 20px;
    color: #FFFFFF;
}

/* Простая анимация появления */
@keyframes simpleFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .modal-content {
        width: 90%; /* Адаптируем ширину для мобильных */
        min-height: 120px;
        max-height: 200px;
        padding: 15px;
    }
    #error-message {
        font-size: 14px;
    }
}