/* =========================
   BASE
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: black;
  color: white;
  overflow-x: hidden;
  text-align: center;
}

/* =========================
   SYNTH GRID BACKGROUND
========================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image:
    linear-gradient(#ff00ff 1px, transparent 1px),
    linear-gradient(90deg, #ff00ff 1px, transparent 1px);

  background-size: 40px 40px;
  opacity: 0.15;

  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;

  animation: moveGrid 6s linear infinite;
  will-change: transform;
  z-index: 0;
}

/* Sonne */
body::after {
  content: "";
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);

  width: 300px;
  height: 300px;
  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 0, 128, 0.9) 0%,
    rgba(255, 0, 128, 0.4) 35%,
    transparent 70%
  );

  pointer-events: none;
  z-index: 0;
}

/* =========================
   START SCREEN
========================= */
#start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: black;
  z-index: 2;
  cursor: pointer;
}

.title {
  font-size: clamp(40px, 6vw, 80px);
  color: #0ff;
  text-shadow: 0 0 15px #0ff;
}

.press-start {
  font-size: 20px;
  color: white;
  animation: blink 1s infinite;
}

/* =========================
   HEADER
========================= */
header,
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;

  padding: 20px;
  background: rgba(0,0,0,0.7);
  box-shadow: 0 0 15px #0ff;

  position: relative;
  z-index: 2;
}

/* GitHub Button */
.github-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 40px;
  height: 40px;

  margin-left: 15px;

  border-radius: 10px;
  color: #0ff;
  text-decoration: none;

  transition: 0.15s ease;
}

.github-link:hover {
  background: #0ff;
  color: black;
  transform: scale(1.1);
}

/* =========================
   GAME GRID
========================= */
.game-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: row;

  gap: 15px;
  padding: 20px;

  max-width: 2500px;
  margin: 0 auto;      /* 👈 zentriert */

  position: relative;
  z-index: 1;
}

/* =========================
   GAME CARD
========================= */
.game-card {
  grid-column: auto; /*span 4; /* Standard: 4 von 16 → 4 Karten pro Reihe, oder # grid-column: span 8; // halbe Breite //, # grid-column: span 16; // volle Breite // */
  /* grid-row: span 2; */

  background: rgba(0,0,0,0.6);
  border: 2px solid #0ff;
  border-radius: 15px;

  min-height: 120px;
  padding: 20px;

  font-size: 18px;
  font: bold 20px Arial, sans-serif;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;

  box-shadow: 0 0 10px #0ff;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;

  overflow: hidden; /*ist für das image*/
}

/* Bild als Hintergrund */
.game-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

/* Text darüber */
.game-card p {
  position: relative;
  z-index: 2;
}

a.game-card {
  color: #ffffff;
  text-decoration: none;
}

.game-card:hover {
  background: #0ff;
  color: black;
  transform: translateY(-5px);
  box-shadow: 0 0 25px #0ff;
}

.issue-link {
  position: absolute;
  bottom: 10px;
  right: 10px;

  color: #0ff;
  font-size: 20px;

  z-index: 2;
}

.issue-link:hover {
  color: greenyellow;
  transform: scale(1.2);
}

/* Tablet */
@media (max-width: 1200px) {
  .game-container {
    grid-template-columns: repeat(8, 1fr);
  }

  .game-card {
    grid-column: span 4; /* 2 Karten pro Reihe */
  }
}

/* Handy */
@media (max-width: 800px) {
  .game-container {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;   /* volle Breite */
  }

  .game-card {
    grid-column: span 4; /* 1 Karte pro Reihe */
  }
}

/* =========================
   OVERLAY GRID
========================= */
.overlay-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;

  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);

  background-size: 10px 10px;
}

/* =========================
   UTIL
========================= */
.hidden {
  display: none;
}

/* =========================
   ANIMATIONS
========================= */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes moveGrid {
  from { background-position: 0 0; }
  to { background-position: 0 40px; }
}
