.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    padding: 32px 16px;
    background: rgba(21, 14, 18, 0.78);
    backdrop-filter: blur(14px);
}

.modal-content {
    width: min(720px, 100%);
    max-height: calc(100vh - 64px);
    margin: auto;
    border-radius: 28px;
    object-fit: contain;
    animation: zoom 0.28s ease;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.close {
    position: absolute;
    top: 18px;
    right: 24px;
    color: #fff;
    font-size: 2.2rem;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.close:hover {
    opacity: 0.8;
    transform: scale(1.04);
}

@keyframes zoom {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
    .modal {
        padding: 56px 12px 12px;
    }

    .modal-content {
        border-radius: 22px;
    }

    .close {
        right: 16px;
        top: 12px;
        font-size: 1.9rem;
    }
}
