:root {
  --width: 75%;
}

* {
  box-sizing: border-box;
  touch-action: manipulation;
}

body, html {
  margin: 0;
  background-color: black;
  color: white;
  font-family: "Courier Prime", monospace;
  width: 100%;
  height: 100%;
}

input, button {
  font-family: "Courier Prime", monospace;
  border: none;
  margin: 4px;
  color: white;
  padding: 10px;
  border-radius: 5px;
  background-color: #4b5466;
}

input::placeholder {
  color: #979696
}

button {
  cursor: pointer;
}

.nav button:focus {
  outline: none;
}

header {
  margin: 0 auto;
  margin-top: 30px;
  text-align: center;
  width: var(--width);
}

header img {
  width: 50%;
  image-rendering: pixelated;
}

.nav {
  width: 100%;
  margin: 20px auto;
}

.nav button {
  width: calc(33% - 10px);
  margin: 0 5px;
  padding: 0;
  border: none;
  font-size: 32px;
  background-color: white;
  color: black;
  vertical-align: top;
  font-weight: bold;
  border-radius: 5px;
  border-bottom: 10px solid #ed2941;
}

.aboutBtn {
  width: calc(50% - 15px) !important;
}

.active {
  border-bottom: none !important;
  margin-top: 10px !important;
}

.page {
  width: calc(var(--width) - 20px);
  margin: 20px auto 4px;
  padding: 20px;
  color: white;
  border-radius: 5px;
  background: #2f3541;
  overflow-x: hidden;
}

#game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  grid-gap: 10px;
}

.game {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  background-color: #4b5466;
  overflow: hidden;
}

.game img {
  width: calc(100%);
  display: block;
  margin: 0 auto;
  margin-bottom: 5px;
}

.game p {
  margin: 0 3px;
}

.game a {
  position: relative;
}

.game img:not(.PICO-8) {
  border-radius: 4px;
}

.game .PICO-8 {
  image-rendering: pixelated;
  border: 3px solid #FFF1E8;
}

.game .wip, .game .pc {
  position: absolute;
  color: black;
  z-index: 1;
  padding: 5px;
  margin: 5px;
  background-color: white;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

.game .wip {
  letter-spacing: -2.5px;
}

.game .pc {
  margin-top: 40px;
}

a {
  text-decoration: none;
  color: white;
}

a:hover {
  text-decoration: underline;
}

.game a:hover img {
  text-decoration: none;
}

::-webkit-scrollbar {
  display: none;
}

.card-container {
  text-align: center;
  display: flex;
  font-size: 0;
}

.card {
  position: relative;
  display: inline-block;
  width: calc(50% - 45px);
  border-radius: 5px;
  margin: 10px;
  background-color: #4b5466;
  vertical-align: top;
  padding: 10px;
  text-align: center;
  font-size: 0;
  flex: 1;
}

.card h2 {
  font-size: 20px;
}

.card input {
  width: 80%;
  background-color: #2f3541;
  margin: 10px;
}

.card button {
  width: 80%;
  cursor: pointer;
  background-color: #2f3541;
  margin: 10px;
}

.settings-input {
  width: 300px;
}

.error-message {
  color: red;
}

.error-message button {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-block;
  width: fit-content;
}

.error-message button:hover {
  text-decoration: underline;
}

.eye {
  position: absolute;
  cursor: pointer;
  font-size: 18px;
  transform: translate(-40px, 17px);
}

.fa-eye-slash {
  margin-right: 2px;
}

.copyright {
  color: grey;
  text-align: center;
  font-size: 14px;
}

.game-saves button {
  background-color: #ed2941;
  width: 30px;
}

.game-saves span {
  font-size: 18px;
}

.popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  background-color: #2f3541;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
}

.popup-background {
  width: 100%;
  height: 100%;
  background-color: #00000088;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
}

.center {
  width: 100%;
  text-align: center;
}

.post {
  background-color: #4b5466;
  border-radius: 5px;
  margin: 10px;
  padding: 10px;
}

.post h3 {
  margin-bottom: 3px;
  margin-top: 3px;
}

.post .date {
  margin-top: 3px;
  font-style: italic;
  color: grey;
}

.post .content {
  margin-bottom: 3px;
}

@media only screen and (max-width: 1300px) {
  #game-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  :root {
    --width: 90%;
  }
}

@media only screen and (max-width: 750px) {
  :root {
    --width: 100%;
  }
  .card-container {
    display: block;
  }
  .card {
    width: 90%;
  }
  .nav button {
    font-size: 24px;
  }
  .nav {
    margin: 5px auto;
  }
  .page {
    margin-top: 10px;
  }
  header {
    margin-top: 5px;
  }
  header img {
    width: 98%;
  }
  .popup {
    width: 90%;
  }
  .settings-input {
    width: 200px;
  }
}
