body {
  text-align: center;
  font-family: Arial, sans-serif;
  background: #111;
  color: #fff;
}

canvas {
  background:
    repeating-linear-gradient(
      to right,
      #111 0px,
      #111 29px,
      blue 30px
    ),
    repeating-linear-gradient(
      to bottom,
      #111 0px,
      #111 29px,
      blue 30px
    );
  display: block;
  margin: 20px auto;
  border: 2px solid #fff;
}

button {
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  margin-top: 10px;
}
#touchControls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

#touchControls button {
  padding: 20px 40px;
  font-size: 1.2rem;
  border-radius: 12px;
  border: none;
  background-color: #444;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
#score {
  display: none;
}
/* Desktop: Ranking rechts anzeigen */
#rankingContainer {
  position: absolute; /* oder flexbox nutzen */
  top: 20px;
  right: 20px;
  width: 200px;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
  overflow-y: auto;
  max-height: 500px;
}

/* Link verstecken auf Desktop */
#showRankingLink {
  display: none;
}

/* Auf kleinen Bildschirmen: Ranking verstecken, Link anzeigen */
@media (max-width: 768px) {
  #rankingContainer > #ranking {
    display: none;  /* Ranking-Liste ausblenden */
  }
  #showRankingLink {
    display: inline-block; /* Link sichtbar */
    cursor: pointer;
    color: blue;
    text-decoration: underline;
  }
}
#gameWrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 20px;
  position: relative; /* wichtig für position:absolute-Inhalte innerhalb */
}

#rankingContainer {
  background: #f0f0f0;
  color: #000;
  padding: 10px;
  border-radius: 8px;
  max-height: 500px;
  overflow-y: auto;
  width: 200px;
}

/* Verstecke Ranking-Box und zeige nur Link auf kleinen Screens */
@media (max-width: 768px) {
  #rankingContainer > #ranking,
  #rankingContainer > h3 {
    display: none;
  }

  #showRankingLink {
    display: inline-block;
    margin-top: 10px;
    cursor: pointer;
    color: blue;
    text-decoration: underline;
  }
}

/* Standardmäßig Link ausblenden auf großem Screen */
@media (min-width: 769px) {
  #showRankingLink {
    display: none !important;
  }
}