@font-face {
  font-family: "Comic Neue";
  src: url("fonts/Comic_Neue/ComicNeue-Bold.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Anton";
  src: url("fonts/Anton/Anton-Regular.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: "Comic Neue", "Comic Sans MS", cursive;
  font-size: 18px;
  font-weight: 900;
  color: #ffff00;
  background: #000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000 url("images/bg.jpg") repeat;
  color: #ffff00;
}

main {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  text-align: center;
}

h1 {
  margin: 0 0 12px;
  border: 6px ridge #ff00ff;
  background: #000;
  color: #00ff00;
  padding: 14px 12px;
  font-family: "Anton", Impact, "Arial Black", fantasy;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  animation: rainbow-title 8s steps(1, end) infinite;
  text-shadow:
    3px 3px 0 #ff00ff,
    6px 6px 0 #0000ff;
  text-transform: uppercase;
}

h1 span {
  display: inline-block;
  transform: scale(1.05, 0.9);
}

@keyframes rainbow-title {
  0% {
    color: #ff0000;
    text-shadow:
      3px 3px 0 #ffff00,
      6px 6px 0 #00ffff;
  }

  16% {
    color: #ff7f00;
    text-shadow:
      3px 3px 0 #00ff00,
      6px 6px 0 #ff00ff;
  }

  32% {
    color: #ffff00;
    text-shadow:
      3px 3px 0 #0000ff,
      6px 6px 0 #ff0000;
  }

  48% {
    color: #00ff00;
    text-shadow:
      3px 3px 0 #ff00ff,
      6px 6px 0 #ffff00;
  }

  64% {
    color: #00ffff;
    text-shadow:
      3px 3px 0 #ff0000,
      6px 6px 0 #0000ff;
  }

  80% {
    color: #ff00ff;
    text-shadow:
      3px 3px 0 #00ffff,
      6px 6px 0 #00ff00;
  }
}

.note {
  display: inline-block;
  margin: 0 0 28px;
  border: 4px outset #00ffff;
  background: #ff00ff;
  color: #fff;
  padding: 8px 18px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-shadow:
    0.4px 0 0 currentColor,
    0 0.4px 0 currentColor,
    2.2px 2.2px 0 #000;
}

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  border: 8px ridge #ffff00;
  background: #00ffff;
  color: #000080;
  box-shadow: 10px 10px 0 #000;
}

.stock-badge {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 1;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  padding: 22px;
  background: #ffff00;
  color: #ff0000;
  clip-path: polygon(
    50% 0%,
    59% 27%,
    85% 15%,
    73% 41%,
    100% 50%,
    73% 59%,
    85% 85%,
    59% 73%,
    50% 100%,
    41% 73%,
    15% 85%,
    27% 59%,
    0% 50%,
    27% 41%,
    15% 15%,
    41% 27%
  );
  font-family: "Anton", Impact, "Arial Black", fantasy;
  font-size: 21px;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    1px 1px 0 #fff,
    2px 2px 0 #000;
  animation: spin-badge 7s steps(10, end) infinite;
}

@keyframes spin-badge {
  to {
    transform: rotate(360deg);
  }
}

.cover {
  display: block;
  width: 100%;
  object-fit: cover;
  border-bottom: 6px groove #ff00ff;
  background: #c0c0c0;
  image-rendering: pixelated;
}

.card-body {
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    #00ffff;
  background-size: 12px 12px;
}

.game-title {
  margin: 0 0 10px;
  color: #ff0000;
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  text-decoration: underline;
  text-shadow: 2px 2px 0 #ffff00;
  text-transform: uppercase;
}

.price {
  margin: 0 0 14px;
  color: #000;
  font-size: 25px;
  background: #ffff00;
  border: 3px dashed #ff0000;
  padding: 6px;
  letter-spacing: 0.02em;
  text-shadow:
    0.4px 0 0 currentColor,
    0 0.4px 0 currentColor;
  text-transform: uppercase;
}

button,
.itch-link {
  display: block;
  width: 100%;
  appearance: none;
  border: 5px outset #c0c0c0;
  background: #ff0000;
  color: #ffff00;
  padding: 12px 14px;
  font-family: "Comic Neue", "Comic Sans MS", cursive;
  font-size: 23px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow:
    0.4px 0 0 currentColor,
    0 0.4px 0 currentColor,
    2.2px 2.2px 0 #000;
  text-transform: uppercase;
}

button:hover,
button:focus-visible,
.itch-link:hover,
.itch-link:focus-visible {
  background: #00ff00;
  color: #0000ff;
  outline: none;
}

.itch-link {
  margin-top: 8px;
  background: #0000ff;
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  background: #808080;
  color: #c0c0c0;
}

footer {
  margin-top: 40px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .games {
    grid-template-columns: 1fr;
  }
}
