/* Loading Screen Styles */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #172554 50%, #0891b2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.loader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.8));
}

/* Spinning ring around logo */
.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 3px solid rgba(6, 182, 212, 0.15);
    border-top-color: #06b6d4;
    border-right-color: #3b82f6;
    animation: spin 1.5s linear infinite;
}

.loader-ring::before {
    content: none;
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
    animation: textGlow 2s ease-in-out infinite;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 2px;
    animation: progressAnimation 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* Animations */
@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.8));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(6, 182, 212, 1)) drop-shadow(0 0 80px rgba(59, 130, 246, 0.6));
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(6, 182, 212, 1), 0 0 30px rgba(59, 130, 246, 0.8);
    }
}

@keyframes progressAnimation {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .loader-logo-container {
        width: 150px;
        height: 150px;
    }

    .loader-ring {
        width: 180px;
        height: 180px;
    }

    .loader-text {
        font-size: 1.2rem;
    }

    .loader-progress {
        width: 150px;
    }
}