/* Global loader spinner — shown until body.page-loaded */

.preloader {
    display: none !important;
}

.site-page-skeleton {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: var(--f-bg-base, #0a0b10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Ensure admin has appropriate background (admin is light theme) */
.admin-page-skeleton {
    background: #fdfdfd;
}

body.page-loaded .site-page-skeleton {
    opacity: 0;
    visibility: hidden;
}

.site-page-skeleton__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Premium Futuristic Loader */
.premium-loader {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-loader-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.premium-loader-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    border-top-color: #00ff88;
    border-bottom-color: #00ff88;
    animation: premiumSpin1 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4), inset 0 0 15px rgba(0, 255, 136, 0.4);
}

.premium-loader-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    border-left-color: #ffaa00;
    border-right-color: #ffaa00;
    animation: premiumSpin2 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.4), inset 0 0 10px rgba(255, 170, 0, 0.4);
}

.premium-loader-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    border-top-color: #00c868;
    border-bottom-color: #00c868;
    animation: premiumSpin1 1s linear infinite;
}

.premium-loader-core {
    width: 14%;
    height: 14%;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    animation: premiumPulseCore 1s ease-in-out infinite alternate;
}

/* Admin specific colors (darker green for admin light theme) */
.admin-page-skeleton .premium-loader-ring:nth-child(1) {
    border-top-color: #146f38;
    border-bottom-color: #146f38;
    box-shadow: 0 0 15px rgba(20, 111, 56, 0.3), inset 0 0 15px rgba(20, 111, 56, 0.3);
}
.admin-page-skeleton .premium-loader-ring:nth-child(2) {
    border-left-color: #219653;
    border-right-color: #219653;
    box-shadow: 0 0 10px rgba(33, 150, 83, 0.3), inset 0 0 10px rgba(33, 150, 83, 0.3);
}
.admin-page-skeleton .premium-loader-ring:nth-child(3) {
    border-top-color: #1a964c;
    border-bottom-color: #1a964c;
}
.admin-page-skeleton .premium-loader-core {
    background: #146f38;
    box-shadow: 0 0 20px rgba(20, 111, 56, 0.5);
}

@keyframes premiumSpin1 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes premiumSpin2 {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes premiumPulseCore {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; }
}

.global-spinner-text {
    font-size: 13px;
    font-weight: 800;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: premiumTextPulse 1.5s ease-in-out infinite alternate;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.admin-page-skeleton .global-spinner-text {
    color: #146f38;
    text-shadow: none;
}

@keyframes premiumTextPulse {
    0% { opacity: 0.4; letter-spacing: 4px; }
    100% { opacity: 1; letter-spacing: 7px; }
}
