/**
 * Advanced Animations Styles - Sprint 7
 * CSS animations and transitions
 */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;

    to {
        opacity: 1;

@keyframes fadeOut {
    from {
        opacity: 1;

    to {
        opacity: 0;

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);

    to {
        opacity: 1;
        transform: translateY(0);

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);

    to {
        opacity: 0;
        transform: translateY(20px);

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);

    to {
        opacity: 1;
        transform: translateY(0);

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);

    to {
        opacity: 1;
        transform: translateX(0);

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);

    to {
        opacity: 1;
        transform: translateX(0);

@keyframes pulse {
    0%, 100% {
        transform: scale(1);

    50% {
        transform: scale(1.05);

@keyframes shake {
    0%, 100% {
        transform: translateX(0);

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);

    20%, 40%, 60%, 80% {
        transform: translateX(5px);

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);

    50% {
        transform: translateY(-10px);

@keyframes spin {
    from {
        transform: rotate(0deg);

    to {
        transform: rotate(360deg);

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);

    to {
        transform: rotate(0deg);

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--color-bg-primary-rgb, 26, 26, 26), 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;

.loading-spinner {
    position: relative;
    width: calc(var(--spacing-3xl) * 1.25);
    height: calc(var(--spacing-3xl) * 1.25);

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--color-info, #4a90e2);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--color-success, #5cb85c);
    animation: spin-reverse 1.2s linear infinite;

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--color-warning, #ffc107);
    animation: spin 1.5s linear infinite;

/* ============================================
   STATE TRANSITIONS
   ============================================ */

.state-transitioning {
    transition: all 0.3s ease;

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.animated {
    animation-fill-mode: both;

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;

    .loading-overlay,
    .scroll-animate {
        transition: none !important;

/* Performance optimization */
.animations-throttled * {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;

/* GPU acceleration */
.animated,
.scroll-animate,
.state-transitioning {
    will-change: transform, opacity;
    transform: translateZ(0);

/**
 * Screen Transition Improvements
 * Review the .state-transitioning CSS class in public/css/advancedAnimations.css. Ensure it uses design system variables, aligns to 8px grid, and follows best practices.
 */

}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}