@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    background-image: url(../pic/login.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    color: white;
    background-color: rgba(144, 141, 141, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.box {
    position: relative;
    width: 380px;
    height: 420px;
    background: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 50px;
}

.box.register-box {
    height: 480px;
}

.box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    transform-origin: bottom right;
    background: linear-gradient(0deg, transparent, #c78ac4, #c78ac4);
    animation: animate 6s linear infinite;
    z-index: 1;
}

.box.register-box::before {
    height: 480px;
}

.box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    transform-origin: bottom right;
    background: linear-gradient(0deg, transparent, #c78ac4, #c78ac4);
    animation: animate 6s linear infinite;
    animation-delay: -3s;
    z-index: 1;
}

.box.register-box::after {
    height: 480px;
}

@keyframes animate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

form {
    position: absolute;
    inset: 2px;
    background: #28292d;
    padding: 50px 40px;
    border-radius: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.register-form {
    padding: 40px;
}

h2 {
    color: #c78ac4;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
}

.inputBox {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.inputBox.url-input {
    margin-bottom: 45px;
}

.inputBox input {
    position: relative;
    width: 100%;
    padding: 20px 10px 10px;
    background: transparent;
    outline: none;
    border: none;
    color: #fff;
    font-size: 1em;
    letter-spacing: 0.05em;
    transition: 0.5s;
    z-index: 10;
}

.inputBox span {
    position: absolute;
    left: 0;
    padding: 20px 0 10px;
    pointer-events: none;
    color: #8f8f8f;
    font-size: 1em;
    letter-spacing: 0.05em;
    transition: 0.5s;
    z-index: 8;
}

.inputBox i {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #c78ac4;
    border-radius: 4px;
    overflow: hidden;
    transition: 0.5s;
    pointer-events: none;
    z-index: 9;
}

.inputBox input:focus~span,
.inputBox input:valid~span {
    color: #c78ac4;
    transform: translateY(-34px) translateX(-10px) scale(0.75);
    font-size: 0.75em;
    z-index: 11;
}

.inputBox input:focus~i,
.inputBox input:valid~i {
    height: 44px;
}

.optional-hint {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    color: #8f8f8f;
    font-size: 0.75em;
    width: 100%;
    pointer-events: none;
}

.links {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.links a {
    color: #8f8f8f;
    font-size: 0.85em;
    text-decoration: none;
    transition: 0.3s;
}

.links a:hover {
    color: #c78ac4;
}

input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #c78ac4;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

input[type="submit"]:hover {
    background: #b377b3;
}

@media (max-width: 480px) {
    .box {
        width: 90%;
        margin-top: 30px;
    }

    form {
        padding: 30px 25px;
    }

    .register-form {
        padding: 30px;
    }
}