.flashcards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Basic flip card container */
.flip-card {
  background-color: transparent;
  width: 250px;
  height: 300px;
  perspective: 1000px;
  margin: 10px;
}

/* Flip card inner container */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* When tapped, add class "flipped" via JS to rotate */
.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.flip-card-front {
  background-color: #fff;
}

.flip-card-back {
  background-color: #f1f1f1;
  transform: rotateY(180deg);
  font-size: 2em; /* Big font for the word */
  text-align: center;
}

/* Ensure images fill the card properly */
.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .flip-card {
    width: 90%;
    height: auto;
    margin: 20px auto;
  }
  .flip-card-inner {
    min-height: 300px;
  }
  .flip-card-back {
    font-size: 2.5em;
  }
}
