body {
    width: 100%;
    height: 100%;
    background: #e5e5e5;
    margin: 0;
    padding: 0;
    font-family: "Roboto Mono", monospace;
}

section {
    max-width: 95%;
    width: 500px;
    margin: 15px auto 0;
    text-align: center;
    background: #fff;
    border-radius: 3px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 19px;
    box-sizing: border-box;
}

textarea, button {
    display: block;
    box-sizing: border-box;
    outline: 0;
    padding: 5px;
    margin-bottom: 12px;
    border-radius: 4px;
}

button#generate {
    background: #3F51B5;
    color: #fff;
    border: 0;
    height: 40px;
    width: 150px;
    font-size: 15px;
    margin: auto;
    cursor: pointer;
}

textarea.prompt {
    border: 1px solid #888;
    height: 190px;
    resize: vertical;
}
textarea.negative_prompt {
    border: 1px solid #888;
    height: 50px;
    resize: vertical;
}
input[type="number"] {
    border: 1px solid #888;
    height: 30px;
    margin-bottom: 7px;
    resize: vertical;
    border-radius: 4px;
    text-indent: 2px;
}
button#generate:hover {
    opacity: 0.9;
}

div#preview {
    width: 100%;
    min-height: 300px;
    max-width: 90%;
    margin: 20px auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    text-align: center;
}

div#preview.loading:before {
    content: "Loading Image...";
    display: block;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 20px;
}

#preview img {
    display: block;
    width: auto;
    height: 100%;
    object-fit: scale-down;
}

button#generate:disabled {
    opacity: 0.9;
    background: #9d9d9d;
    cursor: auto;
}
footer{
    margin-top: 100px;
    width: 100%;
    padding-bottom: 40px;
    text-align: center;
}
footer a{
    color: #000;
    display: block;
    margin: 0 auto;
    text-decoration: none;
}
@media screen and (min-width: 768px){
    main {
        display: flex;
        padding: 0 25px;
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }
    
    section{
        height: 94vh;
    margin-top: 24px;
    width: 40%;
    }

    div#preview{
        max-height: 94vh;
        margin-top: 24px;
        padding: 0 50px;
        width: 60%;
    }
}

select.model {
    padding: 6px;
    outline: 0;
    margin: 0 auto 10px;
    max-width: 100%;
}