


:root {
  --bgcolor: #161412;
  --fontcolor: #ddd;
  --bordercolor: #333;
  --borderwidth: 1px;
  --btnsize: 50px;
  --imgspace: 4px;
  --imgborder: calc(var(--imgspace) / 2);
  --boxpadding: 75px;                         /* space between top, folder-list, thumb-list and footer */
  --footerrow: 15px;                          /* footer padding and line-height */
}



body {
  margin: 0;
  padding: 0;
  background: var(--bgcolor);
}
body, a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11pt;
  color: var(--fontcolor);
}
a {
  text-decoration: none;
}



.navi, .content, .footer {
  width: 1575px;
  margin: 0 auto;
}
.navi {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  z-index: 999;
  background: var(--bgcolor);
  padding:30px var(--imgborder);
  transition: 0.5s;
  left: 50%;
  transform: translateX(-50%);
}
.content {
  /* min-height = total height - padding above footer - total footer height including border-top */
  min-height: calc(100vh - (var(--boxpadding) + (var(--footerrow) * 3) + var(--borderwidth)));
  padding-bottom: var(--boxpadding);
}
.folder-list, .thumb-list {
  padding-top: var(--boxpadding);
}
.footer {
  padding: var(--footerrow) var(--imgborder);
  line-height: var(--footerrow);
  border-top: var(--borderwidth) solid var(--bordercolor);
}
.footer, .footer a {
  font-size: 9pt;
}



.login {
  padding-top: 200px;
}
.login form {
  margin:0 auto;
  width:300px;
  padding:20px;
  border: var(--borderwidth) solid var(--bordercolor);
  background: rgba(255, 255, 255, 0.04);
}
.login input {
  padding:10px 5px;
  margin-top: 20px;
  border: var(--borderwidth) solid var(--bordercolor);
  background: rgba(255, 255, 255, 0.05);
  font-size:12pt;
  color: var(--fontcolor);
}
.login input[type=password] {
  width: 288px;
}
.login input[type=submit] {
  width: 300px;
  transition: 0.5s;
}
.login input[type=submit]:hover {
  background: rgba(255, 255, 255, 0.2);
}
.login a {
  display: block;
  margin-top: 20px;
}
.login a:hover {
  text-decoration: underline;
}



.scaled, .fullsize {
  display: block;
  margin:auto;
  background: var(--bgcolor);
}
.scaled {
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  max-width:100%;
  max-height:100%;
  cursor: zoom-in;
}
.fullsize {
  cursor: zoom-out;
}



.top {
  float: right;
  margin-top: 20px;
  width: var(--btnsize);
  height: var(--btnsize);
  opacity: 0;
  transition: 0.8s;
  cursor: pointer;
}
.next, .prev, .close, .info {
  position: absolute;
  width: var(--btnsize);
  height: var(--btnsize);
  opacity: 0.1;
  transition: 0.8s;
}
.next:hover, .prev:hover, .close:hover, .info:hover, .top:hover {
  opacity: 0.8;
}
.next {
  top: 50%;
  margin-top: -25px;
  right:20px;
}
.prev {
  top: 50%;
  margin-top: -25px;
  left: 20px;
}
.close {
  top: 20px;
  right: 20px;
}
.info {
  top: 80px;
  right: 20px;
}



#tooltip {
  position: absolute;
  top: 140px;
  right: 20px;
  padding: 10px;
  border: var(--borderwidth) solid var(--bordercolor);
  border-radius: 3px;
  max-width: 300px;
  background: var(--bgcolor);
  opacity: 0;
  transition: opacity 0.5s;
}
#tooltip:before {
  content: "";
  position: absolute;
  display: block;
  border-style: solid;
  border-color: var(--bordercolor) transparent;
  border-width: 0 9px 11px 9px;
  width: 0;
  height: 0;
  top: -11px;
  right: 15px;
  bottom: auto;
}
#tooltip:after {
  content: "";
  position: absolute;
  display: block;
  border-style: solid;
  border-color: var(--bgcolor) transparent;
  border-width: 0 9px 11px 9px;
  width: 0;
  height: 0;
  top: -9px;
  right: 15px;
  bottom: auto;
}
#tooltip hr {
  border: none;
  border-top: var(--borderwidth) solid var(--fontcolor);
  margin: 10px 0;
}
#tooltip span {
  padding-left: 16px;
}
#tooltip span:first-of-type {
  padding-left: 0;
}



.folder, .landscape, .portrait {
  overflow: hidden;
  display: inline-block;
  padding: var(--imgborder);
}
.folder .thumb, .landscape .thumb, .portrait .thumb {
  object-fit: cover;
}
.folder, .folder .thumb, .landscape, .landscape .thumb, .portrait, .portrait .thumb {
  height: 248px;
}
.folder, .folder .thumb {
  width: calc(393.75px - var(--imgspace));
}
.landscape, .landscape .thumb {
  width: calc(350px - var(--imgspace));
}
.portrait, .portrait .thumb, .crop9, .crop9 .thumb {
  width: calc(175px - var(--imgspace));
}
.title {
  display: block;
  box-sizing: border-box;
  opacity: 0.99;
  background-color: rgba(0, 0, 0, 0.45);
  padding: 10px;
  height: 40px;
  margin-top:-40px;
  line-height: 20px;
  font-weight: bold;
  z-index:auto;
}
.lock {
  width: 11px;
  height: 13px;
  margin-bottom: -1px;
  margin-right: 5px;
}



@media only screen and (max-width: 1800px) {
  .navi, .content, .footer {
    width:1400px;
  }
  .folder, .folder .thumb, .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop8, .crop8 .thumb {
    width: calc(175px - var(--imgspace));
  }
}


@media only screen and (max-width: 1600px) {
  .navi, .content, .footer {
    width:1225px;
  }
  .folder, .folder .thumb {
    width: calc(408.33px - var(--imgspace));
  }
  .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop7, .crop7 .thumb {
    width: calc(175px - var(--imgspace));
  }
}


@media only screen and (max-width: 1400px) {
  .navi, .content, .footer {
    width:1050px;
  }
  .folder, .folder .thumb, .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop6, .crop6 .thumb {
    width: calc(175px - var(--imgspace));
  }
}


@media only screen and (max-width: 1200px) {
  .navi, .content, .footer {
    width:875px;
  }
  .folder, .folder .thumb {
    width: calc(437.5px - var(--imgspace));
  }
  .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop5, .crop5 .thumb {
    width: calc(175px - var(--imgspace));
  }
}


@media only screen and (max-width: 1000px) {
  .navi, .content, .footer {
    width:700px;
  }
  .folder, .folder .thumb, .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop4, .crop4 .thumb {
    width: calc(175px - var(--imgspace));
  }
  .next, .prev, .close, .info, .top {
    opacity: 0.8;
  }
}


@media only screen and (max-width: 800px) {
  .navi, .content, .footer {
    width:525px;
  }
  .folder, .folder .thumb {
    width: calc(525px - var(--imgspace));
  }
  .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop3, .crop3 .thumb {
    width: calc(175px - var(--imgspace));
  }
  .next, .prev, .close, .info, .top {
    opacity: 0.8;
  }
}


@media only screen and (max-width: 600px) {
  .navi, .content, .footer {
    width:350px;
  }
  .folder, .folder .thumb, .landscape, .landscape .thumb {
    width: calc(350px - var(--imgspace));
  }
  .portrait, .portrait .thumb, .crop2, .crop2 .thumb {
    width: calc(175px - var(--imgspace));
  }
  .next, .prev, .close, .info, .top {
    opacity: 0.8;
  }
}


@media only screen and (max-height: 402px), (max-width: 800px) {
  #tooltip {
    top: 85px;
    right: 80px;
  }
  #tooltip:before {
    border-color: transparent var(--bordercolor);
    border-width: 9px 0 9px 11px;
    top: 11px;
    right: -11px;
  }
  #tooltip:after {
    border-color: transparent var(--bgcolor);
    border-width: 9px 0 9px 11px;
    top: 11px;
    right: -9px;
  }
}