:root {
  --download-background: #1d2233;
  --navbar-bg: color-mix(in srgb, var(--download-background) 80%, transparent);
  --download-link-color: #daa520;
}

@keyframes anim_img {
  0%, 100% {
    transform: rotateY(0deg) rotateX(0deg);
  }
  25% {
    transform: rotateY(0deg) rotateX(180deg);
  }
  50% {
    transform: rotateY(360deg) rotateX(0deg);
  }
}

.imagediv {
  height: 180px;
  width: 180px;
  user-select: none;
  cursor: default;
  position: relative;
  perspective: 1000px;
  margin: 20% auto;

  .freddys3dloader {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: anim_img 10s infinite;

    .cube-tile,
    .cube-tile-overlay {
      background: url("/assets/skin.png") no-repeat;
      margin: 0;
      position: absolute;
    }

    .cube-tile {
      width: 160px;
      height: 160px;
    }

    .cube-tile-overlay {
      background-size: 1440px;
      width: 180px;
      height: 180px;
    }

    .cube-front {
      transform: translateZ(80px) translateX(10px) translateY(10px);
      background-position: -160px -160px;
    }

    .cube-back {
      transform: rotateY(180deg) translateZ(80px) translateX(-10px) translateY(10px);
      background-position: -480px -160px;
    }

    .cube-right {
      transform: rotateY(90deg) translateZ(90px) translateY(10px);
      background-position: -320px -160px;
    }

    .cube-left {
      transform: rotateY(-90deg) translateZ(70px) translateY(10px);
      background-position: 0 -160px;
    }

    .cube-top {
      transform: rotateX(90deg) translateX(10px) translateZ(70px);
      background-position: -160px 0;
    }

    .cube-bottom {
      transform: rotateX(-90deg) translateX(10px) translateZ(90px);
      background-position: -320px 0;
    }

    .cube-front-overlay {
      transform: translateZ(90px);
      background-position: -900px -180px;
    }

    .cube-back-overlay {
      transform: rotateY(180deg) translateZ(90px);
      background-position: -1260px -180px;
    }

    .cube-right-overlay {
      transform: rotateY(90deg) translateZ(90px);
      background-position: -1080px -180px;
    }

    .cube-left-overlay {
      transform: rotateY(-90deg) translateZ(90px);
      background-position: -720px -180px;
    }

    .cube-top-overlay {
      transform: rotateX(90deg) translateZ(90px);
      background-position: -900px 0;
    }

    .cube-bottom-overlay {
      transform: rotateX(-90deg) translateZ(90px);
      background-position: -1080px 0;
    }
  }
}

body {
  font-family: sans-serif;
  background-color: #f8f8ff;
  margin: 0;
}

h1 {
  text-align: center;
}

.navbar {
  overflow: visible;
  transition: margin-left 1s;
  list-style-type: none;
  margin: 0 0 0 -15%;
  height: 95%;
  padding: 0;
  width: 15%;
  position: fixed;
  background-color: var(--navbar-bg);
  left: 0;
  top: 0;
  z-index: 1;

  &::after {
    background-color: var(--navbar-bg);
    content: '>';
    padding: 0 9px;
    font-size: 200%;
    color: white;
    font-family: sans-serif;
    position: absolute;
    top: 1%;
    border-radius: 0 5px 5px 0;
    left: 100%;
  }

  &:hover,
  &:active {
    margin: 0;

    &::after {
      content: '<';
    }
  }

  .navitem {
    border-bottom: 1px solid #ccc;

    * {
      color: white;
      text-align: center;
      padding: 14px 1%;
      display: block;
    }

    a {
      text-decoration: none;
    }
  }
}

.content {
  width: 100%;
  height: 95%;
  position: fixed;
  right: 0;
  top: 0;
  margin: 0;
  overflow: auto;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  text-align: center;
  width: 100%;
  color: #fff;
  height: 5%;
  box-shadow: 0 0 10px var(--download-background);
  background-color: var(--download-background);

  /* shared base (was the bottomElement mixin) */
  #version,
  #email {
    position: absolute;
    top: 0;
  }

  #version {
    right: 1%;
  }

  #email {
    left: 1%;

    a {
      text-decoration: none;

      &:link,
      &:visited {
        color: white;
      }

      &:hover,
      &:active {
        text-decoration: underline;
      }
    }
  }
}

.front {
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.1);
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

.front-content {
  padding: 5px;
  min-height: 20%;
  margin: 15% auto;
  width: 50%;
  background-color: #fff;
  border: 1px solid #444;
  border-radius: 5px;
}

.error {
  background-color: #cd5959;
}

.code {
  background-color: #292929;
  border: 1px solid #000000;
  border-radius: 4px;
  max-width: 50%;
  margin: auto;

  pre {
    padding: 10px;
    margin: 0;
    min-width: 20%;
    user-select: text;
    overflow: auto;
    color: #e6e6fa;
  }
}

.cookie-accept {
  background-color: #0f0;
  border: 1px solid #aaa;
  border-radius: 5px;
  font-size: 149%;
  width: 50%;
  padding: 10px 0;
  font-weight: bold;
  margin: 0 25%;
  color: white;

  &:focus {
    outline: none;
  }

  &:active {
    background-color: #0a0;
  }

  &:hover {
    background-color: #0c0;
  }
}

@media print {
  body {
    background-color: #fff;
    font-family: initial;
  }

  .content {
    position: initial;
    height: 100%;
  }

  .navbar,
  .footer {
    display: none;
  }
}

#csv {
  z-index: 1;
  visibility: hidden;
  position: absolute;
  padding: 5px;
  color: white;
  border: 1px solid black;
  background-color: var(--download-background);
}

.download {
  text-align: center;
  color: white;
  border: 1px solid;
  background-color: var(--download-background);
  margin: 22px auto;
  width: 50%;
  padding: 10px;

  button {
    background-color: transparent;
    color: #fff;
    font-size: 16px;
    border: 1px solid #fff;
    padding: 5px;
    text-decoration: underline;

    &:focus {
      outline: none;
    }
  }

  table {
    margin: 10px 0;
    width: 100%;
    border: 1px solid;
    border-collapse: collapse;

    td {
      padding: 10px;
      border: 1px solid;
    }
  }

  a,
  span {
    color: var(--download-link-color);
  }

  @media (max-width: 590px) {
    width: 90%;
  }
}
