/* --- 7-Color Loader Styles --- */
:root {
    --l-red: #FF4D4D;
    --l-orange: #EE663C;
    --l-yellow: #FFD93D;
    --l-green: #6BCB77;
    --l-cyan: #00E0FF;
    --l-blue: #3A5CA9;
    --l-purple: #8D58FF;
    --bg-loader: #ffffff;
}

/* Prevent scrolling when loader is active */
body.loading {
    overflow: hidden;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-loader);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* The Spinner Container */
.spinner-core {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The 7 Rings */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: currentColor;
    animation: spin var(--duration) cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

.ring:nth-child(1) {
    color: var(--l-red);
    width: 100%;
    height: 100%;
    --duration: 1.5s;
    border-width: 6px;
}

.ring:nth-child(2) {
    color: var(--l-orange);
    width: 85%;
    height: 85%;
    --duration: 1.8s;
    animation-direction: reverse;
    border-width: 5px;
}

.ring:nth-child(3) {
    color: var(--l-yellow);
    width: 70%;
    height: 70%;
    --duration: 2.1s;
    border-width: 5px;
}

.ring:nth-child(4) {
    color: var(--l-green);
    width: 55%;
    height: 55%;
    --duration: 2.4s;
    animation-direction: reverse;
    border-width: 4px;
}

.ring:nth-child(5) {
    color: var(--l-cyan);
    width: 40%;
    height: 40%;
    --duration: 2.7s;
    border-width: 4px;
}

.ring:nth-child(6) {
    color: var(--l-blue);
    width: 25%;
    height: 25%;
    --duration: 3s;
    animation-direction: reverse;
    border-width: 3px;
}

.ring:nth-child(7) {
    color: var(--l-purple);
    width: 10%;
    height: 10%;
    --duration: 3.3s;
    border-width: 3px;
}

/* Center Logo/Text */
.loader-logo {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--l-blue);
    animation: pulse-text 2s ease-in-out infinite;
    z-index: 10;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.loader-logo span {
    background: linear-gradient(45deg, var(--l-orange), var(--l-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading Text below */
.loading-text {
    position: absolute;
    bottom: -60px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: linear-gradient(90deg, var(--l-red), var(--l-orange), var(--l-yellow), var(--l-green), var(--l-cyan), var(--l-blue), var(--l-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-text {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

/* --- 7-Color Loader Styles --- */
:root {
    --l-red: #FF4D4D;
    --l-orange: #EE663C;
    --l-yellow: #FFD93D;
    --l-green: #6BCB77;
    --l-cyan: #00E0FF;
    --l-blue: #3A5CA9;
    --l-purple: #8D58FF;
    --bg-loader: #ffffff;
}

/* Prevent scrolling when loader is active */
body.loading {
    overflow: hidden;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-loader);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* The Spinner Container */
.spinner-core {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The 7 Rings */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: currentColor;
    animation: spin var(--duration) cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

.ring:nth-child(1) {
    color: var(--l-red);
    width: 100%;
    height: 100%;
    --duration: 1.5s;
    border-width: 6px;
}

.ring:nth-child(2) {
    color: var(--l-orange);
    width: 85%;
    height: 85%;
    --duration: 1.8s;
    animation-direction: reverse;
    border-width: 5px;
}

.ring:nth-child(3) {
    color: var(--l-yellow);
    width: 70%;
    height: 70%;
    --duration: 2.1s;
    border-width: 5px;
}

.ring:nth-child(4) {
    color: var(--l-green);
    width: 55%;
    height: 55%;
    --duration: 2.4s;
    animation-direction: reverse;
    border-width: 4px;
}

.ring:nth-child(5) {
    color: var(--l-cyan);
    width: 40%;
    height: 40%;
    --duration: 2.7s;
    border-width: 4px;
}

.ring:nth-child(6) {
    color: var(--l-blue);
    width: 25%;
    height: 25%;
    --duration: 3s;
    animation-direction: reverse;
    border-width: 3px;
}

.ring:nth-child(7) {
    color: var(--l-purple);
    width: 10%;
    height: 10%;
    --duration: 3.3s;
    border-width: 3px;
}

/* Center Logo/Text */
.loader-logo {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--l-blue);
    animation: pulse-text 2s ease-in-out infinite;
    z-index: 10;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.loader-logo span {
    background: linear-gradient(45deg, var(--l-orange), var(--l-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading Text below */
.loading-text {
    position: absolute;
    bottom: -60px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: linear-gradient(90deg, var(--l-red), var(--l-orange), var(--l-yellow), var(--l-green), var(--l-cyan), var(--l-blue), var(--l-purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-text {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}