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

/* Retro game font class */
.retro-font {
  font-family: 'PressStart2P', monospace;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Smaller font size adjustment for buttons and smaller elements */
a.retro-font, button.retro-font {
  font-size: 0.85em;
  font-weight: normal;
}

/* Additional pixel effect */
.pixel-effect {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Pixel background pattern */
.pixel-bg {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 8px 8px;
}

/* Standard button and card styling */
.retro-button {
  cursor: pointer;
  border: 4px solid #2d3748;
  border-radius: 4px;
  padding: 10px 20px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  font-family: 'PressStart2P', monospace;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.retro-button:hover, .game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
}

.retro-button:active {
  transform: translateY(2px);
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2);
}

/* Scanline effect for retro CRT feel */
.scanline {
  position: relative;
  overflow: hidden;
}

.scanline::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: repeating-linear-gradient(
    transparent 0px,
    rgba(0, 0, 0, 0.05) 1px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
}

.pixel-glitch:hover {
  animation: glitch 0.2s ease-in-out 3 alternate;
}
