* {
  padding: 0;
  margin: 0;
}

#thumbs div {
  margin: 5px;
  width: 45%;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

#thumbs div::after {
  content: attr(data-title);
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  bottom: 5px;
  z-index: 1;
  background: rgba(28, 30, 37, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 1.5em;
  padding: 5px 10px;
  transition: 0.5s;
  line-height: 20px;
}

#thumbs div:hover::after {
  content: attr(data-title);
  top: 10%;
  line-height: 30px;
  font-size: 1.8em;
}

#screen {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: fixed;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
  cursor: pointer;
}

#imgs {
  width: 90vw;
  left: calc(5vw - 10px);
  height: 90vh;
  top: calc(5vh - 10px);
  background: white;
  border-radius: 10px;
  position: absolute;
  padding: 10px;
  cursor: auto;
}

#imgs div {
  overflow: auto;
  height: 100%;
  width: 100%;
  text-align: center;
}

#imgs div img {
  width: 45%;
  margin: 5px;
  vertical-align: top;
  line-height: 0;
}
#close {
    position:absolute; 
    opacity: 0.3; 
    left:80%; 
    margin-left:30px; 
    margin-top:40px; 
    cursor:pointer;
    
}
@media only screen and (min-width: 300px) and (max-width: 480px) {
body {font-size: 0.6em;}
#thumbs div::after {line-height: 11px; top: 15%;}
#thumbs div:hover::after {line-height: 12px;}
}