/* 
 * Premium Stitch Loader System
 * Color: #FF5200 (HTEC Orange)
 */

.premium-loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 41, 0.75); /* Deep dark blue consistent with theme */
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.6s;
}

.premium-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.loader-orb {
    width: 100%;
    height: 100%;
}

.loader-orb circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transform-origin: center;
}

.loader-orb .track {
    stroke: rgba(255, 255, 255, 0.05);
}

.loader-orb .progress {
    stroke: #FF5200; /* Stitch Primary Orange */
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 283;
    animation: orb-smooth-rotate 2s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
    filter: drop-shadow(0 0 15px rgba(255, 82, 0, 0.6));
}

.loader-text {
    margin-top: 2rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
    animation: text-pulse 2s ease-in-out infinite;
}

@keyframes orb-smooth-rotate {
    0% {
        stroke-dashoffset: 283;
        transform: rotate(0deg);
    }
    50% {
        stroke-dashoffset: 40;
        transform: rotate(180deg);
    }
    100% {
        stroke-dashoffset: 283;
        transform: rotate(360deg);
    }
}

.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    object-fit: contain;
    animation: logo-gentle-pulse 2.5s ease-in-out infinite;
    z-index: 2;
}

@keyframes logo-gentle-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.9; transform: translateY(-2px); }
}

/* Glass Orb Center Decoration */
.loader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05);
}
