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


.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f7f6;
    color: #171717;
}

.container {
    display: flex;
    overflow: hidden;
    width: 90%;
}

.register-section {
    margin: 0 auto;
    width: 330px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

#step1 h4 {
    font-size: 1.3rem;
}

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

.form-group input {
    border-radius: 10px;
    font-size: 1.1rem;
}

.logo-container {
    display: flex;
    text-align: center;
    justify-content: center;
    margin: auto;
    margin-bottom: 1.5rem;
}

.logo-container img {
    width: 200px !important;
}

h4 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}

p, .step p {
    font-size: 0.9rem;
    color: #555555;
    margin-bottom: 2rem;
    text-align: center;
}

.input-group {
    font-size: 1.25rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.input {
    all: unset;
    color: #333;
    padding: 1rem;
    height: 10px;
    border: 1px solid #9e9e9e;
    border-radius: 5px;
    width: 100%;
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.label {
    position: absolute;
    top: 0.6rem;
    left: 0.9rem;
    color: #9e9e9e;
    font-size: 1rem;
    pointer-events: none;
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus {
    border: 1px solid #000000;
}

.input:is(:focus, :valid) ~ .label {
    transform: translateY(-100%) scale(0.7);
    background-color: #f4f7f6;
    padding-inline: 0.3rem;
    color: #000000;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.password-toggle i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    color: #000000;
}

#username-warning {
    display: none;
    color: rgb(255, 0, 0);
    font-size: 0.7em;
    animation: fadeIn 0.3s ease-in-out;
}

#emailMessage {
    color: red;
    font-size: 0.9rem;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning-message {
    display: none;
    color: red;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease-in-out;
}

.next-button {
    background-color: black;
    border-color: black;
    color: white;
}

.next-button:disabled {
    background-color: #000000;
    border-color: #333;
    color: #999;
    cursor: not-allowed;
}

.next-button:not(:disabled):hover {
    background-color: #222;
    border-color: #222;
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.button-container .btn-primary {
    width: 48%;
}

.btn-primary {
    background-color: #000000;
    border: none;
    width: 100%;
    margin: 10px 0;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 10px;
    transition: 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #333333;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.register-link a {
    text-decoration: none;
    color: #000000;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}

.form-check {
    align-items: center;
}

#step3.active {
    animation: pop-in 0.5s forwards;
}

/* transition of sliding in from right side with an fade in effect */
@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px)  {
    .container {
        flex-direction: column;
    }

    .form-group #username, #password, #email, #first_name {
        height: 20px;
        margin-bottom: 0;
    }

    .label {
        top: 0.7rem;
        left: 0.8rem;
    }
    
    .register-section {
        width: 100%;
    }

    .form-check-label {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .btn-primary {
        margin-top: 0;
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        box-shadow: none;
    }

    .register-section {
        width: 100%;
    }

    .register-section h4 {
        text-align: center;
        font-size: 1.5rem;
    }

    #below-head {
        display: none;
    }

    .logo-container {
        display: flex;
        text-align: center;
        justify-content: center;
        margin: auto;
        margin-bottom: 1.5rem;
    }
    
    .logo-container img {
        width: 300px;
        height: auto;
    }

    .form-group {
        margin-top: 2.8rem;
    }

    .label {
        top: 0.6rem;
        left: 0.8rem;
    }

    .input {
        padding: 0.5rem;
    }
    
    .form-check {
        align-items: center;
        justify-self: center;
    }

}

@media screen and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .register-section {
        padding: 2rem;
    }

    .register-section h4 {
        font-size: 1.8rem;
    }

    .label {
        top: 1rem;
        left: 0.8rem;
    }
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        box-shadow: none;
    }

    .register-section {
        width: 100%;
        padding: 1.5rem;
    }

    .register-section h4 {
        font-size: 1.5rem;
    }
    
    .logo-container img {
        width: 200px;
    }
    
    .input {
        padding: 0.75rem;
    }

    .label {
        top: 0.6rem;
        left: 0.8rem;
    }

}

@media screen and (max-width: 480px) {
    .register-section {
        padding: 1rem;
    }

    .register-section h4 {
        font-size: 1.25rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .label {
        top: 0.6rem;
        left: 0.8rem;
    }

    .btn-primary {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .social-register img {
        width: 25px;
        height: 25px;
    }

    .register-link {
        font-size: 0.8rem;
    }

    .logo-container img {
        width: 150px;
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }
}