.preloader {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 99999;
    background-color: var(--secondary-color);
}

.preloader-inner {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 150px;
    height: 150px;
    border: 1px #fff solid;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
}

.loader.custom-loader {
    border: medium none;
    left: 0;
    margin: 0 auto;
    right: 0;
}

.loader .loading {
    font-size: 13px;
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 14px;
    left: 0;
    top: 50%;
    margin-top: 28px;
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loader .line {
    width: 10px;
    height: 2px;
    background: #fff;
    position: absolute;
}

.loader .line:nth-child(1) {
    left: 16px;
    top: 50%;
    margin-top: -1px;
}

.loader .line:nth-child(2) {
    transform: rotate(45deg);
    left: 33px;
    top: 33px;
}

.loader .line:nth-child(3) {
    top: 16px;
    left: 50%;
    width: 2px;
    height: 10px;
}

.loader .line:nth-child(4) {
    transform: rotate(135deg);
    right: 33px;
    top: 33px;
}

.loader .line:nth-child(5) {
    right: 16px;
    top: 50%;
    margin-top: -1px;
}

.loader .line:nth-child(6) {
    transform: rotate(45deg);
    right: 33px;
    bottom: 33px;
    background: var(--primary-color);
}

.loader-circle-1 {
    width: 138px;
    height: 138px;
    left: 5px;
    top: 5px;
    border: 1px #fff solid;
    border-radius: 50%;
    position: absolute;
    border-right-color: transparent;
    animation: spin 3s linear infinite;
}

.loader-circle-2 {
    width: 126px;
    height: 126px;
    left: 5px;
    top: 5px;
    border: 1px transparent solid;
    border-radius: 50%;
    position: absolute;
    border-right-color: var(--primary-color);
    animation: spin 5s linear infinite;
}

.loader .subline {
    position: absolute;
    width: 3px;
    height: 2px;
    background: #fff;
}

.loader .subline:nth-child(7) {
    transform: rotate(22.5deg);
    left: 21px;
    top: 50px;
}

.loader .subline:nth-child(8) {
    transform: rotate(67.5deg);
    left: 50px;
    top: 21px;
}

.loader .subline:nth-child(9) {
    transform: rotate(112.5deg);
    right: 50px;
    top: 21px;
}

.loader .subline:nth-child(10) {
    transform: rotate(157.5deg);
    right: 21px;
    top: 50px;
}

.loader .subline:nth-child(11) {
    transform: rotate(22.5deg);
    right: 20px;
    bottom: 49px;
    background: var(--primary-color);
}

.loader .needle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px #fff solid;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -8px 0 0 -8px;
    z-index: 1;
    animation: pegIt 3s infinite ease-in-out;
}

.loader .needle:before {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 3.5px 50px 3.5px 0;
    border-color: transparent var(--primary-color) transparent transparent;
    position: absolute;
    right: 50%;
    top: 50%;
    margin: -3.5px 0 0 0;
    border-radius: 0 50% 50% 0;
}

@keyframes pegIt {
    0% {
        transform: rotate(0deg);
    }
    16% {
        transform: rotate(75deg);
    }
    25% {
        transform: rotate(55deg);
    }
    30% {
        transform: rotate(90deg);
    }
    36% {
        transform: rotate(170deg);
    }
    42% {
        transform: rotate(150deg);
    }
    50% {
        transform: rotate(227deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@-webkit-keyframes pegIt {
    0% {
        -webkit-transform: rotate(0deg);
    }
    16% {
        -webkit-transform: rotate(75deg);
    }
    25% {
        -webkit-transform: rotate(55deg);
    }
    30% {
        -webkit-transform: rotate(90deg);
    }
    36% {
        -webkit-transform: rotate(170deg);
    }
    42% {
        -webkit-transform: rotate(150deg);
    }
    50% {
        -webkit-transform: rotate(227deg);
    }
    100% {
        -webkit-transform: rotate(0deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Typing text container - positioned ABOVE the loader */
.typing-text-container {
    position: absolute;
    top: calc(50% - 115px);
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    height: 25px;
    overflow: visible;
}

/* Typewriter text */
.typewriter-text {
    display: inline-block;
    white-space: nowrap;
    position: relative;
    font-family: monospace; /* Gives it a typewriter feel */
}

/* Style for the "Expert" word */
.expert {
    color: #d70006;
    font-weight: 700;
}

/* Cursor styling */
.typewriter-text::after {
    content: '|';
    color: #fff;
    font-weight: bold;
    animation: blink 1s infinite;
    margin-left: 0px;
}

/* Cursor blink animation */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}