/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 95%;
    max-width: 900px;
    margin: auto;
    padding: 25px;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-color);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-image-container {
    width: 100%;
    text-align: center;
    padding: 10px;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.modal.show .modal-image-container img {
    opacity: 1;
    transform: translateY(0);
}
