@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
header {
    background-color: hsl(147, 9%, 20%);
    position: fixed;
    border-radius: 0 0 10px 10px;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 40px;
    text-shadow: 0px 0px 10px hsl(150, 4%, 10%);
    font-weight: bold;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
}
header ul {
    list-style: none;
    display: flex;
    display: -webkit-box;
    -webkit-box-pack: center;
    justify-content: center;
    margin: 10px;
}
header ul * {
    margin: 0 3px;
    display: inline-block;
}
a {
    cursor: pointer;
    text-decoration: none;
    color: rgb(198, 244, 223);
}
body {
    font-family: "Inter", "Roboto", "Arial", sans-serif;
    color: rgb(198, 244, 223);
    padding-top: 30px;
    background-color: hsl(120, 3%, 7%);
    margin: 0;
}
#apps,
#users {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}
.app,
.user {
    background-color: hsl(150, 8%, 18%);
    transition: background-color 0.2s;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
}
.app > .secondary,
.user > .secondary {
    font-size: 0.7em;
}
.app > .tertiary,
.user > .tertiary {
    font-size: 0.55em;
}
a.app:hover,
a.user:hover {
    background-color: hsl(150, 11%, 36%);
}
main {
    display: flex;
    padding: 15px;
    flex-direction: column;
}
main.hcenter,
main.form {
    justify-content: center;
    align-items: center;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    display: flex;
}
input {
    text-align: center;
}
form > label {
    margin: 0.5rem;
}
h1 {
    margin: 10px 0;
}
main.form > h1 {
    padding-top: 20px;
    padding-bottom: 5px;
}
form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    transition: all 0.2s;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea {
    padding: 0.5rem;
    margin: 0.5rem;
    border: 2px solid hsl(120, 8%, 31%);
    border-radius: 5px;
    background-color: hsl(120, 7%, 21%);
    color: rgb(198, 244, 223);
}
input[type="submit"],
a.fakebutton {
    margin: 0.5rem;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    padding: 7px;
    border-radius: 5px;
    background-color: hsl(120, 8%, 31%);
    color: rgb(198, 244, 223);
    cursor: pointer;
    transition: background-color 0.3s;
    border: 2px solid hsl(120, 8%, 48%);
    text-decoration: none;
    width: fit-content;
}
input[type="submit"]:hover,
a.fakebutton:hover {
    background-color: hsl(120, 12%, 49%);
}
input[type="submit"].main,
a.fakebutton.main {
    background-color: hsl(151, 49%, 90%);
    border: 2px solid hsl(120, 10%, 58%);
    color: hsl(120, 7%, 11%);
}
input[type="submit"].main:hover,
a.fakebutton.main:hover {
    background-color: hsl(150, 100%, 83%);
}
input[type="submit"].danger,
a.fakebutton.danger {
    background-color: hsl(5, 60%, 55%);
    border: 2px solid hsl(5, 87%, 72%);
    color: rgb(198, 244, 223);
}
input[type="submit"].danger:hover,
a.fakebutton.danger:hover {
    background-color: hsl(5, 80%, 82%);
}
form.submitted {
    margin-top: 20px;
    margin: 10px;
    padding: 10px;
    border: 1px solid;
}
form.submitted.longrunning {
    border: 3px solid;
    animation: formSubmitBorderAnim 0.5s ease infinite alternate;
}
#loadbar {
    transform: height 1s;
    position: absolute;
    top: 0;
    left: 0;
    height: 0px;
    width: 100vw;
    z-index: 5000;
    background: linear-gradient(
        to left,
        hsl(150, 10%, 27%),
        hsl(120, 49%, 82%),
        hsl(150, 10%, 27%)
    );
    background-size: 200% 100%;
}
body:has(form.submitted.longrunning) > #loadbar {
    height: 4px;
    animation: formSubmitHeaderAnim 2s linear infinite;
}
@keyframes formSubmitHeaderAnim {
    from {
        background-position: 0% 0%;
    }
    to {
        background-position: -200% 0%;
    }
}
@keyframes formSubmitBorderAnim {
    from {
        border-color: hsl(120, 49%, 82%);
    }
    to {
        border-color: hsl(150, 10%, 27%);
    }
}
div.divider {
    width: 50px;
    height: 4px;
    background-color: hsl(120, 12%, 39%);
    margin: 0.5em;
    border-radius: 5px;
}
code,
div.code {
    border-radius: 4px;
    background-color: hsl(120, 10%, 27%);
}
div.code pre {
    margin: 10px;
    width: fit-content;
}
div.code {
    margin: 10px 3px;
    width: fit-content;
    border: 2px solid hsl(120, 15%, 50%);
}
main.docs ul {
    padding: 5px 20px;
}
main.docs {
    padding: 20px 200px;
}
main.docs h1 {
    padding: 20px 0;
}
main.docs h2 {
    padding: 17px 0;
}
main.docs h3 {
    padding: 14px 0;
}
main.docs p {
    padding: 10px 0;
}
/* Mobile tweaks */
@media (max-width: 650px) {
    main {
        text-align: center;
        align-items: center;
    }
}
/* details style was partially stolen from mdn */
details {
    border: 2px solid hsl(120, 6%, 33%);
    border-radius: 4px;
    padding: 0.5em 0.5em 0;
    margin-top: 10px;
}
summary {
    font-weight: bold;
    margin: -0.5em -0.5em 0;
    padding: 0.5em;
    cursor: pointer;
}

details[open] {
    padding: 0.5em;
}
details[open] summary {
    border-bottom: 2px solid hsl(120, 4%, 18%);
    margin-bottom: 0.5em;
}
details div.divider {
    width: 100%;
    height: 2px;
    background-color: hsl(120, 4%, 18%);
    margin: 0.5em;
    border-radius: 0;
}
#loadOverlay {
    display: none;
}
