@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(90deg,rgb(255, 210, 104), rgb(255, 204, 83));
    /* background-color: goldrod; */
    overflow: hidden;
}
.background-squares {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: -1; /* Place it behind all other content */
}

.background-squares li {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    /* Light color for the squares to complement the gold background */
    background: rgba(255, 255, 255, 0.966);
    border-radius: 20%;
    /* Start below the screen */
    bottom: -150px;

    /* Attach the animation */
    animation: animateSquares 25s linear infinite;
}

/* Make each square unique */
.background-squares li:nth-child(1) {
    left: 25%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.background-squares li:nth-child(2) {
    left: 10%;
    width: 70px; /* Was 30px */
    height: 70px; /* Was 30px */
    animation-delay: 2s;
    animation-duration: 12s;
}

.background-squares li:nth-child(3) {
    left: 70%;
    width: 40px;
    height: 40px;
    animation-delay: 4s;
}

.background-squares li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.background-squares li:nth-child(5) {
    left: 65%;
    width: 25px;
    height: 25px;
    animation-delay: 0s;
}

.background-squares li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.background-squares li:nth-child(7) {
    left: 35%;
    width: 50px;
    height: 50px;
    animation-delay: 7s;
}

.background-squares li:nth-child(8) {
    left: 50%;
    width: 35px;
    height: 35px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.background-squares li:nth-child(9) {
    left: 20%;
    width: 55px; /* Was 20px */
    height: 55px; /* Was 20px */
    animation-delay: 2s;
    animation-duration: 35s;
}

.background-squares li:nth-child(10) {
    left: 85%;
    width: 130px;
    height: 130px;
    animation-delay: 0s;
    animation-duration: 11s;
}

.background-squares li:nth-child(11) {
    left: 15%;
    width: 85px; /* Was 45px */
    height: 85px; /* Was 45px */
    animation-delay: 6s;
    animation-duration: 28s;
}

.background-squares li:nth-child(12) {
    left: 55%;
    width: 70px;
    height: 70px;
    animation-delay: 8s;
}

.background-squares li:nth-child(13) {
    left: 90%;
    width: 50px;
    height: 50px;
    animation-delay: 1s;
    animation-duration: 14s;
}

.background-squares li:nth-child(14) {
    left: 5%;
    width: 90px;
    height: 90px;
    animation-delay: 10s;
}

.background-squares li:nth-child(15) {
    left: 45%;
    width: 20px;
    height: 20px;
    animation-delay: 12s;
    animation-duration: 22s;
}

/* The animation that moves the squares from bottom to top */
@keyframes animateSquares {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 20%;
    }
    100% {
        transform: translateY(-120vh) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}
.container {
    position: relative;
    width: 850px;
    height: 550px;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.form-box-login,
.form-box-register {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    transition: 0.3s ease-in-out 1s, visibility 0s linear 1s;
}

.form-box-login {
    left: 50%;
    z-index: 1;
}

.container.active .form-box-login {
    left: 100%;
    opacity: 0;
    visibility: hidden;
}

.form-box-register {
    left: 0%;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
}

.container.active .form-box-register {
    opacity: 1;
    visibility: visible;
}

form {
    width: 100%
}

.container h1 {
    font-size: 36px;
    margin: -10px 0;
}

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    padding: 13px 50px 13px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    border-radius: 8px;
    background-color: #eee;
    color: #333;
    font-weight: 500;
}

.input-box input::placeholder {
    color: #888;
    font-weight: 400;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 20px;
}
.error-message {
    color: #D8000C; /* A standard error red */
    font-size: 14.5px;
    font-weight: bold;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 15px;
    /* This prevents the layout from shifting when the message appears */
    min-height: 1.2em;
}
.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    color: #333;
    text-decoration: none;
    font-size: 14.5px;
}
/* Add this to login_page.css */

.input-box i.fa-eye,
.input-box i.fa-eye-slash {
    cursor: pointer;
}

.btn {
    width: 100%;
    height: 48px;
    /* background-color: rgb(255, 190, 37); */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: white;
    font-weight: 600;
}
.btn.login,.btn.signup{
    background: linear-gradient(90deg,
            rgb(255, 190, 37),
            rgb(255, 232, 80),
            rgb(255, 190, 37));;
}
.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

.toggle-box::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 160%;
    left: -109%;
     background: linear-gradient(90deg,
            rgb(255, 190, 37),
            rgb(255, 232, 80),
            rgb(255, 190, 37));;
    background-size: 300% auto;
    animation: goldShine 2s linear infinite;
    border-radius: 150px;
    z-index: 2;
    transition: 1.8s ease-in-out;
}

@keyframes goldShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 100% center;
    }
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    transition: all 0.6s ease-in-out;
    z-index: 3;
}

.toggle-panel.toggle-left {
    color: black;
}

.toggle-panel p {
    margin: 10px 0;
    font-size: 16px;
}

.toggle-panel .btn {
    width: 160px;
    height: 40px;
    background-color: black;
    border: 2px solid black;
    box-shadow: none;
}

.toggle-left {
    left: 0;
    opacity: 1;
    visibility: visible;
}

.toggle-right {
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
}

.container.active .toggle-left {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
}

.container.active .toggle-right {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media screen and (max-width: 650px) {

    /* 1. Main container styles */
    .container {
        width: 90%;
        max-width: 420px;
        height: 720px;
        border-radius: 20px;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
        position: relative;
        overflow: hidden;
    }

    /* Hide the desktop background element */
    .toggle-box::before {
        display: none;
    }

    /* 2. Common style for both toggle panels */
    .toggle-panel {
        position: absolute;
        width: 100%;
        left: 0;
        padding: 0 30px;
        background: linear-gradient(90deg, rgb(255, 190, 37), rgb(255, 214, 98));
        color: #333;
        transition: transform 0.6s ease-in-out;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Style the buttons on the panels */
    .toggle-panel .btn {
        background-color: #333;
        color: white;
        border: none;
        width: 140px;
    }

    /* 3. Position the TOP panel ("Hello, Welcome...") */
    .toggle-left {
        height: 250px;
        top: 0;
        border-radius: 0 0 70px 70px;
        transform: translateY(0);
        padding-top: 30px; 
    }

    /* 4. Position the BOTTOM panel ("Welcome Back!") */
    .toggle-right {
        height: 250px;
        top: auto;
        bottom: 0;
        border-radius: 70px 70px 0 0;
        transform: translateY(100%);
        padding-bottom: 30px; 
    }

    /* 5. Define the slide animations */
    .container.active .toggle-left {
        transform: translateY(-100%);
    }

    .container.active .toggle-right {
        transform: translateY(0);
    }

    /* 6. Position the Login and Register forms */
    .form-box-login,
    .form-box-register {
        position: absolute;
        width: 100%;
        left: 0;
        background: #fff;
        transition: opacity 0.6s ease-in-out, visibility 0s;
        padding-left: 40px;
        padding-right: 40px;
        align-items: flex-start;
    }

    /* The Login form sits below the top panel */
    .form-box-login {
        top: 260px;
        height: calc(100% - 200px);
        padding-top: 60px;
    }

    /* The Register form sits above the bottom panel */
    .form-box-register {
        top: -20px;
        height: calc(100% - 180px);
        padding-top: 120px; /* FIX: Increased padding to move content down */
    }

    /* Handle which form is visible */
    .container.active .form-box-login {
        opacity: 0;
        visibility: hidden;
    }

    .container.active .form-box-register {
        opacity: 1;
        visibility: visible;
    }
}
@media screen and (max-width: 375px) {
    
    /* Adjust the main form box's top padding */
    .form-box-register {
        padding-top: 80px; 
    }

    /* Reduce spacing between input fields */
    .form-box-register .input-box {
        margin: 20px 0;
    }

    /* THE FIX: Add space below the SignUp button */
    .form-box-register .btn {
        margin-bottom: 100px;
    }
}