html {
    height: 100%;
    background: rgb(135,222,255);
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 10px,rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px),
    linear-gradient(36deg, rgba(135,222,255,1) 0%, rgba(145,254,246,1) 100%);
    font-family: monospace, monospace;
}

:is(input[type=checkbox], input[type=number]):focus, input[type=button]:focus-visible    {
    outline: 0.2rem ridge rgb(138, 222, 255);
}

main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

/* header text */
header {
    text-align: center;
}

header p {
    max-width: 40%;
    margin: 0.7rem auto;
    padding: 0.3rem;
    border-radius: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
}

/* input criteria */
.criteria, .output {
    margin: 2rem auto;
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    background: #1a293d;
    box-shadow: -0.2rem 0.2rem #060e18;
    color: white;
}

.criteria .form-item {
    display: flex;
    flex-wrap: wrap;
    margin: 0.5rem 3rem;
}

.criteria .form-item > :is(label, input[type$="checkbox"], span) {
    padding: 0 0.5rem;
}

label + span {
    padding-left: 0px !important;
    overflow-x: hidden;
    word-break: break-all;
    opacity: 75%;
    word-wrap: break-word;
}

input[type=number] {
    max-width: 1.8rem;
    max-height: 1rem;
    border: none;
    border-radius: 0.5rem;
    text-align: center;
    -moz-appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.error {
    min-height: 1.5em;
    margin: 0 auto;
    color: #ff0000;
    font-size: 18px;
    text-align: center;
}

.btn {
    margin: 0 auto 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 2rem;
    background: #dfdfdf;
    box-shadow: 0px 4px 0px #999;
    color: #000;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #fff;
    box-shadow: 0px 4px 0px #bbb;
    color: #1a293d;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0px 2px 0px #bbb;
}

/* output display */
.output {
    display: flex;
    justify-content: center;
    min-width: 30%;
    max-width: 600px;
    overflow-x: hidden;
    word-break: break-all;
    word-wrap: break-word;
}

.modal {
    position: absolute;
    padding: 0.5rem 0.75rem;
    transform: translateY(-1.3rem);
    border-radius: 1rem;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0%;
    transition: opacity 0.1s linear;
    user-select: none;
}

.modal.show {
    opacity: 100%;
}

.output p {
    width: 75%;
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    background-color: #333;
    box-shadow: -0.2rem 0.2rem 0.05rem #111 inset;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

@media only screen and (max-width: 600px) {
    html {
        font-size: smaller;
    }

    header h1 {
        font-size: 1.5rem;
        margin: 0.5rem 0 0;
    }
    
    header p {
        max-width: 90%;
        margin-bottom: 0;
    }
    
    .criteria, .output {
        margin: 1rem;
    }

    #generated {
        font-size: 0.9rem;
    }
}
