html, body { 
    margin: 0; 
    padding: 0; 
    height: 100%; 
    overflow: hidden; 
}

canvas { 
    display: block; 
} /* full‐screen WebGL canvas */

/* --- Loading Screen Styles --- */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.75s ease; /* Smooth fade-out */
}

/* Class to hide the overlay */
#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Allows clicks to pass through after hiding */
}

.loading-box {
    text-align: center;
    color: #f0f0f0;
}

.loading-box h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 40px;
    margin-bottom: 25px;
}

.progress-bar-container {
    width: 400px;
    max-width: 80vw;
    height: 15px;
    background-color: #444;
    border-radius: 5px;
    margin: 0 auto;
    overflow: hidden; /* Ensures the inner bar respects the border radius */
}

.progress-bar {
    width: 0%; /* Starts at 0% */
    height: 100%;
    background-color: #007aff; /* Professional blue color */
    border-radius: 5px;
    transition: width 0.4s ease-in-out; /* Smooth progress animation */
}

#progress-text {
    margin-top: 15px;
    font-family: monospace;
    font-size: 25px;
    color: #aaa;
}