#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color, white);
    background-image: var(--background-image, none);
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--foreground-color, black);
    font-family: 'Space Mono', monospace;
    transition: opacity 0.5s ease;
}

#loadingStatus {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--foreground-color, black);
}

#progressBarContainer {
    width: 80%;
    max-width: 600px;
    height: 20px;
    border: 3px solid var(--foreground-color, black);
    background: var(--background-color, white);
    padding: 2px;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: var(--foreground-color, black);
    position: relative;
    transition: width 0.2s linear;
}

#loadingIcon {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    image-rendering: pixelated;
}

#loadingPercentage {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--foreground-color, black);
}

#detailedStatus {
    margin-top: 5px;
    font-size: 0.8rem;
    opacity: 0.6;
    font-family: 'Space Mono', monospace;
    color: var(--foreground-color, black);
    min-height: 1.2em;
}

#loadingTips {
    margin-top: 25px;
    font-size: 1rem;
    font-style: italic;
    color: var(--foreground-color, black);
    opacity: 0.9;
    text-align: center;
    max-width: 80%;
    min-height: 1.5em;
    padding: 0 10px;
    animation: fadeTip 4s infinite;
}

@keyframes fadeTip {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.5; }
}