:root {
    --main-color: #A755BA;
    --main-color-darker: #9841AC;
    --main-color-darkest: #742287;
    --secondary-color: #4E7DB1;
    --tertiary-color: #BA49AE;
    --bg-color: #C9B6E0;
    --font-color: #FFF;
    --default-font: 'Roboto Slab', sans-serif;
    --monospace-font: 'Roboto Mono', monospace;
}

.bulk {
    --main-color: #4E7DB1;
    --main-color-darker: #3E628E;
    --main-color-darkest: #2C4663;
    --secondary-color: #77F9D4;
    --tertiary-color: #A755BA;
    --bg-color: #B6CDE0;
    --font-color: #FFF;
}

@keyframes drift {
    from { transform: rotate(0deg); }
    from { transform: rotate(360deg); }
}

@-webkit-keyframes tide {
    0% { background-position: 0% 51% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 51% }
}
@-moz-keyframes tide {
    0% { background-position: 0% 51% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 51% }
}
@keyframes tide {
    0% { background-position: 0% 51% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 51% }
}

html, body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

html {
    background: var(--main-color);
    background: linear-gradient(
        260deg,
        var(--secondary-color),
        var(--main-color),
        var(--main-color),
        var(--tertiary-color),
        var(--main-color),
        var(--main-color)
    );
    background-size: 1200% 1200%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        -webkit-animation: tide 43s ease infinite;
        -moz-animation: tide 43s ease infinite;
        animation: tide 43s ease infinite;
    }

    .wave {
        left: 50%;
        height: 100%;
        width: 100%;
        margin-left: -50%;
        transform-origin: 50% 48%;
        border-radius: 43%;

        animation: drift 3000ms infinite linear;
    }

    .wave.two {
        animation: drift 7000ms infinite linear;
    }

    .wave.three {
        animation: drift 5000ms infinite linear;
    }
}
@media (prefers-reduced-motion) {
    body {
        background: var(--bg-color);
    }
}

body {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
    font-family: var(--default-font);
    font-size: 1.25em;
    line-height: 1.25em;
}

.bulk body {
    display: block;
}

.box {
    height: 600px;
    width: 600px;
    margin: auto;
    overflow: visible;
    position: relative;
}

.bulk .box {
    height: 100vh;
    width: 100vw;
}

.bulk .waves {
    height: 100vh;
    margin: 0 calc(50vw - 50vh);
    width: 100vh;
}

.waves {
    height: 100%;
    width: 100%;
    margin: auto;
    position: relative;
    transform: translate3d(0, 0, 0);
}

.waves::after {
    content: '';
    display: block;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(#e8a, 1), rgba(#def, 0) 80%, rgba(white, .5));
    transform: translate3d(0, 0, 0);
    z-index: 11;
}

.wave {
    opacity: .4;
    position: absolute;
    top: 0;
    background: #f2d0ea;
}

.wave.two {
    background: #b5f2ff;
}

.wave.three {
    background: #d7badd;
}

.main {
    height: 66%;
    width: 66%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

.bulk .main {
    height: 100%;
    overflow: auto;
    justify-content: unset;
}

.main,
form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

header,
.error,
form,
.input,
.select,
button,
.audio {
    flex: 0 1 auto;
    margin: .75em auto;
}

header {
    margin: 1.25em auto;
}

.bulk header {
    margin-bottom: 0;
}

h1 {
    color: var(--main-color-darkest);
    line-height: 1em;
    margin: 0 auto;
}

.error {
    display: none;
    margin: 1.5em auto .5em;
    color: darkred;
}

form {
    flex-grow: none;
    margin: 0 auto;
    padding: 1em;
    height: 100%;
    width: calc(100% - 2em);
}

.bulk form {
    color: var(--main-color-darkest);
    margin-top: 1em;
}

input, .input,
select, .select {
    text-align: center;
}

input,
.select,
button {
    height: 2.5em;
    min-height: 2.5em;
}

.input {
    width: 100%;
}
.input .half {
    display: inline-block;
    width: calc(50% - 3px - 1em);
}
.input .half + .half {
    margin-left: 2em;
}
.input::before,
.input::after {
    content: "/";
    opacity: .55;
}
input {
    font-family: var(--monospace-font);
    width: calc(100% - 4.5ex);
}
input[type=file] {
    display: block;
    font-family: var(--monospace-font);
    margin: 0 auto -1em;
    width: auto;
}

.bulk .input::before,
.bulk .input::after {
    content: unset;
}

.bulk .input,
.bulk .select {
    max-width: 600px;
}

.bulk .input input:not([type=file]),
.bulk .input textarea {
    width: 100%;
}

.select {
    cursor: pointer;
    display: inline-block;
    position: relative;
    font-size: 1em;
    color: var(--font-color);
    width: 100%;
}
.select-styled {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--main-color);
    padding: .6em 1.5em .6em .9em;
    -moz-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    -webkit-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.select-styled::after {
    content: "";
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-color: var(--font-color) transparent transparent transparent;
    position: absolute;
    top: 1.2em;
    right: .75em;
}
.select-styled:hover {
    background-color: var(--main-color-darkest);
}
.select-styled:active,
.select-styled.active {
    background-color: var(--main-color-darker);
}
.select-styled:active::after,
.select-styled.active::after {
    top: .75em;
    border-color: transparent transparent var(--font-color) transparent;
}
.select-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 999;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--main-color);
    max-height: 7.7em;
    overflow-y: auto;
}
.select-options li {
    margin: 0;
    padding: 12px 0;
    text-indent: 15px;
    border-top: 1px solid var(--main-color-darker);
    -moz-transition: all 0.15s ease-in;
    -o-transition: all 0.15s ease-in;
    -webkit-transition: all 0.15s ease-in;
    transition: all 0.15s ease-in;
}
.select-options li:hover {
    color: var(--main-color-darker);
    background: var(--font-color);
    opacity: .9;
}
.select-options li[rel="hide"] {
    display: none;
}
select.hidden {
    display: none;
    visibility: hidden;
}

button {
    display: block;
    border: 0;
    background: var(--main-color);
    color: var(--font-color);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    min-width: 50%;
    padding: .5em 1em;
}

button:hover {
    background: var(--main-color-darkest);
}

button[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.audio {
    position: relative;
    height: 2em;
    width: 75%;
    margin-bottom: 1em;
}

audio {
    position: absolute;
    top: 50%;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

a#share {
    position: absolute;
    top: 3em;
    left: 0;
    right: 0;
    margin-top: 1.5em;
    color: var(--font-color);
    font-size: .8em;
}

a#back {
    color: var(--font-color);
    font-size: .8em;
    text-decoration: none;
}

a.info {
    color: var(--font-color);
    font-size: .8em;
}

aside.info::before {
    content: '';
    background-color: var(--bg-color);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    z-index: -1;
}

aside.info {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    justify-content: center;
    margin: 0em auto;
    height: 100vh;
    max-height: 100vh;
    width: 600px;
    padding: 0 2em;
    border-radius: 0;
    font-size: .8em;
    color: var(--main-color-darkest);
}

aside.info p {
    margin: .5em auto;
}

aside.info a {
    color: var(--font-color);
}

aside.info .close {
    position: absolute;
    top: 1em;
    right: 1em;
    padding: 1em;
    margin: -1em;
    font-size: 1.5em;
    font-family: serif;
    font-weight: 100;
    color: var(--font-color);
    cursor: pointer;
}

aside.info h2 {
    margin: .75em auto;
}

code {
    font-family: var(--monospace-font);
    opacity: .8;
    white-space: nowrap;
}

ul.social {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.social li {
    display: inline-block;
    margin: .75em;
}

ul.social li + li {
    margin-left: 0;
}

ul.social img {
    border-radius: 50%;
    border: 2px solid var(--font-color);
}

ul.social svg {
    fill: var(--font-color);
}

#support {
    position: fixed;
    bottom: 1em;
    right: 1em;
}

.kofiimg {
    animation: none !important;
}

@media (max-height: 700px), (max-width: 700px) {
    .box {
        height: 100vh;
        width: 100vw;
        min-height: 600px;
        min-width: 600px;
        margin: calc((100vh - 100vw) / 2) calc((100vw - 100vh) / 2);
    }

    .main {
        max-height: 100vh;
        max-width: 100vw;
        bottom: 4em;
    }

    form {
        width: 80%;
    }

    aside.info {
        justify-content: flex-start;
        width: calc(100vw - 4em);
        padding: 0 2em;
        overflow-y: auto;
    }

    aside.info h2 {
        margin: .5em auto;
    }

    aside.info h2:first-child {
        margin-top: 1.1em;
    }

    /* Bulk */

    body .bulk {
        overflow: auto;
    }

    .bulk .box {
        margin: 0;
        max-width: 100vw;
        overflow: hidden;
        width: 100vw;
    }

    .bulk .waves {
        height: 100vh;
        margin-left: calc(50vw - 50vh);
        position: static;
        width: 100vh;
    }

    .bulk .main {
        display: block;
        height: 100vh;
        margin: 0;
        overflow: auto;
        overflow-x: hidden;
        padding-top: 1em;
        width: 100vw;
    }

    .bulk header {
        margin-bottom: 0.5em;
    }

    .bulk form {
        display: block;
        flex-grow: unset;
        height: fit-content;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 3.5em;
        position: relative;
    }

    .bulk .input .half {
        width: 100%;
    }

    .bulk .input .half + .half {
        margin-left: 0;
        margin-top: 0.75em;
    }

    .bulk #back {
        position: absolute;
        bottom: 2.5em;
        left: 1em;
    }

    .bulk #support {
        position: relative;
        margin-left: 50%;
        margin-top: -2.5em;
    }

    .bulk aside p:last-of-type {
        margin-bottom: 3em;
    }
}

@media (max-width: 700px) {
    .box {
        height: 100vw;
        width: 100vw;
    }

    ul.social {
        margin-bottom: 3em;
    }

    #support {
        right: unset;
    }
}

@media (max-height: 700px) {
    .box {
        height: 100vh;
        width: 100vh;
    }
}
