:root {
  --colorWHITE: #fff;
  --colorBLACK: #000;
  --colorMAIN: #fafafa;
  --colorGRAY: #ddd;
}

* {
  margin: 0px;
  padding: 0px;
  border: 0px;
  border-collapse: collapse;
  vertical-align: top;
}

html,
body {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

body {
  /* background-color: #3f51b5; */
  background: linear-gradient(90deg, darkblue, purple, dodgerblue, #1a237e);
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

a {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

main {
  display: flex;
  flex-direction: column;
}
header {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent);
  box-shadow: 0px 2px 40px #000;
  border-bottom: 1px solid #888;

  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
header span {
  display: inline-block;
  color: #fff;
  font-size: 34px;
  padding: 20px;
  text-align: center;
}
header a {
  color: #aaa;
  display: inline-block;
  text-decoration: none;
}
#bt-randomMemory {
  background-color: #1a237e;
  color: #fff;
  border: 1px solid #fff;
  font-size: 12px;
  padding: 10px;
  margin-top: 30px;
  border-radius: 6px;
  text-transform: uppercase;
  cursor: pointer;
}
#bt-randomMemory:hover {
  background-color: #fff;
  color: #1a237e;
}

#nav-filter {
  padding: 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
#nav-filter button.active,
#nav-filter button:hover {
  background-color: #fff;
  color: dodgerblue;
}
#nav-filter button {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--colorWHITE);
  font-size: 16px;
  padding: 10px;
  margin: 3px;
  border-radius: 6px;
  cursor: pointer;
}

.skeleton {
  min-height: 300px;
  opacity: 0.7;
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: hsl(200, 20%, 40%);
  }
  100% {
    background-color: hsl(200, 20%, 70%);
  }
}

article {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, calc(12.5% - 8px)), 1fr)
  );
  gap: 4px;
  padding: 4px;
}

article div:hover {
  border: 1px solid #fff;
}
article div:hover img.img_front {
  box-shadow: 0px 4px 20px white;
  filter: brightness(1);
}
article div {
  border: 1px solid #888;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
}
article div img {
  box-sizing: border-box;
}
.img_back {
  filter: grayscale(0.5) brightness(40%) blur(1.5px);
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
}
.img_front {
  filter: brightness(75%) drop-shadow(0 10px 8px #000);
  width: 100%;
  height: 300px;
  padding: 14px;
  object-fit: contain;
}

.div-modal {
  box-shadow: 0px 0px 50px 5px #000;
  border: 1px dashed #fff;
  background-color: #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  text-transform: uppercase;
}
.div-modal iframe {
  width: 100%;
  min-height: 300px;
}
.div-modal #sp_title {
  background-color: #000;
  color: #eee;
  padding: 10px;
  display: block;
  text-align: center;
}

#bt-modal:hover {
  color: gold;
}
#bt-modal {
  color: tomato;
  background-color: transparent;
  float: right;
  font-weight: bold;
  position: relative;
  top: 0px;
  right: 0px;
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
}

@media (width <= 1024px) {
  .div-modal {
    width: 90%;
  }
  article {
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, calc(20% - 20px)), 1fr)
    );
  }
}

@media (width <= 768px) {
  article {
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, calc(33% - 20px)), 1fr)
    );
  }
}

@media (width <= 480px) {
  article {
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, calc(50% - 20px)), 1fr)
    );
  }
}
