:root {
  --primary-color: #dddddd;
  --secondary-color: #0f0f0f;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("fonts/monaspace-neon-latin-200-normal.woff2") format("woff2");
  font-weight: lighter;
  font-style: normal;
}


@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-400-normal.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-700-normal.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-800-normal.woff2") format("woff2");
  font-weight: bolder;
  font-style: normal;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-200-italic.woff2") format("woff2");
  font-weight: lighter;
  font-style: italic;
}


@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-400-italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-700-italic.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "Monaspace Neon";
  src: 
    local("Monaspace Neon"),
    url("public/fonts/monaspace-neon-latin-800-italic.woff2") format("woff2");
  font-weight: bolder;
  font-style: italic;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--secondary-color);
}

* {
  font-family: "Monaspace Neon", monospace;
}


a.link {
  display: block;
  text-decoration: none;
  padding: 1em;
  text-align: center;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transition: background-color 0.2s linear, color 0.2s linear;
  font-weight: bold;
  text-transform: uppercase;
}


a.link:hover,
a.link:focus-visible {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  outline: 0;
}

.border:has(a.link) {
  width: 80%;
  /* margin: 0 10px; */
  padding: 10px;
  transition: border-color 0.7s linear;
  border: 1px solid transparent;
}

.border:has(a.link:hover, a.link:focus-visible) {
  border: 1px solid var(--primary-color);
}


nav {
  background-color: var(--secondary-color);
  border-bottom: 1px solid white;
  z-index: 10;
}

nav > ul {
  margin: 0;
  padding: 5px 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1em;
}

@media screen and (max-width: 600px) {

  nav > ul {
    flex-direction: column;
  }
}
nav > ul > li {
  flex-grow: 1;
}


.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  /* padding: 1em 2em; */
}

.gallery .card {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 300px;
  height: 300px;
}

.gallery .card img.back {
  position: absolute;
  object-fit: cover;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  filter: grayscale(1) blur(5px) brightness(30%);
  transition: filter 0.2s ease-out, transform 0.1s ease-out;
  z-index: -5;
}

.gallery .card:hover img.back {
  filter: grayscale(1) blur(10px) brightness(0%);
  transform: scale(0.95);
  z-index: -5;
}

.gallery .card img.fore {
  /* object-fit: contain; */
  max-width: 100%;
  max-height: 100%;
  filter: contrast(100%) ;
  transition: all 0.2s ease-out, border 0.5s linear;
  border: 2px solid transparent;
  z-index: 0;
  /* padding: 2em; */
}

.gallery .card:hover img.fore {
  max-width: 120%;
  max-height: 120%;
  cursor: pointer;
  filter: grayscale(0) contrast(100%);
  border-color: var(--primary-color);
  background-color: var(--secondary-color) ;
  z-index: 5;
}

.gallery .viewer {
  display: flex; 
  justify-content: center; 
  align-items:center; 
  width: 100%; 
  height: 100%;
}

.gallery .viewer img {
  cursor: pointer; 
  max-width: calc(100% - 16px); 
  max-height: calc(100% - 16px);
}


.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.8);
}

.modal .modal-content {
  position: absolute;
  background-color: var(--secondary-color);
  outline: 1px solid var(--primary-color);
  margin: 15% auto;
  width: 95vw;
  height: 95vh;
  filter: blur(0);
  animation: appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


.modal button.modal-close {
  cursor: pointer;
  position: absolute; 
  top: 0; 
  right: 0;
  width: 30px;
  height: 30px;
  margin: 0.5em;
  font-size: large;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 0;
}

.modal button.modal-close:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

@keyframes appear {
  from {
    height: 0%;
    border-color: transparent;
  }
}


.game-cards {
  display: flex;
  flex-direction: column;
  padding-top: 1em;
  gap: 2em
}

.game-card {
  border: 1px solid transparent;
  padding: 10px;
  margin: 10px;
  transition: border 0.7s linear;
  width: 70%;
  margin: auto;
}

.game-card .game-card-border {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
  background-color: var(--secondary-color);
  transition: background-color 0.2s ease-out;
}

@media screen and (max-width: 600px) {
  .game-card .game-card-border {
    flex-direction: column;
    gap: 1em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--primary-color);
  }

  .game-card .game-card-border .game-card-title {
    text-align: center;
  }
}

.game-card .game-card-border .game-card-title {
  color: var(--primary-color);
}

.game-card .game-card-border .game-card-button {
  display: flex;
  align-items: center;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  padding: 0.5em 1em;
  gap: 1em;
  transition: all 0.2s ease-out;
}

.game-card .game-card-border .game-card-button img {
  height: 24px;
  transition: all 0.2s ease-out;
}

.game-card .game-card-border .game-card-button:hover {
  background-color: var(--primary-color);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.game-card .game-card-border .game-card-button:hover img {
  filter: invert(100%);
}

.game-card:has(.game-card-button:hover)  {
  border-color: var(--primary-color);
}

.game-card:has(.game-card-button:hover) .game-card-border {
  background-color: var(--primary-color);
}

.game-card:has(.game-card-button:hover) .game-card-title {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}