﻿/* ==========================================
   Fixed CSS (Pixel-Perfect Vertical & Horizontal Center)
   ========================================== */

:root {
    --primary-purple-dark: #12002b;
    --primary-purple: #2a085c;
    --brand-orange: #E85D2B;
    --brand-green: #008B45;
    --text-white: #ffffff;
}

.preloaderBox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    z-index: 99999;
    overflow: hidden;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

/* Background Soft Glow (Clean Background) */
.preloader-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.preloader-orb-1 {
    width: 300px;
    height: 300px;
    background: var(--brand-orange);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.preloader-orb-2 {
    width: 450px;
    height: 450px;
    background: var(--primary-purple-dark);
    bottom: -100px;
    right: -100px;
}

.preloader-orb-3 {
    display: none;
}

/* Main Content Exact Dead Center Fix */
.preloader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Exact Center Alignment with translateY compensate */
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
}

/* Logo Setup */
.preloader-logo {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo-inner {
    width: 65px;
    height: 65px;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    animation: logoPulse 2s ease-in-out infinite;
}

    .preloader-logo-inner svg {
        width: 100%;
        height: 100%;
    }

.preloader-logo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px dashed rgba(255, 255, 255, 0.2);
    border-top-color: var(--brand-orange);
    border-bottom-color: var(--brand-green);
    border-radius: 50%;
    animation: spinRing 4s linear infinite;
}

@keyframes spinRing {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Pure White Brand Name */
.preloader-brand {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
    line-height: 1.1;
}

.preloader-pro, .preloader-paper {
    color: var(--text-white) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Tagline Styled for Bharat 2027 */
.preloader-tagline {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}

    .preloader-tagline::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--brand-green);
    }

/* Loader Progress Section */
.preloader-loader {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.preloader-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.preloader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-green)) !important;
    border-radius: 10px;
    box-shadow: 0 0 8px var(--brand-orange);
    animation: loadingBarSlide 1.6s ease-in-out infinite;
}

@keyframes loadingBarSlide {
    0% {
        left: -50%;
        width: 30%;
    }

    50% {
        width: 60%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

/* Dots Pulse */
.preloader-dots {
    display: flex;
    gap: 8px;
}

    .preloader-dots span {
        width: 7px;
        height: 7px;
        background-color: var(--text-white);
        border-radius: 50%;
        opacity: 0.3;
        animation: dotsBounce 1.4s infinite ease-in-out both;
    }

        .preloader-dots span:nth-child(1) {
            animation-delay: -0.32s;
            background-color: var(--brand-orange);
        }

        .preloader-dots span:nth-child(2) {
            animation-delay: -0.16s;
            background-color: var(--text-white);
        }

        .preloader-dots span:nth-child(3) {
            background-color: var(--brand-green);
        }

@keyframes dotsBounce {
    0%, 80%, 100% {
        transform: scale(0.5);
        opacity: 0.3;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Animated Wavy Text (Pure White) */
.preloader-text {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 4px;
    display: flex;
}

    .preloader-text span {
        display: inline-block;
        color: var(--text-white);
        animation: waveText 1.5s infinite ease-in-out;
        animation-delay: calc(0.1s * var(--d));
    }

@keyframes waveText {
    0%, 40%, 100% {
        transform: translateY(0);
        color: var(--text-white);
    }

    20% {
        transform: translateY(-5px);
        color: var(--brand-orange);
    }
}
