/* Preloader Container */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Portal Animation Container */
.portal-loader {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glowing Rings */
.portal-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-bottom-color: #fff;
    animation: spin 2s linear infinite;
}

.portal-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-duration: 3s;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.portal-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    animation-duration: 2s;
    animation-direction: reverse;
    border-left-color: #fff;
    border-right-color: #fff;
    border-top-color: transparent;
    border-bottom-color: transparent;
    opacity: 0.7;
}

.portal-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    animation-duration: 1.5s;
    border: 2px dashed #fff;
    opacity: 0.5;
}

/* Center Text */
.loader-text {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    50% { opacity: 0.8; transform: scale(0.95); text-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
}

/* Hide Class */
.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
