*   {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: whitesmoke;
}

html    {
    background-color: #282d32;
}

.header {
    position: relative;
    background-color: #000064;
    padding: 10px 15px;
    width: 98%;
    top: 1%;
    left: 1%;
    margin: 0 0 10px 0;
}

.footer {
    position: absolute;
    width: 98%;
    height: auto;
    padding: 10px 15px;
    background-color: #000064;
    border: red solid 5px;
    bottom: 0;
    left: 1%;
    text-align: end;
}
















/*
Stuff stolen from Luna Magdalena and her girlkissing.tips website below this line:
*/

.gallery {
    position: relative;
    width: 98%;
    left: 1%;
    padding: 25px 0 0 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-flow: row wrap;
  background-color: yellow;
}

figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: clip;
  width: 100%;
  margin: auto;
  padding: 0 0 8px 0;
}

figcaption {
  position: relative;
  color: var(--c-image-caption);
  font-family: "base";
  padding: 6px 0 0;
  max-width: 94%;
  margin: auto;
  display: block;
}

img {
  display: block;
  max-width: 98%;
  border: 2px solid var(--c-image-border);
  border-radius: 3px;
  margin: auto;
}

.gallery img, .gallery figure {
  width: min(98%, 360px);
  margin: 0 auto 2% auto;
  padding: 0;
}

.gallery figcaption {
  padding-bottom: 10px;
  padding-top: 0;
}

button {
  border: 2px solid var(--c-button-border);
  background-color: var(--c-button-base);
  color: var(--c-button-text);
  padding: 4px;
  font-family: "pixel";
  font-size: 16px;
  font-style: normal;
  font-weight: normal;
}

button:is(.inactive) {
  background-color: var(--c-button-i-base);
  border-color: var(--c-button-i-border);
  color: var(--c-button-i-border);
}

button:not(.inactive):hover {
  border-color: var(--c-button-h-border);
  background-color: var(--c-button-h-base);
  cursor: pointer;
}

.img-viewer {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  background-color: rgba(0, 0, 0, 0.8);
}

.img-viewer figure {
  width: 95%;
  height: 90%;
  overflow: visible;
  display: flex;
  align-content: center;
  margin: auto;
}

.img-viewer img {
  object-fit: contain;
  max-height: calc(100% - 8ex - 12px);
  border-radius: 0;
  z-index: 5;
  user-select: none;
}

.img-viewer figcaption {
  line-height: 2.5ex;
  max-height: 8ex;
  max-width: 800px;
  margin-top: 12px;
  overflow: auto;
  text-align: justify;
  padding: 0 8px;
}

.img-viewer-close, .img-viewer > .img-viewer-close:hover {
  position: absolute;
  right: 0;
  color: var(--c-button-close);
  margin: 10px;
  border-color: var(--c-button-close);
  width: 30px;
  height: 30px;
  padding: 2px;
}

img:is([onclick]):hover {
  cursor: pointer;
  border-color: var(--c-button-h-border);
}

.img-viewer > div {
  margin: auto;
  display: flex;
  justify-content: space-evenly;
  max-width: 260px;
}

.img-viewer > div, .img-viewer > figure > figcaption, .img-viewer-close {
  transition: opacity 0.5s, visibility 0.5s;
}








/*  Testing some stuff, ignore this layer of shit  */

.img-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.viewer-figure {
    max-width: 90%;
    max-height: 80%;
    overflow: hidden;
}

.viewer-figure img {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.05s linear;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.viewer-controls {
    margin-top: 20px;
}

.viewer-controls button {
    margin: 0 10px;
    padding: 8px 16px;
    font-size: 16px;
}







