/* ============================================
   PAGE LOADER - ALL VERSIONS
   ============================================ */

/* ── Loader Overlay ── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg, #0f0f0f);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Loader Logo ── */
.loader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
}
.loader-logo-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    animation: loaderPulse 1.5s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(192, 57, 43, 0.3);
}
.loader-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
.loader-logo-text .logo-accent {
    color: var(--primary, #c0392b);
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(192, 57, 43, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 48px rgba(192, 57, 43, 0.5); }
}

/* ── Progress Bar ── */
.loader-progress-container {
    width: 240px;
    margin-top: 32px;
}
.loader-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ── Floating particles ── */
.loader-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.loader-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary, #c0392b);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 4s ease-in-out infinite;
}
.loader-particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 3.5s; }
.loader-particle:nth-child(2) { left: 80%; top: 30%; animation-delay: 0.5s; animation-duration: 4.2s; }
.loader-particle:nth-child(3) { left: 25%; top: 75%; animation-delay: 1s; animation-duration: 3.8s; }
.loader-particle:nth-child(4) { left: 70%; top: 80%; animation-delay: 1.5s; animation-duration: 4.5s; }
.loader-particle:nth-child(5) { left: 50%; top: 15%; animation-delay: 0.3s; animation-duration: 3.2s; }
.loader-particle:nth-child(6) { left: 90%; top: 60%; animation-delay: 0.8s; animation-duration: 4s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; }
}

/* ── Version-specific colors ── */
.v1 .page-loader { background: #0f0f0f; }
.v1 .loader-logo-icon { box-shadow: 0 8px 32px rgba(255, 107, 43, 0.3); }
.v1 .loader-particle { background: #ff6b2b; }

.v2 .page-loader { background: #1a1f16; }
.v2 .loader-logo-icon { background: linear-gradient(135deg, #6b8f71, #8aab8f); box-shadow: 0 8px 32px rgba(107, 143, 113, 0.3); }
.v2 .loader-particle { background: #6b8f71; }
