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

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

body {
    min-height: 100vh;

    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 24% 55%,
            rgba(99, 69, 190, 0.07),
            transparent 33%
        ),
        #1b1d20;

    color: #f2f2f2;

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

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


/* HEADER */

.register-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 */

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

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

    margin: auto;

    display: grid;

    grid-template-columns:
        0.95fr
        1.05fr;

    gap: 70px;

    align-items: center;

    padding:
        55px
        0
        70px;
}


/* VISUAL */

.register-visual {
    min-width: 0;

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

.space-scene {
    position: relative;

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

    height: 700px;

    isolation: isolate;

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


/* LARGE SOFT GLOW */

.space-scene::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 47%;

    transform:
        translate(
            -50%,
            -50%
        );

    width: 490px;
    height: 500px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(102, 69, 205, 0.16) 0%,
            rgba(84, 57, 170, 0.08) 38%,
            transparent 70%
        );

    filter: blur(26px);

    z-index: 0;
}


/* CHARACTER */

.register-character {
    position: relative;

    z-index: 5;

    display: block;

    max-height: 610px;
    max-width: 440px;

    object-fit: contain;

    transform:
        translateY(-21px);

    filter:
        drop-shadow(
            0 20px 32px
            rgba(0, 0, 0, 0.30)
        );
}


/* ORBITS */

.orbit {
    position: absolute;

    border:
        1px solid
        rgba(129, 88, 230, 0.30);

    border-radius: 50%;

    pointer-events: none;

    z-index: 1;
}

.orbit-one {
    width: 520px;
    height: 470px;

    left: 50%;
    top: 46%;

    transform:
        translate(
            -50%,
            -50%
        )
        rotate(-18deg);
}

.orbit-two {
    width: 445px;
    height: 610px;

    left: 48%;
    top: 47%;

    transform:
        translate(
            -50%,
            -50%
        )
        rotate(28deg);

    opacity: 0.55;
}

.orbit-three {
    width: 375px;
    height: 520px;

    left: 51%;
    top: 47%;

    transform:
        translate(
            -50%,
            -50%
        )
        rotate(68deg);

    opacity: 0.28;
}


/* PORTAL UNDER CHARACTER */

.portal {
    position: absolute;

    left: 50%;
    bottom: -12px;

    transform:
        translateX(-50%);

    width: 420px;
    height: 105px;

    z-index: 4;

    pointer-events: none;
}

.portal::before {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 8px;

    transform:
        translateX(-50%);

    width: 350px;
    height: 72px;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse,
            rgba(118, 71, 230, 0.26),
            rgba(92, 58, 183, 0.12) 45%,
            transparent 72%
        );

    filter: blur(10px);
}

.portal span {
    position: absolute;

    left: 50%;

    border:
        1px solid
        rgba(147, 92, 255, 0.74);

    border-radius: 50%;

    transform:
        translateX(-50%);

    box-shadow:
        0 0 9px
        rgba(139, 90, 240, 0.10);
}

.portal span:nth-child(1) {
    bottom: 8px;

    width: 380px;
    height: 66px;
}

.portal span:nth-child(2) {
    bottom: 18px;

    width: 300px;
    height: 46px;

    opacity: 0.70;
}

.portal span:nth-child(3) {
    bottom: 27px;

    width: 215px;
    height: 30px;

    opacity: 0.46;
}


/* PARTICLES */

.space-particles {
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 3;
}

.space-particles span {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #9b79ef;

    box-shadow:
        0 0 7px
        rgba(155, 121, 239, 0.90),
        0 0 16px
        rgba(155, 121, 239, 0.40);

    animation:
        star-pulse
        3.8s
        ease-in-out
        infinite
        alternate;
}

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

.space-particles span:nth-child(2) {
    left: 13%;
    top: 53%;

    animation-delay: -1.2s;
}

.space-particles span:nth-child(3) {
    left: 24%;
    top: 16%;

    width: 2px;
    height: 2px;

    animation-delay: -2s;
}

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

    animation-delay: -0.7s;
}

.space-particles span:nth-child(5) {
    right: 12%;
    top: 58%;

    width: 3px;
    height: 3px;

    animation-delay: -2.8s;
}

.space-particles span:nth-child(6) {
    right: 4%;
    top: 42%;

    width: 2px;
    height: 2px;
}

.space-particles span:nth-child(7) {
    left: 8%;
    top: 69%;

    width: 6px;
    height: 6px;

    opacity: 0.55;

    animation-delay: -2.3s;
}

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

    width: 3px;
    height: 3px;
}

.space-particles span:nth-child(9) {
    left: 27%;
    bottom: 8%;

    width: 3px;
    height: 3px;
}

.space-particles span:nth-child(10) {
    right: 5%;
    bottom: 14%;

    animation-delay: -1.9s;
}

.space-particles span:nth-child(11) {
    left: 2%;
    top: 39%;

    width: 2px;
    height: 2px;
}

.space-particles span:nth-child(12) {
    right: 31%;
    top: 34%;

    width: 2px;
    height: 2px;
}


/* SHOOTING STARS */

.shooting-stars {
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 2;
}

.shooting-stars span {
    position: absolute;

    width: 110px;
    height: 2px;

    border-radius: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(151, 92, 255, 0.92)
        );

    transform:
        rotate(-38deg);

    filter:
        drop-shadow(
            0 0 5px
            rgba(151, 92, 255, 0.65)
        );

    opacity: 0.75;
}

.shooting-stars span:nth-child(1) {
    left: -4%;
    top: 28%;
}

.shooting-stars span:nth-child(2) {
    right: -5%;
    top: 57%;

    width: 90px;
}

.shooting-stars span:nth-child(3) {
    left: 6%;
    bottom: 22%;

    width: 75px;

    opacity: 0.42;
}

.shooting-stars span:nth-child(4) {
    right: 2%;
    top: 19%;

    width: 65px;

    opacity: 0.40;
}


/* ROCKS */

.space-rocks {
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 2;
}

.space-rocks span {
    position: absolute;

    width: 23px;
    height: 17px;

    background:
        linear-gradient(
            135deg,
            #282039,
            #17131f
        );

    clip-path:
        polygon(
            20% 0,
            85% 20%,
            100% 70%,
            55% 100%,
            0 70%
        );

    opacity: 0.80;

    filter:
        drop-shadow(
            0 0 7px
            rgba(105, 70, 190, 0.20)
        );
}

.space-rocks span:nth-child(1) {
    left: 6%;
    bottom: 16%;

    transform:
        rotate(17deg);
}

.space-rocks span:nth-child(2) {
    right: 5%;
    top: 37%;

    width: 18px;
    height: 14px;

    transform:
        rotate(-22deg);
}

.space-rocks span:nth-child(3) {
    right: 12%;
    bottom: 26%;

    width: 28px;
    height: 21px;

    transform:
        rotate(32deg);
}

.space-rocks span:nth-child(4) {
    left: 11%;
    top: 48%;

    width: 14px;
    height: 12px;
}


/* ANIMATIONS */

@keyframes star-pulse {

    from {
        opacity: 0.35;

        transform:
            scale(0.8);
    }

    to {
        opacity: 1;

        transform:
            scale(1.25);
    }

}


/* PANEL */

.register-panel {
    width: 100%;
    max-width: 590px;

    justify-self: end;

    padding: 45px;

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

    border-radius: 20px;

    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);
}


/* HEADING */

.register-heading {
    margin-bottom: 32px;
}

.register-heading h1 {
    font-size:
        clamp(
            40px,
            4vw,
            54px
        );

    line-height: 1;

    letter-spacing: -2px;

    font-weight: 650;
}

.register-heading h1 span {
    color: #8f80e8;
}

.register-heading p {
    margin-top: 14px;

    color: #aaaab0;

    font-size: 17px;
}


/* FORM */

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

    gap: 20px;
}

.field label {
    display: block;

    margin-bottom: 8px;

    font-size: 15px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 56px;

    padding:
        0
        54px
        0
        16px;

    border:
        1px solid
        #45474d;

    border-radius: 10px;

    outline: none;

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

    color: #f2f2f2;

    font: inherit;
    font-size: 16px;

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

.input-wrap input::placeholder {
    color: #777980;
}

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

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


/* STATIC ICON */

.input-icon {
    position: absolute;

    right: 15px;
    top: 50%;

    transform:
        translateY(-50%);

    color: #92939a;

    font-size: 18px;

    pointer-events: none;
}


/* PASSWORD BUTTON */

.password-toggle {
    position: absolute;

    right: 7px;
    top: 50%;

    transform:
        translateY(-50%);

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #aaaab0;

    cursor: pointer;

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

    font-size: 18px;

    transition:
        color 0.2s,
        background 0.2s;
}

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

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

.eye-icon {
    pointer-events: none;

    line-height: 1;
}


/* ERRORS */

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

    color: #d97878;

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

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

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

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


/* SUBMIT */

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

    margin-top: 4px;

    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);
}


/* LOGIN LINK */

.login-link {
    margin-top: 2px;

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

    gap: 9px;

    color: #96969c;

    font-size: 15px;
}

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

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


/* MOBILE */

@media (max-width: 850px) {

    .register-header {
        height: 78px;

        padding: 0 22px;
    }

    .logo {
        font-size: 18px;
    }

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

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


    .register-main {
        width: 100%;

        min-height: auto;

        display: flex;
        flex-direction: column;

        gap: 0;

        padding:
            20px
            24px
            50px;
    }


    .register-visual {
        width: 100%;
    }


    .space-scene {
        width: 100%;
        height: 300px;
    }

    .space-scene::before {
        width: 280px;
        height: 270px;

        top: 46%;

        filter: blur(22px);
    }


    .register-character {
        max-height: 270px;
        max-width: 220px;

        transform:
            translateY(-18px);
    }


    .orbit-one {
        width: 305px;
        height: 220px;

        top: 45%;
    }

    .orbit-two {
        width: 230px;
        height: 300px;

        top: 46%;
    }

    .orbit-three {
        width: 190px;
        height: 260px;

        top: 46%;
    }


    .portal {
        width: 280px;
        height: 72px;

        bottom: -5px;
    }

    .portal::before {
        width: 235px;
        height: 50px;

        bottom: 5px;
    }

    .portal span:nth-child(1) {
        width: 260px;
        height: 44px;

        bottom: 6px;
    }

    .portal span:nth-child(2) {
        width: 205px;
        height: 31px;

        bottom: 13px;
    }

    .portal span:nth-child(3) {
        width: 145px;
        height: 20px;

        bottom: 19px;
    }


    .shooting-stars span {
        width: 60px;
    }


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

        padding: 0;

        margin-top: 18px;

        border: none;
        border-radius: 0;

        background: transparent;

        box-shadow: none;
    }


    .register-heading {
        margin-bottom: 28px;
    }

    .register-heading h1 {
        font-size: 42px;

        letter-spacing: -1.6px;
    }

    .register-heading p {
        margin-top: 12px;

        font-size: 16px;
    }


    .register-form {
        gap: 19px;
    }

    .input-wrap input {
        height: 56px;
    }

    .submit-button {
        height: 58px;

        margin-top: 5px;
    }

    .login-link {
        margin-top: 5px;

        flex-wrap: wrap;
    }

}


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

    .space-particles span {
        animation: none;
    }

}
