/* 
  LOADER.CSS: Cyber Core Redesign 
  ---------------------------------
*/

/* --- Main Container --- */
.load-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    /* Deep black */
    z-index: 99999;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;

    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

.load-screen.hide-loader {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

/* --- Cyber Core Animation --- */
.cyber-core {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cyber-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    box-shadow: 0 0 15px rgba(255, 1, 55, 0.1);
    /* Subtle red glow */
}

/* Outer Ring */
.ring-outer {
    width: 100%;
    height: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: spin 8s linear infinite;
}

.ring-outer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    width: 4px;
    height: 15%;
    background: #ff0137;
    /* XEEA Red */
    transform: translateY(-50%);
    box-shadow: 0 0 10px #ff0137;
}

.ring-outer::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -2px;
    width: 4px;
    height: 15%;
    background: #ff0137;
    transform: translateY(-50%);
    box-shadow: 0 0 10px #ff0137;
}

/* Middle Ring */
.ring-middle {
    width: 70%;
    height: 70%;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    animation: spin-reverse 5s linear infinite;
}

/* Inner Ring */
.ring-inner {
    width: 40%;
    height: 40%;
    border: 1px dashed rgba(255, 1, 55, 0.8);
    animation: spin 10s linear infinite;
}

/* Central Scanner/Dot */
.core-scanner {
    width: 8px;
    height: 8px;
    background-color: #ff0137;
    border-radius: 50%;
    box-shadow: 0 0 20px #ff0137, 0 0 40px #ff0137;
    animation: pulse-core 2s ease-in-out infinite;
}

/* --- Loader Content & Text --- */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 300px;
    z-index: 2;
}

.loader-header {
    margin-bottom: 24px;
}

.loader-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 8px;
    position: relative;
    margin-bottom: 4px;
}

/* Glitch Effect placeholder for title if desired, or kept clean */
.loader-title::before {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    top: 0;
    width: 100%;
    color: rgba(255, 1, 55, 0.7);
    opacity: 0;
    /* animation: glitch 2s infinite; */
    /* Optional: subtle glitch */
}

.loader-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* --- Status & Progress --- */
.loader-status-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loader-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    /* JS sets 'width' here directly. We style it to fill the height. */
    height: 100%;
    background: #ff0137;
    width: 0%;
    /* Start at 0 */
    box-shadow: 0 0 10px #ff0137;
    transition: width 0.1s linear;
}

.loader-data {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-family: 'Space Mono', monospace;
    /* or Outfit/Space Grotesk */
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#loader-msg {
    color: rgba(255, 255, 255, 0.8);
}

.loader-percentage {
    color: #ff0137;
    font-weight: 700;
}

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

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

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }

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

@keyframes pulse-core {

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

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}