/* =============================================
   PAGE TRANSITIONS & LOADING STATES
   SPA page loading animations
   ============================================= */

/* Page Content Container */
.page-content {
    min-height: 100vh;
    position: relative;
}

/* Loading State */
.page-content.page-loading {
    pointer-events: none;
}

.page-content.page-loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 13, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Loading Spinner */
.page-content.page-loading::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 68, 0, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Page Transition Animations */
.page-content {
    animation: pageIn 0.3s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Page Styles */
.error-page {
    animation: fadeIn 0.4s ease-out;
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive Transitions */
@media (prefers-reduced-motion: reduce) {
    .page-content,
    .page-content.page-loading::after,
    .error-page,
    html {
        animation: none !important;
        transition: none !important;
    }
}
