/* [SEJP-V7-T015] Focused Living Motion, 3D Flip & Multi-Tier Animation Preferences */
@keyframes sejpEnterUp {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sejpCardExit {
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

@keyframes sejpShakeWrong {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  88% { transform: translateX(3px); }
}

@keyframes sejpGlowOk {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes sejpXpPop {
  0% { opacity: 0; transform: translateY(4px) scale(0.9); }
  25% { opacity: 1; transform: translateY(-8px) scale(1.06); }
  100% { opacity: 0; transform: translateY(-28px) scale(1); }
}

.sejp-enter { animation: sejpEnterUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
.sejp-card-exit { animation: sejpCardExit 0.24s ease-in forwards; }
.sejp-shake { animation: sejpShakeWrong 0.36s ease; }
.sejp-glow-ok { animation: sejpGlowOk 0.52s ease-out; }

/* True 3D Flashcard Flip Container */
.fc3d-scene { perspective: 1200px; }
.fc3d-card {
  position: relative;
  width: 100%;
  min-height: 270px;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.fc3d-card.is-flipped { transform: rotateY(180deg); }
.fc3d-face {
  position: relative;
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
}
.fc3d-face-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  overflow-y: auto;
}

/* Smooth Tab Panel Entrance */
.sejp-tab-panel-in { animation: sejpEnterUp 0.22s ease-out both; }

html[data-anim-level="balanced"] .sejp-enter { animation-duration: 0.16s; }
html[data-anim-level="balanced"] .fc3d-card { transition-duration: 0.32s; }
html[data-anim-level="minimal"] *,
html[data-motion="reduced"] * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}
@media (prefers-reduced-motion: reduce) {
  .sejp-enter, .sejp-shake, .sejp-glow-ok, .fc3d-card {
    animation: none !important;
    transition: none !important;
  }
}
