/* Misc */

a {
    text-decoration: none;
}

/* Organization */

html {
    /* Space */
    padding: 0;
    margin:  0;

    /* Size */
    width:  100%;
    height: 100%;

    /* Layout */
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     flex-start;
    justify-content: stretch;
}

body {
    /* Space */
    padding: 0;
    margin:  0;

    /* Size */
    width: min(120em, 100%);

    /* Alignment */
    text-align: left;

    /* Layout */
    flex: 1 1 auto;

    /* Layout */
    display:         flex;
    flex-flow:       row nowrap;
    align-items:     stretch;
    justify-content: stretch;
}

@media (max-aspect-ratio: 1/1) {
    body {
        display:         flex;
        flex-flow:       column nowrap;
        align-items:     stretch;
        justify-content: stretch;
    }
}

nav {
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     flex-start;
    justify-content: flex-start;
}

@media (max-aspect-ratio: 1/1) {
    nav {
        /* Overflow */
        overflow-x: auto;

        /* Layout */
        display:         flex;
        flex-flow:       row nowrap;
        align-items:     flex-start;
        justify-content: flex-start;
    }
}

nav a {
    /* Space */
    padding: 1em;
    margin:  0;

    /* Size */
    width:  3em;
    height: 3em;

    /* Alignment */
    text-align: center;

    /* Layout */
    flex: 0 0 auto;

    /* Layout */
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     center;
    justify-content: center;
}

nav a:last-child {
    margin-top: auto;
}

section#tool {
    /* Overflow */
    overflow: auto;

    /* Layout */
    flex: 1 1 auto;

    /* Layout */
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     stretch;
    justify-content: stretch;
}

section#tool > :not(h1):not(footer) {
    margin: 0 2rem;
}

h1 {
    /* Space */
    padding: 1em;
    margin:  0;

    /* Alignment */
    text-align: center;
}

form#output {
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     stretch;
    justify-content: flex-start;
}

h2 {
    /* Border */
    border-width: 0 0 4px 0;

    /* Layout */
    display: inline-block;

    /* Layout */
    align-self: flex-start;
}

form#settings {
    /* Overflow */
    overflow: auto;

    /* Layout */
    display:         flex;
    flex-flow:       column wrap;
    align-items:     stretch;
    justify-content: flex-start;
}

fieldset {
    /* Space */
    padding: 1em;
    margin:  0;
    gap:     0.5em;

    /* Border */
    border-width: 1px;

    /* Layout */
    display:         flex;
    flex-flow:       row wrap;
    align-items:     flex-start;
    justify-content: flex-start;
}

@media (max-aspect-ratio: 1/1) {
    fieldset {
        flex-flow:   column nowrap;
        align-items: stretch;
    }
}

fieldset div {
    /* Size */
    width:  10em;
    height: auto;

    /* Layout */
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     stretch;
    justify-content: flex-start;
}

@media (max-aspect-ratio: 1/1) {
    fieldset div {
        width: auto;
    }
}

label {
    text-align: left;
}

input, select, textarea {
    /* Space */
    padding: 0.5em;
    margin:  0;

    /* Layout */
    flex: 0 1 auto;

    /* Border */
    border-style:  solid;
    border-width:  1px;
    border-radius: 4px;
}

form#input {
    display:         flex;
    flex-flow:       column nowrap;
    align-items:     stretch;
    justify-content: flex-start;
}

button {
    /* Space */
    padding: 0.5em;
    margin:  0;

    /* Border */
    border-width:  0;
    border-radius: 4px;
}

footer {
    /* Space */
    padding: 0.25em;
    margin:  0;

    /* Space */
    margin-top: auto;

    /* Alignment */
    text-align: center;
}

/* Font */

body {
    font-family: sans-serif;
    font-weight: normal;
    font-style:  normal;
    font-size:   12pt;
}

h1 {
    font-size:  1.5em;
    font-style: italic;
}

h2 {
    font-size: 1em;
}

nav {
    font-size: 0.75em;
}

label {
    font-weight: bold;
}

button {
    font-weight: bold;
    font-size:   1.5em;
}

/* Color */

html {
    background: #222;
}

body {
    background: white;
}

h1 {
    color: white;
    background:
        url("/waves.svg") bottom center / cover no-repeat,
        linear-gradient(to right, #22CC66, turquoise);
}

h2 {
    border-color: #22CC66;
    border-style: solid;
}

nav {
    background: #203040;
}

nav a {
    color: white;
    opacity: 50%;
}

nav a:hover, nav a:focus {
    background: #FFFFFF40;
    opacity: 100%;
}

nav a:active {
    background: #FFFFFF60;
    opacity: 100%;
}

label {
    color: #333333E0;
}

fieldset {
    /* Color */
    background: #22CC6610;

    /* Border */
    border-style: solid;
    border-color: #22CC6620;
}

button#copy {
    color:      white;
    background: linear-gradient(to right, turquoise, royalblue);
}

button#generate {
    color:      white;
    background: linear-gradient(to right, #22CC66, royalblue);
}

button:hover {
    /* Cursor */
    cursor: pointer;

    /* Filter */
    filter: brightness(110%);

    /* Shadow */
    text-shadow: 0 0 16px white;
}

button:active {
    /* Filter */
    filter: brightness(120%);

    /* Shadow */
    text-shadow: 0 0 16px white, 0 0 32px white;
}

input, select, textarea {
    /* Background */
    color:      black;
    background: white;

    /* Border */
    border-color: #C0C0C0;
}

select:hover {
    background: #F0F0F0;
}

select:active {
    background: #E0E0E0;
}

input:focus, textarea:focus {
    outline: 2px solid #22CC6660;
}

input:disabled, select:disabled {
    opacity: 50%;
}

/* Animation */

h1 {
    animation: appear 0.5s;
}

nav a {
    animation: race 1s;
}

form#settings, form#input, button#generate {
    animation: devanescence 1s;
}

details[open] form#output {
    animation: evanescence 1s;
}

h2 {
    animation: race 1s;
}

@keyframes devanescence {
    from {
        opacity:   0;
        translate: 0 -20%;
    }
}

@keyframes evanescence {
    from {
        opacity:   0;
        translate: 0 10%;
    }
}

@keyframes appear {
    from {
        opacity:   0;
        translate: 0 -50%;
    }
}

@keyframes race {
    from {
        opacity:   0;
        translate: -25% 0;
    }
}
