@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    height: auto;
    padding: 20px 0;
}

h1 {
    font-weight: bold;
    margin: 0;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span {
    font-size: 12px;
}

a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

#signup-btn,
#signin-btn {
    width: 50%;
}

button {
    border-radius: 8px;
    background: linear-gradient(115deg, rgb(111, 0, 0), #ff0000, #ff7057);
    background-size: 300% 300%;
    background-position: left center;
    color: #fff;
    border: none;
    outline: none;
    padding: 12px 24px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    transform: perspective(1000px) translateZ(0) scale(1);
    position: relative;
    cursor: pointer;
    animation: glowing 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite, bg-slide 5s ease-in-out infinite;
}

button:active {
    transform: scale(0.95);
    background-position: center center;
    transform: perspective(1000px) translateZ(2px) scale(0.98);
}


@keyframes glowing {
    0% {
        box-shadow: 0 0 5px #fff0f0, 0 0 10px #ff4b2b;
    }

    50% {
        box-shadow: 0 0 5px #ff1616, 0 0 10px #ff4b2b;
    }

    100% {
        box-shadow: 0 0 5px #fff0f0, 0 0 10px #ff4b2b;
    }
}

@keyframes bg-slide {
    0% {
        background-position: left center;
    }

    50% {
        background-position: right center;
    }

    100% {
        background-position: left center;
    }
}


button:focus {
    outline: none;
}

button.ghost {
    background-color: transparent;
    border-color: #FFFFFF;
}



.overlay-panel button {
    color: #030303;
    background: white;
}

.overlay-panel button:hover {
    transform: scale(0.95);
    color: #ffffff;
    background: rgb(0, 0, 0);
}


form {
    /* General form styling */
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    /* Desktop horizontal padding */
    height: 100%;
    text-align: center;
}


input {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: 0px 0px 10px 0px #d4cbcb;
    padding: 0px 15px;
    margin: 8px 0;
    width: 110%;
    transition: box-shadow 0.8s, background 0.8s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-weight: bold;
    height: 40px;
    font-size: 14px;
}

input[type="password"] {
    padding-right: 40px;
}

input:focus {
    background: linear-gradient(to right, #ff7057, #f35177);
    outline: none;
    color: white;
}

input:focus::placeholder {
    color: white;
}


/* ...existing code... */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    /* Firefox */
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    /* min-height: 480px; */
    min-height: 625px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: #FF416C;
    background: -webkit-linear-gradient(to right, #FF4B2B, #FF416C);
    background: linear-gradient(to right, #FF4B2B, #FF416C);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.social-container {
    margin: 20px 0;
}

.social-container a {
    border: 1px solid #DDDDDD;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
}

footer {
    background-color: #222;
    color: #fff;
    font-size: 14px;
    position: relative;
    left: 0;
    right: 0;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    margin-top: 30px;
}

footer p {
    margin: 10px 0;
}

footer i {
    color: red;
}

footer a {
    color: #3c97bf;
    text-decoration: none;
}


.input-group {
    position: relative;
    width: 105%;
}

.input-group i {
    position: absolute;
    left: -30px;
    top: 37%;
    transform: translateY(-50%);
    background: linear-gradient(#000000, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 24px;
    pointer-events: none;
}


.input-group .password-toggle {
    right: -20px;
    left: auto;
    cursor: pointer;
    color: #000000;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    font-size: 20px;
    pointer-events: auto;
    top: 30px;
}



/* Place this in your <style> section */
.home-icon {
    position: absolute;
    top: 0px;
    left: 10px;
    z-index: 200;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 3px;
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0;
    background-color: rgb(221, 0, 0);
    padding: 10px 15px;
    border-radius: 8px;
}

.home-link i {
    font-size: 14px;
    padding: 0;
}

.home-link:hover {
    background-color: #000000;
}

.home-link .fa-arrow-left {
    animation: leftArrowMove 1s infinite alternate;
}

@keyframes leftArrowMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-8px);
    }
}





/* Responsive adjustments for screens <= 700px */
@media (max-width: 700px) {
    .input-group {
        width: 90%;
        margin-left: 1rem;
    }

    input {
        width: 100%;
        margin: 5px 0;
    }

    .input-group .password-toggle {
        right: 10px;
        top: 25px;
    }




    .container {
        width: 95%;
        max-width: 450px;
        min-height: 680px;
    }

    h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .form-container {
        position: absolute;
        width: 100%;
        left: 0;
        transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
        height: 80%;
    }

    .overlay-container {
        position: absolute;
        width: 100%;
        left: 0;
        transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
        height: 20%;
        z-index: 100;
    }

    .form-container form {
        padding: 20px;
        height: 100%;
        /* justify-content: space-around; */
    }

    .form-container h1 {
        margin-bottom: 10px;
        margin-top: 10px;
    }

    .sign-in-container {
        top: 0;
        transform: translateY(0);
        opacity: 1;
        z-index: 2;
    }

    .container.right-panel-active .sign-in-container {
        transform: translateY(-100%);
        opacity: 0;
        z-index: 1;
    }

    .sign-up-container {
        top: 18%;
        transform: translateY(100%);
        opacity: 0;
        z-index: 1;
        animation: none;
    }

    .container.right-panel-active .sign-up-container {
        transform: translateY(0);
        opacity: 1;
        z-index: 5;
    }

    .overlay-container {
        top: 80%;
    }

    .container.right-panel-active .overlay-container {
        transform: translateY(-400.333%);
    }

    .overlay {
        position: relative;
        left: 0;
        height: 200%;
        width: 102%;
        transform: translateY(0);
    }

    .container.right-panel-active .overlay {
        transform: translateY(-50%);
    }

    .overlay-panel {
        position: absolute;
        width: 100%;
        height: 50%;
        left: 0;
        transform: translateX(0) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;

        padding: 15px;
        overflow: hidden;
    }

    .overlay-right {
        top: 0;
    }

    .overlay-left {
        top: 50%;
    }

    .overlay-panel h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }

    .overlay-panel p {
        font-size: 12px;
        margin-top: 8px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .overlay-panel button {
        padding: 10px 22px;
        font-size: 14px;
    }

    h1 {
        font-size: 1.6em;
    }

    p {
        font-size: 13px;
        margin: 10px 0 15px;
        line-height: 1.5;
    }

    button {
        padding: 10px 25px;
        font-size: 14px;
    }

    #signup-btn,
    #signin-btn {
        width: 30%;
        padding: 13px 10px;
    }

    span {
        font-size: 11px;
        margin-top: -15px;
    }

    a:not(.social) {
        font-size: 12px;
        margin: 10px 0;
    }

    .social-container {
        margin: 15px 0;
    }

    .social-container a {
        height: 35px;
        width: 35px;
    }

    .social-container i {
        font-size: 0.9em;
    }
}

/* Further adjustments for very small screens */
@media (max-width: 400px) {
    h2 {
        font-size: 1.1em;
    }

    .form-container form {
        padding: 15px;
    }

    .overlay-panel {
        padding: 10px 15px;
    }

    .overlay-panel h1 {
        font-size: 1.3em;
        margin-bottom: 5px;
    }

    .overlay-panel p {
        font-size: 11px;
        margin-top: 5px;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .overlay-panel button {
        padding: 8px 18px;
        font-size: 15px;
    }

    h1 {
        font-size: 1.4em;
    }

    p {
        font-size: 12px;
        margin: 8px 0 12px;
    }

    button {
        padding: 8px 20px;
        font-size: 15px;
    }

    #signup-btn,
    #signin-btn {
        width: 50%;
        padding: 13px 10px;
    }
}



.errormessages {
    height: 20px;
}

.error-message {
    display: none;
    text-align: start;
    color: red;
    font-weight: bold;
    margin-left: 5px;
    font-size: 12.5px;
}

.error-message.active {
    display: block;
    animation: errorZoomIn 0.2s;
    color: red;
    height: 24px;
}

@keyframes errorZoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}






#forgot-password-container.zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#forgot-password-container.zoom-out {
    animation: zoomOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#container.zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#container.zoom-out {
    animation: zoomOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}



@keyframes zoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
        filter: blur(2px);
    }

    to {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }

    to {
        transform: scale(0.85);
        opacity: 0;
        filter: blur(2px);
    }
}






.email-loading {
    display: none;
    justify-content: center;
    align-items: center;
    height: 100%;
    border: none;
    outline: none;
    position: relative;
    background: transparent;
    width: 100%;
    box-shadow: none;
    animation: none !important;
    background: transparent !important;
}

.email-loading img {
    display: block;
    max-width: 100px;
    max-height: 50px;
    margin: 0 auto;
}