body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: black;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.card-container {
  perspective: 1000px;
}

.card {
  width: 25vw; /* 40% der Breite des Viewports */
  height: 15vw;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.link {
  color: black;
  text-decoration: none;
  padding: 7px 12px;
}

.word:hover {
  color: white;
  background-color: black;
  cursor: pointer;
}

.link:hover {
  color: white;
  background-color: black;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  font-size: 1.5em; /* Grundgröße der Schrift */
  line-height: 1em;
  letter-spacing: 0px;
  font-family: Arial narrow, sans-serif;
  color: black;
  border-radius: 0px;
}

.front {
  background-color: white;
}

.back {
  background-color: white;
  transform: rotateY(180deg);
}
.flipped {
  transform: rotateY(180deg);
}

/* Für kleinere Bildschirme (Tablets, Smartphones) */
@media (max-width: 1100px) {
  .card {
    width: 25vw; /* 60% der Breite des Viewports */
    height: 15vw; /* Höhe proportional zur Breite (Verhältnis 400px:250px) */
  }

  .card-face {
    font-size: 1.2em; /* Schriftgröße leicht reduzieren */
  }
}

@media (max-width: 900px) {
  .card {
    width: 25vw; /* 70% der Breite des Viewports */
    height: 15vw; /* Höhe proportional zur Breite */
  }

  .card-face {
    font-size: 1em; /* Schriftgröße weiter reduzieren */
  }
}

@media (max-width: 750px) {
  .card {
    width: 30vw; /* 85% der Breite des Viewports */
    height: 18vw; /* Höhe proportional zur Breite */
  }

  .card-face {
    font-size: 0.8em; /* Schriftgröße noch weiter reduzieren */
  }

  /* Passe Buttons und Links an */
  .link {
    font-size: 0.9em; /* Kleinere Schriftgröße für Links */
    padding: 5px 10px; /* Kleinere Buttons */
  }
}