.container {
  width: 80%;
  margin: 0 auto;
  text-align: center;
}

.flashcard {
  width: 100%;
  height: 300px;
  perspective: 1000px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.card.flip {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;

  /* 🔥 FIX TEXT */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  word-wrap: break-word;
  overflow-wrap: break-word;

  font-size: 20px;
  padding: 15px;
  line-height: 1.4;

  overflow-y: auto;
}

.front {
  background: #ddd;
  color: #BA1F53;
}

.back {
  background: #C85073;
  color: white;
  transform: rotateY(180deg);
}

button {
  padding: 10px 20px;
  margin: 5px;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .container {
    width: 50%;
  }

  .front,
  .back {
    font-size: 28px;
    padding: 25px;
  }
}