body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
}

#file-selector { display: none; }

#area {
    display: grid;
    column-gap: 40px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "info"
        "files"
        "upload";
    
    /* Fallback width & height */
    width: 100vw;
    min-height: 100vh;

    /* https://web.dev/viewport-units/ */
    width: 100dvw;
    min-height: 100dvh;
    
    background-color: white;
    color: black;
}

#info {
    grid-area: info;
    padding: 20px;
}
#info > h1 { margin-top: 0; }

#upload {
    grid-area: upload;
}

#upload button {
    color: white;
    background-color: black;
    border: none;
    width: 100%;
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    padding: 24px 0;
    cursor: pointer;
}

#upload button:disabled {
    cursor: not-allowed;
}

.uploading {
    cursor: wait;
}

.uploading #upload-button {
    animation-name: disco;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: step-start;
    cursor: wait;
}

.done #upload-button {
    background-color: green;
}

#files p {
    margin: 0;
    cursor: pointer;
}

#files p:hover {
    color: red;
}

#files {
    padding: 20px;
    grid-area: files;
    
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 10px 20px;
}

@media screen and (min-width: 500px) {
    #area {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto;
        grid-template-areas:
            "info files"
            "info upload";
    }

    #info {
        padding: 20px 0 20px 20px;
    }

    #files {
        padding: 20px 20px 0 0;
        overflow: scroll;
    }
}

@keyframes disco {
    0% { background-color: aqua; }
    10% { background-color: red; }
    20% { background-color: dodgerblue; }
    30% { background-color: fuchsia; }
    40% { background-color: bisque; }
    50% { background-color: coral; }
    60% { background-color: turquoise; }
    70% { background-color: yellow; }
    80% { background-color: hotpink; }
    90% { background-color: blue; }
    100% { background-color: salmon; }
}