/* ==============================
   FLASHCARDS MODULE STYLES
   Works alongside global.css
   ============================== */

/* Flashcards container layout */
#flashcard-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;       
  padding-bottom: 50px;
}

/* Flashcard base */
.flashcard {
  width: 220px;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
}

/* Add icon to all flashcards */
.flashcard::before {
  content: "💫";
  position: absolute;
  top: 10px;
  right: 70%;
  transform: translateX(-50%);
  font-size: 20px;
  color: #ffb6c1; /* soft pink tone */
  text-shadow: 0 0 5px rgba(255, 182, 193, 0.6);
  z-index: 5;
  opacity: 0.9;
}


/* Card inner element for flip animation */
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* Flip animation trigger */
.flashcard.flip .flashcard-inner {
  transform: rotateY(180deg);
}

/* Front & back face styles */
.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Front = Blue */
.flashcard-front {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: yellow;
  padding: 25px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Back = Green */
.flashcard-back {
  background-color: #2ecc71;
  transform: rotateY(180deg);
}

/* Controls section */
#category-selector {
  margin: 15px 0;
  text-align: center;
}

#actions {
  margin-bottom: 15px;
}

#card-count {
  margin-top: 10px;
  font-weight: 600;
}

/* Buttons (inherits base button style from global.css) */
#actions button {
  margin: 0 5px;
}

/* Subtle pulse animation for reset feedback */
.reset-pulse {
  animation: pulse 0.4s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .flashcard {
    width: 160px;
    height: 100px;
  }
  .flashcard-front,
  .flashcard-back {
    font-size: 1rem;
  }
}
