/* src/styles/animations.css */ /* Keyframes for molecule spinner */ @keyframes orbit-1 { 0% { transform: translate(-50%, 0) rotate(0deg) translateY(-28px) rotate(0deg); } 100% { transform: translate(-50%, 0) rotate(360deg) translateY(-28px) rotate(-360deg); } } @keyframes orbit-2 { 0% { transform: translateY(-50%) rotate(0deg) translateX(28px) rotate(0deg); } 100% { transform: translateY(-50%) rotate(360deg) translateX(28px) rotate(-360deg); } } @keyframes orbit-3 { 0% { transform: translate(-50%, 0) rotate(0deg) translateY(28px) rotate(0deg); } 100% { transform: translate(-50%, 0) rotate(360deg) translateY(28px) rotate(-360deg); } } @keyframes orbit-4 { 0% { transform: translateY(-50%) rotate(0deg) translateX(-28px) rotate(0deg); } 100% { transform: translateY(-50%) rotate(360deg) translateX(-28px) rotate(-360deg); } } /* Animation classes */ .animate-orbit-1 { animation: orbit-1 4s linear infinite; } .animate-orbit-2 { animation: orbit-2 4s linear infinite; animation-delay: -1s; } .animate-orbit-3 { animation: orbit-3 4s linear infinite; animation-delay: -2s; } .animate-orbit-4 { animation: orbit-4 4s linear infinite; animation-delay: -3s; } /* Fade in animation */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .animate-fade-in { animation: fadeIn 0.5s ease-in-out; } /* Slide in animations */ @keyframes slideInFromRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes slideInFromLeft { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes slideInFromTop { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes slideInFromBottom { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .animate-slide-in-right { animation: slideInFromRight 0.3s ease-out; } .animate-slide-in-left { animation: slideInFromLeft 0.3s ease-out; } .animate-slide-in-top { animation: slideInFromTop 0.3s ease-out; } .animate-slide-in-bottom { animation: slideInFromBottom 0.3s ease-out; } /* Pulse animation for bonds in molecule visualization */ @keyframes pulseBond { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.7; } } .animate-pulse-bond { animation: pulseBond 2s infinite; } /* Rotation animation */ @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .animate-rotate { animation: rotate 5s linear infinite; } /* Scale animation */ @keyframes scale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } .animate-scale { animation: scale 3s ease-in-out infinite; } /* Staggered animations for lists */ .stagger-children > * { opacity: 0; animation: slideInFromBottom 0.3s ease-out forwards; } .stagger-children > *:nth-child(1) { animation-delay: 0.1s; } .stagger-children > *:nth-child(2) { animation-delay: 0.2s; } .stagger-children > *:nth-child(3) { animation-delay: 0.3s; } .stagger-children > *:nth-child(4) { animation-delay: 0.4s; } .stagger-children > *:nth-child(5) { animation-delay: 0.5s; } .stagger-children > *:nth-child(6) { animation-delay: 0.6s; } .stagger-children > *:nth-child(7) { animation-delay: 0.7s; } .stagger-children > *:nth-child(8) { animation-delay: 0.8s; } .stagger-children > *:nth-child(9) { animation-delay: 0.9s; } .stagger-children > *:nth-child(10) { animation-delay: 1s; }