@font-face {
  font-family: 'Jost';
  font-weight: 400;
  font-style: normal;
  font-display: block;
  src: url('../font/Jost-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-weight: 700;
  font-style: normal;
  font-display: block;
  src: url('../font/Jost-700.woff2') format('woff2');
}

body {
  background-color: #ffffff;
  font-family: Jost, Futura, Arial, sans-serif;
  color: #222222;
}

#main {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: 80px 1fr;
  grid-column-gap: 10px;
  grid-row-gap: 10px;
  grid-template-areas:
    'menu thumbnails'
    'menu canvas';
  max-height: 100vh;
}

#main.no_menu {
  grid-template-columns: 1fr;
  grid-template-areas:
    'thumbnails'
    'canvas';
}

#thumbnails {
  grid-area: thumbnails;
  overflow-x: scroll;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: #000000 #ffffff;
}

#thumbnails::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
}

#thumbnails::-webkit-scrollbar-thumb {
  background: #000000;
}

#thumbnails img {
  margin-left: 1px;
  margin-right: 1px;
  border-radius: 2px;
  max-height: 70px;
}

#thumbnails a.current,
#thumbnails img:hover {
  opacity: 0.5;
}

#canvas {
  grid-area: canvas;
  min-width: 0;
  min-height: 0;
  padding: 2px;
}

#canvas:fullscreen {
  background-color: #ffffff;
}

#canvas div {
  display: none;
  width: 0;
  height: 0;
}

#canvas div:target {
  width: 100%;
  height: 100%;
  flex-direction: column;
  display: flex;
}

#canvas img {
  display: block;
  object-fit: cover;
  max-width: 100%;
  max-height: calc(100% - 13px);
  margin: 0 auto;
}

#canvas video {
  display: block;
  object-fit: cover;
  max-width: 100%;
  max-height: calc(100% - 13px);
  margin: 0 auto;
}

#canvas span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

/* albums menu */

#menu {
  grid-area: menu;
  font-weight: normal;
  font-size: 13px;
  max-height: 100vh;
  overflow-y: auto;
  line-height: 1.4;
  display: flex;
  margin-left: 5px;
  flex-direction: column;
  justify-content: flex-start;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: #000000 #ffffff;

}

#menu::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
}

#menu::-webkit-scrollbar-thumb {
  background: #000000;
}

#menu .title {
  font-size: 15px;
  margin-top: 5px;
  margin-bottom: 5px;
}

#menu ul {
  padding-left: 0;
  list-style-type: none;
}

#menu ul ul {
  padding-left: 14px;
}

#menu ul ul ul ul ul {
  font-size: 12px;
}

#menu a,
#menu a:link,
#menu a:visited {
  text-decoration: none;
  text-overflow: ellipsis;
  display: block;
  color: #333333;
  overflow: hidden;
}

#menu a:hover,
#menu .current > a {
  color: #3993C2;
}


/* fullscreen icon */

#fullscreen {
  bottom: 5px;
  right: 5px;
  z-index: 2;
  position: absolute;
  color: #010101;
  filter: drop-shadow(0 0 3px #eeeeee);
  opacity: 0.8;
  display: block;
  cursor: pointer;
  width: 17px;
  height: 17px;
}

#fullscreen:hover {
  opacity: 1;
}

@media (max-width: 500px) {
  #main {
    grid-template-columns: auto;
    grid-template-rows: auto auto auto;
    grid-row-gap: 10px;
    grid-template-areas:
      'menu'
      'thumbnails'
      'canvas';
    max-height: initial;
  }

  #menu {
    max-height: initial;
  }

  #thumbnails img {
    max-height: 55px;
  }
}

@media (pointer: coarse) {
  #menu {
    font-size: 20px;
    line-height: 1.5;
  }

  #menu .title {
    font-size: 22px;
  }

  #menu li {
    display: none;
  }

  #menu li.current > ul > li, /* children */
  #menu ul.current_siblings > li, /* siblings and self */
  #menu li.current_ancestor { /* ancestors */
    display: list-item;
  }

  #menu ul ul ul ul ul {
    font-size: 18px;
  }
}

/* dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111111;
    color: #eeeeee;
  }

  #menu a,
  #menu a:link,
  #menu a:visited {
    color: #eeeeee;
  }

  #menu a:hover,
  #menu .current > a {
    color: #44aaff;
  }

  #canvas:fullscreen {
    background-color: #111111;
  }

  #fullscreen {
    color: #eeeeee;
    filter: drop-shadow(0 0 3px #010101);
  }
}
