#axion-loader {
    --accent: #00ff88;
    --bg: #050505;
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
    /* Added padding to prevent content hitting screen edges on mobile */
    padding: 20px;
    background: radial-gradient(circle, #0a0a0a 0%, #000 100%);
}

/* CRT Vignette Overlay */
#axion-loader::before {
    content: " ";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 11;
}
/* Scanline Effect */
#axion-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            transparent 50%,
            rgba(0, 255, 136, 0.05) 50%
    );
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

.loader-content {
    /* Responsive Width:
       - 90% of screen on small devices
       - 400px maximum on large devices */
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loader-title {
    /* Fluid font size: scales between 0.6rem and 0.8rem */
    font-size: clamp(0.6rem, 2vw, 0.8rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
    /* Ensure text doesn't wrap awkwardly */
    white-space: nowrap;
}

/* Make the title feel high-tech */
.loader-title span {
    display: inline-block;
    animation: title-flicker 2s infinite alternate;
}

@keyframes title-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 5px var(--accent));
    }
    20%, 24%, 55% {
        opacity: 0.3;
        filter: none;
    }
}

.loader-meta {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    /* Slightly larger on mobile for legibility */
    font-size: clamp(8px, 1.5vw, 10px);
    color: rgba(0, 255, 136, 0.4);
    margin-bottom: 2px;
}

.loader-bar-wrapper {
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden; /* Clips the shimmer effect */
}

#loader-progress {
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: width 0.3s ease; /* Smooth progress movement */
}

/* Shimmer Animation */
.loader-bar-wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

@keyframes flicker {
    0% { opacity: 0.95; }
    100% { opacity: 1; }
}

/* Optional: Extra subtle flicker for the whole screen */
.loader-title, .loader-meta {
    animation: flicker 0.05s infinite alternate;
}

#loader-status {
    font-family: monospace;
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 2px;
    transition: opacity 0.1s ease;
}