* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-container {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 1044px;
}

#imageDisplay {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    opacity: 1; /* Начальная прозрачность */
    transition: opacity 0.5s ease-in-out; /* Анимация длится 0.5 секунды */
}

.fade {
    opacity: 0 !important; /* Картинка становится невидимой */
}

button,
#prevBtn,
#nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    cursor: pointer;
    user-select: none;
    transition: filter 0.3s ease-in-out;
}

#prevBtn {
    left: 10px;
}

#nextBtn {
    right: 10px;
}

#prevBtn:hover,
#nextBtn:hover {
    filter: brightness(0.8); /* Темнеют при наведении */
}