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

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 28% 55%,
            rgba(112, 88, 200, 0.07),
            transparent 30%
        ),
        #1b1d20;

    color: #f2f2f2;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}


/* HEADER */

.login-header {
    height: 100px;

    max-width: 1450px;
    margin: auto;

    padding: 0 55px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.06);
}

.logo {
    display: flex;
    align-items: center;

    gap: 6px;

    font-weight: 700;
    font-size: 23px;
    letter-spacing: 5px;
}

.logo-icon {
    width: 44px;
    height: 40px;

    display: block;
    object-fit: contain;
}

.back-link {
    display: flex;
    align-items: center;

    gap: 9px;

    color: #aaaab0;

    font-size: 16px;

    transition: color 0.2s;
}

.back-link:hover {
    color: #ffffff;
}


/* MAIN */

.login-main {
    width: min(
        1200px,
        calc(100% - 80px)
    );

    min-height:
        calc(100vh - 100px);

    margin: auto;

    display: grid;

    grid-template-columns:
        0.9fr
        1.1fr;

    align-items: center;

    gap: 80px;

    padding: 60px 0;
}


/* LEFT */

.login-intro {
    min-width: 0;
}

.intro-text {
    margin-top: 10px;
}

.intro-text h1 {
    font-size:
        clamp(
            52px,
            5vw,
            74px
        );

    line-height: 0.98;

    letter-spacing: -3px;

    font-weight: 650;
}

.intro-text h1 span {
    display: block;

    color: #8f80e8;
}

.intro-text p {
    max-width: 420px;

    margin-top: 22px;

    color: #aaaab0;

    font-size: 20px;
    line-height: 1.55;
}


/* CHARACTER */

.login-art {
    position: relative;

    width: 420px;
    max-width: 100%;

    height: 420px;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    isolation: isolate;
}

.login-art::before {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 30px;

    transform: translateX(-50%);

    width: 330px;
    height: 300px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(126, 96, 225, 0.22) 0%,
            rgba(105, 82, 190, 0.10) 45%,
            transparent 72%
        );

    filter: blur(28px);

    z-index: 0;
}

.login-art img {
    position: relative;

    z-index: 2;

    display: block;

    max-width: 100%;
    max-height: 400px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 15px 28px
            rgba(0, 0, 0, 0.28)
        )
        drop-shadow(
            0 0 22px
            rgba(125, 95, 225, 0.12)
        );
}


/* PARTICLES */

.particles {
    position: absolute;

    inset:
        20px
        -10px
        10px;

    z-index: 1;

    pointer-events: none;
}

.particles span {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #8d7be8;

    box-shadow:
        0 0 6px
        rgba(141, 123, 232, 0.85),
        0 0 14px
        rgba(141, 123, 232, 0.35);

    animation:
        particle-float
        5s
        ease-in-out
        infinite
        alternate;
}

.particles span:nth-child(1) {
    left: 6%;
    top: 31%;
}

.particles span:nth-child(2) {
    left: 15%;
    top: 63%;

    animation-delay: -1.2s;
}

.particles span:nth-child(3) {
    left: 27%;
    top: 14%;

    width: 2px;
    height: 2px;

    animation-delay: -2.5s;
}

.particles span:nth-child(4) {
    right: 8%;
    top: 25%;

    animation-delay: -0.8s;
}

.particles span:nth-child(5) {
    right: 17%;
    top: 65%;

    width: 3px;
    height: 3px;

    animation-delay: -3s;
}

.particles span:nth-child(6) {
    right: 3%;
    top: 47%;

    width: 2px;
    height: 2px;

    animation-delay: -1.7s;
}

.particles span:nth-child(7) {
    left: 5%;
    top: 47%;

    width: 6px;
    height: 6px;

    opacity: 0.55;

    animation-delay: -3.7s;
}

.particles span:nth-child(8) {
    right: 29%;
    top: 8%;

    width: 3px;
    height: 3px;

    animation-delay: -2.1s;
}

.particles span:nth-child(9) {
    left: 34%;
    bottom: 9%;

    width: 3px;
    height: 3px;

    animation-delay: -4s;
}

.particles span:nth-child(10) {
    right: 4%;
    bottom: 17%;

    animation-delay: -2.8s;
}

@keyframes particle-float {

    from {
        transform: translateY(3px);
        opacity: 0.45;
    }

    to {
        transform: translateY(-7px);
        opacity: 0.95;
    }

}


/* PANEL */

.login-panel {
    width: 100%;
    max-width: 580px;

    justify-self: end;

    padding: 46px;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.015)
        );

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.18);
}

.login-form {
    display: flex;
    flex-direction: column;

    gap: 27px;
}


/* FIELDS */

.field label {
    display: block;

    margin-bottom: 10px;

    font-size: 16px;
}

.field input {
    width: 100%;
    height: 62px;

    padding: 0 18px;

    border:
        1px solid
        #45474d;

    border-radius: 10px;

    outline: none;

    background:
        rgba(17, 18, 21, 0.20);

    color: #f3f3f3;

    font: inherit;
    font-size: 16px;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.field input::placeholder {
    color: #777980;
}

.field input:focus {
    border-color: #7768d9;

    box-shadow:
        0 0 0 3px
        rgba(119, 104, 217, 0.10);
}


/* ERRORS */

.field-error {
    margin-top: 8px;

    color: #d97878;

    font-size: 13px;
    line-height: 1.4;
}

.field-error:empty {
    display: none;
}

.login-error {
    padding: 13px 15px;

    border:
        1px solid
        rgba(185, 95, 101, 0.30);

    border-radius: 9px;

    background:
        rgba(185, 95, 101, 0.07);

    color: #d97878;

    font-size: 14px;
    line-height: 1.4;
}

.login-error:empty {
    display: none;
}

.input-error {
    border-color: #b95f65 !important;

    box-shadow:
        0 0 0 3px
        rgba(185, 95, 101, 0.08)
        !important;
}


/* PASSWORD */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #aaaab0;

    cursor: pointer;

    font-size: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        color 0.2s,
        background 0.2s;
}

.password-toggle:hover {
    color: #9585ed;

    background:
        rgba(149, 133, 237, 0.08);
}

.password-toggle:focus-visible {
    outline:
        2px solid
        #7768d9;

    outline-offset: 2px;
}

.eye-icon {
    pointer-events: none;

    line-height: 1;
}


/* REMEMBER */

.remember {
    width: fit-content;

    display: flex;
    align-items: center;

    gap: 10px;

    color: #b4b4b9;

    font-size: 15px;

    cursor: pointer;
}

.remember input {
    width: 18px;
    height: 18px;

    accent-color: #7768d9;
}


/* BUTTON */

.submit-button {
    width: 100%;
    height: 62px;

    border: none;
    border-radius: 10px;

    background:
        linear-gradient(
            100deg,
            #6858d7,
            #8171e5
        );

    color: white;

    font: inherit;
    font-size: 17px;
    font-weight: 500;

    cursor: pointer;

    box-shadow:
        0 8px 30px
        rgba(105, 88, 215, 0.15);

    transition:
        transform 0.2s,
        filter 0.2s;
}

.submit-button:hover {
    transform: translateY(-1px);

    filter: brightness(1.06);
}


/* REGISTER */

.register-link {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 9px;

    color: #96969c;

    font-size: 15px;
}

.register-link a {
    color: #9585ed;
}

.register-link a:hover {
    color: #aea1f5;
}


/* MOBILE */

@media (max-width: 850px) {

    .login-header {
        height: 78px;

        padding: 0 22px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 36px;
        height: 34px;
    }

    .back-link {
        font-size: 15px;
    }


    .login-main {
        width: 100%;

        min-height: auto;

        display: flex;
        flex-direction: column;

        gap: 0;

        padding:
            24px
            24px
            50px;
    }


    .login-intro {
        width: 100%;

        display: flex;
        flex-direction: column;
    }


    .login-art {
        order: 1;

        width: 100%;
        height: 250px;

        margin:
            0
            0
            5px;
    }

    .login-art::before {
        width: 230px;
        height: 210px;

        bottom: 0;

        filter: blur(25px);
    }

    .login-art img {
        max-height: 240px;
        max-width: 270px;
    }

    .particles {
        inset:
            0
            15px;
    }


    .intro-text {
        order: 2;
    }

    .intro-text h1 {
        font-size: 46px;

        letter-spacing: -2px;
    }

    .intro-text p {
        margin-top: 16px;

        font-size: 17px;
    }


    .login-panel {
        width: 100%;
        max-width: none;

        margin-top: 34px;

        padding: 0;

        border: none;
        border-radius: 0;

        background: transparent;

        box-shadow: none;
    }

    .login-form {
        gap: 23px;
    }

    .field input {
        height: 58px;
    }

    .submit-button {
        height: 58px;
    }

    .register-link {
        margin-top: 3px;

        flex-wrap: wrap;
    }

}


@media (prefers-reduced-motion: reduce) {

    .particles span {
        animation: none;
    }

}
