body {
    margin: 0;
    overflow: hidden; /* Prevent scrollbars */
    background-color: #000; /* Black background */
}

canvas {
    display: block; /* Remove extra space below canvas */
}

#sidebar {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 250px;
    max-height: 90vh; /* Limit height */
    background-color: rgba(40, 40, 50, 0.85); /* Dark semi-transparent */
    color: #eee;
    padding: 15px;
    border-radius: 5px;
    font-family: sans-serif;
    font-size: 14px;
    overflow-y: auto; /* Add scroll if content overflows */
    display: none; /* Hidden by default */
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 10; /* Ensure it's above the canvas */
}

#sidebar h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #fff;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

#sidebar p {
    margin: 5px 0;
}

#sidebar strong {
    color: #aaa;
}

/* --- Loading Overlay --- */
#loading-overlay {
    position: fixed; /* Cover the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top */
    color: white;
    font-family: sans-serif;
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

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

.progress-bar-container {
    width: 60%;
    max-width: 400px;
    height: 20px;
    background-color: #555;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

#progress-bar {
    width: 0%; /* Start empty */
    height: 100%;
    background-color: #4CAF50; /* Green */
    border-radius: 10px;
    transition: width 0.2s ease-out; /* Smooth transition */
}

#loading-text {
    font-size: 1.1em;
}
