/* ========================================
   PAGE LOADER
======================================== */

.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Animated Geometric Shapes */
.loader-shapes {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.loader-shape {
    position: absolute;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(124, 255, 178, 0.3), rgba(127, 209, 255, 0.3));
    animation: shapeFloat 3s ease-in-out infinite;
}

.shape-1 {
    width: 40px;
    height: 40px;
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.shape-2 {
    width: 50px;
    height: 50px;
    top: 0;
    right: 0;
    border-radius: 50%;
    animation-delay: 0.5s;
}

.shape-3 {
    width: 35px;
    height: 35px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    animation-delay: 1s;
}

/* Spinner Ring */
.loader-spinner {
    width: 180px;
    height: 180px;
    border: 3px solid rgba(124, 255, 178, 0.1);
    border-top-color: #7CFFB2;
    border-right-color: #7FD1FF;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    position: relative;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 2px solid rgba(127, 209, 255, 0.1);
    border-top-color: #7FD1FF;
    border-left-color: #7CFFB2;
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

/* Name & Tagline */
.loader-text {
    text-align: center;
    z-index: 1;
}

.loader-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7CFFB2, #7FD1FF, #7CFFB2);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: gradientFlow 3s ease infinite;
    letter-spacing: 1px;
}

.loader-tagline {
    font-size: 0.95rem;
    color: #bfbfbf;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

/* Loading Progress Bar */
.loader-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7CFFB2, #7FD1FF);
    border-radius: 999px;
    animation: progressFill 2.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(124, 255, 178, 0.5);
}

/* ========================================
   LOADER ANIMATIONS
======================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
        opacity: 0.5;
    }
    50% {
        width: 70%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0.8;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .loader-name {
        font-size: 2rem;
    }

    .loader-tagline {
        font-size: 0.85rem;
    }

    .loader-spinner {
        width: 150px;
        height: 150px;
    }

    .loader-shapes {
        width: 160px;
        height: 160px;
    }

    .shape-1 {
        width: 30px;
        height: 30px;
    }

    .shape-2 {
        width: 40px;
        height: 40px;
    }

    .shape-3 {
        width: 28px;
        height: 28px;
    }
}