/* FLASHCARDS 10 — Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-60px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes breathe {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === FLASHCARD FLIP 3D === */
.flashcard-3d {
  perspective: 1200px;
  width: 100%;
  max-width: 660px;
}

.flashcard-3d-inner {
  position: relative;
  width: 100%;
  min-height: 320px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-3d-inner.flipped {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  top: 0; left: 0; right: 0;
  min-height: 320px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: 0 8px 40px var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

/* === SWIPE OVERLAY === */
.swipe-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 10;
}

.swipe-overlay.otra { background: rgba(192,57,43,0.2); color: var(--color-otra); }
.swipe-overlay.dificil { background: rgba(224,168,48,0.2); color: var(--color-dificil); }
.swipe-overlay.bien { background: rgba(15,155,88,0.2); color: var(--color-bien); }
.swipe-overlay.facil { background: rgba(44,116,179,0.2); color: var(--color-facil); }

/* === FEEDBACK FLASH === */
.flash-otra { animation: shake 0.4s ease; }
.flash-bien, .flash-facil { animation: pulseScale 0.3s ease; }

/* === TIMER === */
.timer-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.timer-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s linear, background-color 0.5s;
  background: var(--color-bien);
}

.timer-pulse { animation: pulse 0.5s ease infinite; }

/* === BADGE ANIMATIONS === */
.badge-nueva-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--badge-nueva);
  animation: pulse 2s ease infinite;
  display: inline-block;
}

.badge-sanguijuela-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--badge-sanguijuela);
  animation: pulse 1s ease infinite;
  display: inline-block;
}

/* === UTILITY CLASSES === */
.anim-fade-in { animation: fadeIn 0.3s ease; }
.anim-fade-in-up { animation: fadeInUp 0.4s ease; }
.anim-slide-in { animation: slideInRight 0.3s ease; }

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
