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


/* Loader container: full screen, centered, and on top of everything */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff; /* Light theme background color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensures the loader is above all other content */
}

/* Styling for the spinner */
.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #f3f3f3;        /* Light theme gray ring */
    border-top: 8px solid #3498db;    /* Light theme colored ring */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Dark theme styles based on system preference */
@media (prefers-color-scheme: dark) {
    #loader {
        background: #121212; /* Dark theme background color */
    }

    .spinner {
        border: 8px solid #333333;        /* Dark theme gray ring */
        border-top: 8px solid #64b5f6;    /* Dark theme colored ring */
    }
}

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

/* Main application, initially hidden */
#app {
    display: none;
}
