/* ─── Page Loader ─── */
#ph-page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--ph-bg, #0a0a0f);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#ph-page-loader.ph-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Top progress bar */
#ph-loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #ff4500, #ff6c3b, #ff4500);
    background-size: 200% 100%;
    z-index: 100000;
    border-radius: 0 2px 2px 0;
    animation: ph-bar-grow 0.8s ease forwards, ph-bar-shimmer 1.2s linear infinite;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.6), 0 0 20px rgba(255, 69, 0, 0.3);
}

@keyframes ph-bar-grow {
    0%   { width: 0%; }
    40%  { width: 55%; }
    70%  { width: 78%; }
    100% { width: 90%; }
}

@keyframes ph-bar-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Spinner ring */
.ph-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid rgba(255, 69, 0, 0.15);
    border-top-color: #ff4500;
    border-right-color: #ff6c3b;
    animation: ph-spin 0.75s linear infinite;
    box-shadow: 0 0 18px rgba(255, 69, 0, 0.25);
}

@keyframes ph-spin {
    to { transform: rotate(360deg); }
}

/* Logo / wordmark inside loader */
.ph-loader-logo {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    animation: ph-pulse-text 1.4s ease-in-out infinite;
}

@keyframes ph-pulse-text {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 0.65; }
}
