/* ============================================
   App Router Styles
   ============================================ */

/* === LOADING INDICATOR === */
#app-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

#app-loader.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

[data-theme="dark"] #app-loader {
    background: rgba(23, 23, 23, 0.9);
}

.app-loader-content {
    text-align: center;
    color: var(--text-primary, #171717);
}

.app-loader-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-light, #e5e5e5);
    border-top-color: var(--accent, #ec4899);
    border-radius: 50%;
    animation: app-loader-spin 0.8s linear infinite;
}

@keyframes app-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.app-loader-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #525252);
}

/* === PAGE TRANSITIONS === */
body {
    transition: opacity 0.2s ease-in-out;
}

/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

/* === PRELOAD INDICATOR (Optional) === */
a[href] {
    position: relative;
}

a[href]:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent, #ec4899);
    animation: preload-indicator 0.3s ease;
}

@keyframes preload-indicator {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* === NAVIGATION ACTIVE STATE === */
a[href].active {
    color: var(--accent, #ec4899);
    font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .app-loader-content {
        font-size: 12px;
    }
    
    .app-loader-spinner {
        width: 32px;
        height: 32px;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    #app-loader,
    body,
    html {
        transition: none;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

