:root {
    --cosmic-navy: #0A0E1C;
    --magenta-rose: #802040;
    --neon-cyan: #00E5FF;
}

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--cosmic-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
    color: white;
}

.stars-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--cosmic-navy) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.1'%3E%3Ccircle cx='400' cy='400' r='1'/%3E%3Ccircle cx='100' cy='200' r='1'/%3E%3Ccircle cx='700' cy='600' r='1'/%3E%3Ccircle cx='300' cy='500' r='1'/%3E%3Ccircle cx='500' cy='100' r='1'/%3E%3Ccircle cx='200' cy='700' r='1'/%3E%3Ccircle cx='600' cy='300' r='1'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    animation: shimmer 10s linear infinite;
}

@keyframes shimmer {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    z-index: 10;
}

.logo-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    margin-top: -2rem;
    width: 75%;
    height: auto;
    animation: logo-pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(128, 32, 64, 0.5));
}

@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(128, 32, 64, 0.8));
    }
}

.logo-glow-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid var(--magenta-rose);
    border-radius: 50%;
    opacity: 0.2;
    animation: ring-rotate 10s linear infinite;
}

@keyframes ring-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.boot-sequence {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
}

.status-text {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--neon-cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.scanline-container {
    position: relative;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.scanline-bar {
    position: absolute;
    width: 40px;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    from {
        left: -40px;
    }
    to {
        left: 100%;
    }
}

.loading-bar-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1px;
    overflow: hidden;
    display: none; /* Removed as per requirement */
}

/* Activation Animation */
.loading-container.activated {
    animation: fade-out 0.8s ease-in forwards;
    pointer-events: none;
}

.loading-container.activated .loader-logo {
    animation: logo-activation 0.8s ease-out forwards;
}

.loading-container.activated .logo-glow-ring {
    animation: ring-expansion 0.8s ease-out forwards;
}

@keyframes logo-activation {
    0% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 10px rgba(128, 32, 64, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: brightness(2) drop-shadow(0 0 30px var(--magenta-rose));
    }
    100% {
        transform: scale(1.2);
        filter: brightness(3) drop-shadow(0 0 50px var(--neon-cyan));
        opacity: 0;
    }
}

@keyframes ring-expansion {
    0% {
        transform: scale(1);
        opacity: 0.2;
        border-width: 1px;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
        border-width: 2px;
        border-color: var(--neon-cyan);
    }
    100% {
        transform: scale(2);
        opacity: 0;
        border-width: 4px;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
