body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
  perspective: 1000px;
}

.flashcard-container {
  width: 300px;
  height: 300px;
  margin: 15px;
  position: relative;
}

/* Updated favorite button styles with more rounded corners */
.favorite-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 20px;
  width: 35px;
  height: 35px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.favorite-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.favorite-btn.favorited {
  color: #ef4444;
  border-color: #ef4444;
}

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

.flashcard.flipped {
  transform: rotateY(180deg);
}

/* Added more rounded corners and darker background for favorited cards */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  border: 2px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  transition: background-color 0.3s;
}

.front {
  background-color: #fff;
  color: #333;
  font-size: 2em;
  font-weight: bold;
}

/* Darker background for favorited cards */
.flashcard-container.favorited .front {
  background-color: #e66b6b;
}

.flashcard-container.favorited .back {
  background-color: #d89b5f;
}

.back {
  background-color: #e0a46b;
  color: #fff;
  transform: rotateY(180deg);
  flex-direction: column;
  padding: 30px;
}

.back p {
  margin: 10px 0;
}
