@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
    --color-primary: #fddf07;
    --color-primary-text: #2f2f2f;
    --color-accent: #ce1a1a;
    --color-background: #212121;
    --color-background-input: #292929;
    --color-text: #f9f9f9;

    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: var(--color-text);

    background: var(--color-background) url(/gfx/loginbg/bg0.static.png) center
        center no-repeat;
    background-size: cover;
    background-blend-mode: color-dodge;
    background-origin: 50% 50%;

    animation: fall 6.25s infinite alternate linear;
}

.alert {
    margin: 2em 0;
    padding: 0.5em 1em;
    border-radius: var(--border-radius);

    ul {
        list-style: none;
    }

    ul,
    li {
        margin: 0;
        padding: 0;
    }

    li {
        line-height: 1.8;
    }
}

.alert-error {
    background: #ff000029;
    color: #f9f9f9;
}

@keyframes fall {
    0% {
        background-position-y: -10px;
    }
    100% {
        background-position-y: 0px;
    }
}

main {
    height: calc(100dvh - 6rem);
    min-height: min-content;
    display: flex;
    align-items: center;
    justify-content: center;

    .bg {
        transition: opacity 1s linear;
    }
}

a,
a:visited {
    color: var(--color-primary);
}

.login-container {
    overflow: hidden;
    z-index: 1;
    width: 100%;
    max-width: 340px;

    img {
        display: block;
        margin: 2.5rem auto 4rem auto;
        max-width: 50%;
    }
}

.install,
.language,
.credits {
    padding: 0.6rem 1rem 2rem 1rem;
}

.install,
.language {
    position: fixed;
}

.install {
    padding: 1rem;
    top: 0;
    left: 0;
    a,
    a:visited {
        text-decoration: none;
        color: grey;
        &:hover {
            color: white;
        }
    }
}

.credits {
    margin-top: 2rem;
    text-align: center;
}

.language {
    top: 0;
    right: 0;
    letter-spacing: 0;
    a {
        padding-right: 0.25rem;
        display: inline-block;
        border-radius: var(--border-radius);
        height: 34px;
        &.active {
            border: 1px solid var(--color-primary);
        }
        img {
            display: inline-block;
            margin-left: 0.25rem;
        }
    }
}

.form-group {
    margin-bottom: 1.5rem;

    label {
        display: block;
        margin-bottom: 0.5rem;
    }

    input {
        width: 100%;
        padding: 0.8rem;
        border: none;
        border-radius: var(--border-radius);
        background: var(--color-background-input);
        font-size: 1rem;
        outline: none;
        color: var(--color-text);
    }
}

.flex-row {
    display: flex;
}

.flex-col {
    flex: 1;
}

.conditions {
    line-height: 2.5rem;
    input {
        border: 1px soid var(--color-primary);
        display: inline-block;
        margin-right: 0.5rem;
        vertical-align: initial;
    }
    a {
        text-decoration: none;
    }
}

button {
    max-width: min-content;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: var(--color-primary-text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    float: right;
}

button:hover {
    filter: brightness(0.9);
}

/* Bubble animation */
.bubble {
    position: absolute;
    opacity: 0;
    bottom: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: wiggle 2s infinite linear;
    pointer-events: none;
}

@keyframes wiggle {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    1% {
        transform: translateY(0);
        opacity: 0.8;
    }
    50% {
        transform: translateX(var(--random-x)) translateY(-50vh);
    }
    100% {
        transform: translateX(0) translateY(-100vh);
        opacity: 0;
    }
}

/* Generate multiple bubbles with different properties */
.bubble:nth-child(1) {
    left: 3%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.2);
}
.bubble:nth-child(2) {
    left: 6%;
    animation-duration: 6s;
    background: rgba(249, 249, 249, 0.1);
}
.bubble:nth-child(3) {
    left: 9%;
    animation-duration: 7s;
    background: rgba(169, 169, 169, 0.15);
}
.bubble:nth-child(4) {
    left: 12%;
    animation-duration: 5s;
    background: rgba(253, 223, 7, 0.25);
}
.bubble:nth-child(5) {
    left: 15%;
    animation-duration: 9s;
    background: rgba(249, 249, 249, 0.2);
}
.bubble:nth-child(6) {
    left: 18%;
    animation-duration: 6s;
    background: rgba(169, 169, 169, 0.1);
}
.bubble:nth-child(7) {
    left: 21%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.15);
}
.bubble:nth-child(8) {
    left: 24%;
    animation-duration: 7s;
    background: rgba(249, 249, 249, 0.25);
}
.bubble:nth-child(9) {
    left: 27%;
    animation-duration: 5s;
    background: rgba(169, 169, 169, 0.2);
}
.bubble:nth-child(10) {
    left: 30%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.2);
}
.bubble:nth-child(11) {
    left: 33%;
    animation-duration: 6s;
    background: rgba(249, 249, 249, 0.1);
}
.bubble:nth-child(12) {
    left: 36%;
    animation-duration: 7s;
    background: rgba(169, 169, 169, 0.15);
}
.bubble:nth-child(13) {
    left: 39%;
    animation-duration: 5s;
    background: rgba(253, 223, 7, 0.25);
}
.bubble:nth-child(14) {
    left: 42%;
    animation-duration: 9s;
    background: rgba(249, 249, 249, 0.2);
}
.bubble:nth-child(15) {
    left: 45%;
    animation-duration: 6s;
    background: rgba(169, 169, 169, 0.1);
}
.bubble:nth-child(16) {
    left: 48%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.15);
}
.bubble:nth-child(17) {
    left: 51%;
    animation-duration: 7s;
    background: rgba(249, 249, 249, 0.25);
}
.bubble:nth-child(18) {
    left: 54%;
    animation-duration: 5s;
    background: rgba(169, 169, 169, 0.2);
}
.bubble:nth-child(19) {
    left: 57%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.2);
}
.bubble:nth-child(20) {
    left: 60%;
    animation-duration: 6s;
    background: rgba(249, 249, 249, 0.1);
}
.bubble:nth-child(21) {
    left: 63%;
    animation-duration: 7s;
    background: rgba(169, 169, 169, 0.15);
}
.bubble:nth-child(22) {
    left: 66%;
    animation-duration: 5s;
    background: rgba(253, 223, 7, 0.25);
}
.bubble:nth-child(23) {
    left: 69%;
    animation-duration: 9s;
    background: rgba(249, 249, 249, 0.2);
}
.bubble:nth-child(24) {
    left: 72%;
    animation-duration: 6s;
    background: rgba(169, 169, 169, 0.1);
}
.bubble:nth-child(25) {
    left: 75%;
    animation-duration: 8s;
    background: rgba(253, 223, 7, 0.15);
}
.bubble:nth-child(26) {
    left: 78%;
    animation-duration: 7s;
    background: rgba(249, 249, 249, 0.25);
}
.bubble:nth-child(27) {
    left: 81%;
    animation-duration: 5s;
    background: rgba(169, 169, 169, 0.2);
}
