.flashcard-deck { max-width: 500px; margin: 1.5rem auto; }
.flashcard-deck .flashcard { margin: 0 auto; }
.flashcard-deck .flashcard.fc-hidden { display: none; }

.fc-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.fc-controls button {
  padding: 0.35rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 0.9rem;
}
.fc-controls button:hover { background: #ececec; }
.fc-counter { min-width: 56px; text-align: center; font-weight: 600; }

.flashcard {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 220px;
  margin: 1.5rem auto;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  transform: perspective(1000px) rotateY(0deg);
}
.flashcard.flipped {
  transform: perspective(1000px) rotateY(180deg);
}
.flashcard > .front,
.flashcard > .back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 1.1rem;
}
.flashcard > .front { 
  background: #1B4965;
  color: white;
}
.flashcard > .back {
  background: #0c675d;
  color: white;
  transform: rotateY(180deg);
}