body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  text-align: center;
  margin: 0;
  padding: 0;
}

.flashcard-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 50px;
  min-height: 0px;
}

.flashcard {
  width: 320px;
  height: 220px;
  perspective: 1000px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 12px;
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-front {
  font-size: 28px;
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
  font-size: 18px;
  z-index: 1;
}

.button-container {
  margin-top: 20px;
}

.nav-buttons, .known-btn {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  margin: 5px;
  border-radius: 8px;
  cursor: pointer;
}

.known-btn {
  background-color: #ff9800;
  margin-top: 12px;
}

.counter {
  font-size: 16px;
  margin-top: 10px;
  color: #555;
}

.pronunciation-btn {
  background: none;
  border: none;
  font-size: 20px;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;


}

.extras {
  margin-top: 10px;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 6px;
  font-size: 12px;
  color: #444;
}

.known-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid #4CAF50;
  border-radius: 50%;
  padding: 6px;
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
  transition: background-color 0.2s, transform 0.2s;
}

.known-icon:hover {
  background-color: rgba(76, 175, 80, 0.2);
  transform: scale(1.1);
}


.word {
  font-size: 28px;        /* was 36px */
  font-weight: bold;
  color: #333;
  padding: 16px 8px;
}

.card-back .meaning {
  font-size: 18px;        /* was 20px */
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.sub-definition {
  font-size: 14px;        /* was 16px */
  color: #777;
  display: block;
  margin-bottom: 8px;
}

.card-back .extras {
  font-size: 12px;        /* was 13px */
  color: #444;
  background-color: #f3f3f3;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
}

.flashcard-container {
  transition: opacity 0.3s ease;
}


@keyframes shuffleEffect {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
  75% { transform: rotate(1deg); }
  100% { transform: rotate(0deg); }
}

.shuffle-animation {
  animation: shuffleEffect 0.5s ease;
}

.top-controls {
  margin: 6px 0 0 0; /* reduced top and bottom space */
}

.shuffle-button {
  background-color: #3498db;
  color: white;
  padding: 5px 11px;       /* smaller button size */
  font-size: 12px;         /* slightly smaller text */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.shuffle-button:hover {
  background-color: #2980b9;
  transform: scale(1.03);
}

.extras p {
  margin: 4px 0;
  padding: 0;
  font-size: 12px;
  color: #444;
}

.flashcard {
  position: relative; /* make sure the card is positioned */
}

.remove-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 0px solid #4CAF50;
  border-radius: 50%;
  padding: 6px;
  font-size: 20px;
  cursor: pointer;
  z-index: 3;
  transition: background-color 0.2s, transform 0.2s;
  color: red;
}
.remove-btn:hover {
  background-color: rgba(76, 175, 80, 0.2);
  transform: scale(1.1);
}


.pos-tag{
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 9999px;       /* pill shape */
  border: 1px solid #c7d2fe;   /* soft indigo border */
  background: #eef2ff;         /* soft indigo background */
  color: #3730a3;              /* readable indigo text */
  vertical-align: middle;
  white-space: nowrap;
}

