:root {
  --bg: rgb(28, 27, 34);
  --txt: rgb(240, 241, 246);
  --accent: rgb(240, 241, 246);
  --grey-blackest: rgb(15, 14, 18);
}

/* MAIN */

body {
  margin: 2em;
  background: var(--bg);
  color: var(--txt);

  font-family: Montserrat, Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.5em;
  overflow-y: scroll;
}

h1 {
  font-family: Rowdies, Verdana, sans-serif;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.5em;
}

h1 a {
  text-decoration: none;
  color: rgb(191, 191, 202);
}

h1 a:hover {
  color: rgb(170, 170, 180);
}

header div {
  margin-bottom: 1em;
}

a {
  color: var(--accent);
  /* text-decoration: none; */
  /* border-bottom: 2px dashed rgb(64, 64, 77); */
}

a:has(img) {
  text-decoration: none;
}

hr {
  border: 1px dashed rgb(64, 64, 77);
}

/* TAG BUTTONS */

#tag-buttons {
  margin-top: 1em;
}

.tag,
#reset {
  border: none;
  border-radius: 6px;
  margin-bottom: 0.5em;
  padding: 0.5em;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
}

.tag::before {
  content: "#";
}

.active {
  background: var(--accent);
  color: var(--bg);
}

.green {
  background: rgb(165, 204, 133, 0.247);
}

.active#green {
  background: rgb(165, 204, 133);
}

.red {
  background: rgba(211, 81, 103, 0.247);
}

.active#red {
  background: rgb(226, 89, 112);
}

.blue {
  background: rgba(124, 138, 218, 0.301);
}

.active#blue {
  background: rgba(124, 138, 218);
}

.yellow {
  background: rgb(250, 226, 148, 0.247);
}

.active#yellow {
  background: rgb(250, 226, 148);
}

/* GALLERY */

#gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.item {
  /* margin: auto; */
  width: calc(19.7vw - 1.5em);
  height: calc(19.7vw - 1.5em);
  overflow: hidden;
  cursor: pointer;
  background: rgb(20, 19, 24);
  /* border: 1px dashed var(--accent); */
  border-radius: 6px;
}

.hidden,
.item-info {
  display: none;
}

/* ----- TO TOP BUTTON ----- */

.up-btn {
  background: var(--grey-blackest);
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  position: fixed;
  font-size: 1rem;
  bottom: 20px;
  right: 30px;
  z-index: 1;
  padding: 15px;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-transition: all 0.2s;
}
.up-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: none;
}

/* ----- NEXT BUTTON ----- */

#prev-btn,
#next-btn {
  padding: 0.5em 4em;
  background: transparent;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  border: 1px solid var(--accent);
  color: var(--accent);
}

#prev-btn:hover,
#next-btn:hover {
  box-shadow: none;
  background: var(--accent);
  color: var(--bg);
}

footer {
  margin-top: 3em;
  margin-bottom: 3em;
}

.float-right,
.float-right-unfloat {
  float: right;
  margin: 0px 0px 1em 1em;
}

.float-left,
.float-left-unfloat {
  float: left;
  margin: 0em 1em 1em 0em;
}

.float-right a {
  text-decoration: none;
}

#item-counter {
  margin: 1em 0em 1em .5em;
}

.collapsible {
  background: rgb(20, 19, 24);
  color: var(--accent);
  cursor: pointer;
  padding: 1em;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1rem;
  border-radius: 6px 6px 6px 6px;
}

.active,
.collapsible:hover {
  background: rgb(20, 19, 24);
}

.content {
  margin-top: -10px;
  padding: 0em 1em .5em 1em;
  display: none;
  overflow: hidden;
  background: rgb(20, 19, 24);
  border-radius: 0px 0px 6px 6px;
}

/* GALLERY THUMBNAILS */

.item img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  /* object-fit: cover; */
  /* -webkit-filter: drop-shadow(.2px .2px 0 white)
                drop-shadow(-.2px .2px 0 white)
                drop-shadow(.2px -.2px 0 white)
                drop-shadow(-.2px -.2px 0 white);

                filter: drop-shadow(.2px .2px 0 white)
                drop-shadow(-.2px .2px 0 white)
                drop-shadow(.2px -.2px 0 white)
                drop-shadow(-.2px -.2px 0 white); */
}

.zoom img {
  object-fit: none;
}

.crop img {
  object-fit: cover;
}

.top-left img {
  object-position: top left;
}

.top-center img {
  object-position: top center;
}

.top-right img {
  object-position: top right;
}

.center-left img {
  object-position: center left;
}

.center-center img {
  object-position: center;
}

.center-right img {
  object-position: center right;
}

.bottom-left img {
  object-position: bottom left;
}

.bottom-center img {
  object-position: bottom center;
}

.bottom-right img {
  object-position: bottom right;
}

/* LIGHTBOX */

#lightbox {
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(10, 10, 10, 0.90);
  color: var(--accent);

  display: none;

  overflow-y: auto;
}

#close-btn {
  z-index: 2;
  position: absolute;
  top: 1em;
  right: 1em;

  font-size: 24px;
  color: var(--accent);
  cursor: pointer;
}

#lightbox .flex {
  display: flex;
  gap: 2em;
  justify-content: space-between;
  height: 100vh;
  padding: 0 1em;
}

#lightbox-img {
  margin: 1em 0;
  width: 60%;
  /* -webkit-filter: drop-shadow(1px 1px 0 var(--accent))
                drop-shadow(-1px 1px 0 var(--accent))
                drop-shadow(1px -1px 0 var(--accent))
                drop-shadow(-1px -1px 0 var(--accent));

                filter: drop-shadow(1px 1px 0 var(--accent))
                drop-shadow(-1px 1px 0 var(--accent))
                drop-shadow(1px -1px 0 var(--accent))
                drop-shadow(-1px -1px 0 var(--accent)); */
}

#lightbox-img img {
  object-fit: scale-down;
  object-position: center;

  width: 100%;
  height: 100%;
  margin: 0 auto;
}

#lightbox-info {
  display: flex;
  flex-direction: column;
  margin: auto 0 1em 0;
  width: 35%;
}

#lightbox-title,
#lightbox-date,
#lightbox-desc,
#lightbox-tags {
  word-break: break-word;
  overflow-y: auto;
  scrollbar-width: thin;
  /* margin-bottom: 0.5em; */
}

#lightbox-date,
#lightbox-tags {
  text-align: right;
  font-family: Montserrat, Verdana, sans-serif;
}

#lightbox-desc {
  max-height: 49.5em;
  margin-bottom: 1em;
  padding-right: 1em;
}

#lightbox-desc img {
  /* max-width: 45%; */
  border-radius: 6px;
  width: 195px;
  height: 195px;
  object-fit: cover;
}

#lightbox-desc video,
#lightbox-desc iframe {
  max-width: 90%;
}

#lightbox-tags {
  margin-top: 0;
  padding-left: 0;
  list-style-type: none;
}

#lightbox-tags li {
  /* border: 1px solid white; */
  background: var(--accent);
  color: var(--bg);
  display: inline-block;
  margin-left: 0.5em;
  margin-bottom: 0.5em;
  padding: 0.2em 0.3em 0.2em 0.3em;
  border-radius: 6px;
}

#lightbox-tags li::before {
  content: ' #';
}

#lightbox-tags li:nth-child(even) {
  background: var(--accent);
}

/* NAVIGATION & TALLY */

#lightbox-nav {
  display: flex;
  justify-content: space-between;

  margin-top: 2em;
}

#prev-btn,
#next-btn {
  padding: 0.5em 4em;
  background: var(--grey-blackest);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  border: 1px solid var(--accent);
  color: var(--accent);
}

#prev-btn:hover,
#next-btn:hover {
  box-shadow: none;
  background: var(--accent);
  color: var(--bg);
}

#progress {
  padding: 0.5em;
}

#audio {
  cursor: pointer;
}

/* MOBILE */

@media screen and (max-width: 1200px) {
  .item {
    width: calc(25vw - 2em);
    height: calc(25vw - 2em);
  }

  #lightbox-desc img {
    width: 90px;
    height: 90px;
  }
}

@media screen and (max-width: 1000px) {
  .item {
    width: calc(33vw - 2em);
    height: calc(33vw - 2em);
  }
}

@media screen and (max-width: 800px) {
  body {
    margin: 1em;
  }

  .item {
    width: calc(50vw - 2em);
    height: calc(50vw - 2em);
  }

  #lightbox {
    overflow-y: scroll;
  }

  #lightbox .flex {
    margin-top: 0;
    flex-direction: column;
    height: auto;
    gap: 1em;
  }

  #close-btn {
    position: static;
    display: block;
    text-align: right;
    padding-top: 0.5em;
    padding-right: 0.5em;
  }

  #lightbox-img {
    width: 100%;
    height: 65vh;
  }

  #lightbox-img img {
    height: 100%;
  }

  #lightbox-desc img {
    width: 100px;
    height: 100px;
  }

  #lightbox-info {
    margin-top: 0;
    width: 100%;
    gap: 0.5em;
  }

  #lightbox-title,
  #lightbox-date,
  #lightbox-desc,
  #lightbox-tags {
    margin-bottom: 0;
    max-height: none;
  }

  #lightbox-nav {
    order: -1;
    margin-top: 0;
  }
}