@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{
    --white: #ffffff;
    --black: #000; 
    --lightBulue: #007DB6;
}

*{
    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;
    background: #e6f3ff;  /* Light sky blue background */
}

/* Add logo background styles */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh; /* 30% of viewport height */
    /* background-image: url('blueriverlogo.svg'); Company logo */
    background-repeat: no-repeat;
    background-position: center bottom -100px;
    background-size: contain;
    opacity: 0.6; /* Make it subtle */
    pointer-events: none; /* Prevent it from interfering with clicks */
    z-index: -1; /* Place it behind other content */
}

.wrapper{
    position: relative;
    width: 750px;
    height: 450px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(94, 94, 94, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 1;
}

.wrapper img {
    width: 500px; /* Increased from default size */
    height: auto; /* Maintains aspect ratio */
    margin-bottom: 20px;
}

.wrapper .form-box{
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.wrapper .form-box.login{
    left: 0;
    padding: 0 60px 0 40px;
}

.form-box h2{
    margin-bottom: 10px;
    position: relative;
    font-size: 32px;
    color: var(--black);
    text-align: center;
}

.form-box h2::after{
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--black);
}

.form-box .input-box{
    position: relative;
    width: 100%;
    height: 50px;
    margin: 25px 0;
}

.input-box input{
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    border: none;
    outline: none;
    border-bottom: 2px solid var(--black);
    transition: .5s;
    padding-right: 23px;
}

.input-box input:focus,
.input-box input:valid{
    border-bottom-color: var(--lightBulue);
}

.input-box label{
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--black);
    pointer-events: none;
    transition: 0.5s;
}


.input-box input:focus~label,
.input-box input:valid~label{
    top: -5px;
    color: var(--lightBulue);
}


.input-box i{
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 18px;
    transition: 0.5s;
}

.input-box input:focus~i,
.input-box input:valid~i{
    color: var(--lightBulue);
}

.input-box select {
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    border: none;
    outline: none;
    border-bottom: 2px solid var(--black);
    transition: .5s;
    padding-right: 23px;
    cursor: pointer;
}

.input-box select:focus {
    border-bottom-color: var(--lightBulue);
}

.input-box select option {
    background: var(--white);
    color: var(--black);
}

form button{
    width: 100%;
    height: 45px;
    background-color: var(--lightBulue);
    color: var(--white);
    border: none;
    outline: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all .3s ease; /* Added 'all' to smooth transition all properties */
}

form button:hover{
    background-color: #004b6e;
    color: #e6e6e6; /* Slightly dimmed white for hover */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: scale(1.02); /* Slight grow effect */
}

form .linkTxt{
    font-size: 14px;
    color: var(--black);
    text-align: center;
    margin: 20px 0 10px;
}

.linkTxt p a{
    color: blue;
    text-decoration: none;
    font-weight: 600;
}

.wrapper .form-box.login .animation{
    transform: translateX(0);
    transition: 0.7s ease;
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--j));
}


.wrapper.active .form-box.login .animation{
    transform: translateX(-120%);
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--i));
}






.wrapper .info-text{
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wrapper .info-text.login{
    right: 0;
    text-align: right;
    padding: 0 40px 60px 150px;

}

.wrapper .info-text h2{
    font-size: 42px;  /* Increased from 36px */
    color: var(--white);  /* Changed to white */
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 800;  /* Made even bolder */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;  /* Added letter spacing for better readability */
}

.wrapper .info-text p{
    font-size: 20px;
    color: var(--white);
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;  /* Slight letter spacing for body text */
}


.wrapper .info-text.login .animation{
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition: 0.7s ease;
    transition-delay: calc(.1s * var(--j));
}
.wrapper.active .info-text.login .animation{
    transform: translateX(120px);
    opacity: 0;
    filter: blur(10px);
    transition: 0.7s ease;
    transition-delay: calc(.1s * var(--i));
}





.wrapper .rotate-bg{
    position: absolute;
    top: -4px;
    right: 0;
    width: 850px;
    height: 600px;
    background: rgba(0, 125, 182, 0.6);  /* Changed to semi-transparent logo color */
    transform: rotate(10deg) skewY(40deg);
    transform-origin: bottom right;
    transition: 1.5s ease;
    transition-delay: 1.6s;
}

.wrapper.active .rotate-bg{
    transform: rotate(0) skewY(0);
    transition-delay: 0.5s;
}











.wrapper .form-box.register{
    padding: 0 40px 0 60px;
    right: 0;
}

.wrapper.active .form-box.register{
    pointer-events: auto;
}


.wrapper .form-box.register .animation{
    transform: translateX(120%);
    opacity: 0;
    filter: blur(10px);
    transition: .7s ease;
    transition-delay: calc(.1s * var(--j));
}

.wrapper.active .form-box.register .animation{
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--i));
}



.wrapper .info-text.register{
    left: 0;
    text-align: left;
    padding: 0 150px 60px 40px;
    pointer-events: none;
}

.wrapper.active .info-text.register{
    pointer-events: auto;
}


.wrapper .info-text.register .animation{
    transform: translateX(-120%);
    opacity: 0;
    filter: blur(10px);
    transition: .7s ease;
    transition-delay: calc(.1s * var(--j));
}

.wrapper.active .info-text.register .animation{
    transform: translateX(0);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--i));
}




.wrapper .rotate-bg2{
    position: absolute;
    top: 100%;
    left: 250px;
    width: 850px;
    height: 700px;
    background: rgba(0, 125, 182, 0.4);  /* Changed to more transparent logo color */
    transform: rotate(0) skewY(0);
    transform-origin: bottom left;
    transition: 1.5s ease;
    transition-delay: 0.5s;
}

.wrapper.active .rotate-bg2{
    transform: rotate(-11deg) skewY(-40deg);
    transition-delay: 1.2s;
}
#scrollable-section {
    max-height: 250px; /* Adjust this height according to your preference */
    overflow-y: auto;  /* Enables vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    transform: translateX(120%); /* Initially position it off-screen to the right */
    opacity: 0;  /* Make it invisible initially */
    transition: transform 2.5s ease, opacity 0.7s ease;  /* Match the same transition as the register input boxes */
    transition-delay: calc(.5s * var(--j)); /* Delay to match the transition of the register input boxes */
}

.wrapper.active #scrollable-section {
    transform: translateX(0); /* Bring it to its original position */
    opacity: 1;  /* Make it visible */
}

/* Tablet Responsive Design */
@media screen and (max-width: 768px) {
    .wrapper {
        width: 90%;
        height: auto;
        min-height: 500px;
    }

    .wrapper .form-box.login,
    .wrapper .form-box.register {
        width: 100%;
        padding: 20px;
    }

    .wrapper .info-text {
        display: none; /* Hide info text on tablet */
    }

    .wrapper .rotate-bg,
    .wrapper .rotate-bg2 {
        display: none; /* Hide rotating backgrounds on tablet */
    }

    #scrollable-section {
        max-height: 300px;
    }

    .form-box h2 {
        font-size: 28px;
    }

    .input-box {
        margin: 15px 0;
    }

    body::after {
        height: 25vh; /* Slightly smaller on tablets */
        background-position: center bottom 10px;
    }
}

/* Mobile Responsive Design */
@media screen and (max-width: 480px) {
    .wrapper {
        width: 95%;
        margin: 10px;
        min-height: 450px;
    }

    .form-box h2 {
        font-size: 24px;
    }

    .input-box {
        height: 45px;
        margin: 12px 0;
    }

    .input-box input {
        font-size: 14px;
    }

    .input-box label {
        font-size: 14px;
    }

    form button {
        height: 40px;
        font-size: 14px;
    }

    .linkTxt {
        font-size: 12px;
    }

    #scrollable-section {
        max-height: 250px;
    }

    body::after {
        height: 20vh; /* Even smaller on mobile */
        background-position: center bottom 5px;
    }
}

/* Fix for very small screens */
@media screen and (max-width: 320px) {
    .wrapper {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .form-box h2 {
        font-size: 22px;
    }
}

/* Height-based responsive design */
@media screen and (max-height: 600px) {
    .wrapper {
        height: 95vh;
        margin: 10px auto;
    }

    .form-box h2 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .input-box {
        height: 40px;
        margin: 12px 0;
    }

    #scrollable-section {
        max-height: 180px;
    }

    .info-text h2 {
        font-size: 28px;
    }

    .info-text p {
        font-size: 14px;
    }

    form button {
        height: 35px;
        margin: 10px 0;
    }

    .linkTxt {
        margin: 10px 0;
    }
}

@media screen and (max-height: 450px) {
    .wrapper {
        height: auto;
        min-height: 100vh;
        margin: 0;
    }

    .form-box {
        padding: 15px !important;
    }

    #scrollable-section {
        max-height: 150px;
    }

    .rotate-bg,
    .rotate-bg2 {
        display: none; /* Hide rotating backgrounds on very short screens */
    }

    .info-text {
        display: none; /* Hide info text on very short screens */
    }

    .wrapper .form-box.login,
    .wrapper .form-box.register {
        width: 100%;
    }
}

/* Combined height and width media query for better responsiveness */
@media screen and (max-height: 600px) and (max-width: 768px) {
    .wrapper {
        width: 95%;
        height: auto;
        min-height: 95vh;
        margin: 10px auto;
    }

    #scrollable-section {
        max-height: 200px;
    }

    .form-box {
        padding: 15px 20px !important;
    }
}

/* For taller screens (modern phones, etc) */
@media screen and (min-width: 1080px) and (min-height: 1900px) {
    .wrapper {
        width: 85%;
        max-width: 1000px;
        height: auto;
        min-height: 800px;
        margin: 20px auto;
    }

    .form-box h2 {
        font-size: 42px;
        margin-bottom: 20px;
    }

    .input-box {
        height: 60px;
        margin: 30px 0;
    }

    .input-box input {
        font-size: 18px;
    }

    .input-box label {
        font-size: 18px;
    }

    .input-box i {
        font-size: 22px;
    }

    form button {
        height: 55px;
        font-size: 20px;
        margin: 25px 0;
    }

    .linkTxt {
        font-size: 18px;
        margin: 25px 0;
    }

    #scrollable-section {
        max-height: 500px;
    }

    .info-text h2 {
        font-size: 48px;
    }

    .info-text p {
        font-size: 22px;
        margin-top: 15px;
    }

    /* Adjust rotating backgrounds for taller screens */
    .wrapper .rotate-bg {
        width: 1000px;
        height: 800px;
    }

    .wrapper .rotate-bg2 {
        width: 1000px;
        height: 900px;
    }

    /* Adjust form box padding */
    .wrapper .form-box.login {
        padding: 0 80px 0 60px;
    }

    .wrapper .form-box.register {
        padding: 0 60px 0 80px;
    }

    /* Adjust info text padding */
    .wrapper .info-text.login {
        padding: 0 60px 80px 180px;
    }

    .wrapper .info-text.register {
        padding: 0 180px 80px 60px;
    }

    /* Adjust select dropdown */
    .input-box select {
        height: 60px;
        font-size: 18px;
        padding: 10px;
    }

    body::after {
        height: 25vh;
        background-size: 35% auto;
    }
}

/* For extra tall screens (like 2400px height) */
@media screen and (min-height: 2200px) {
    .wrapper {
        min-height: 1000px;
        margin: 40px auto;
    }

    #scrollable-section {
        max-height: 600px;
    }

    .form-box {
        justify-content: center;
        gap: 20px;
    }

    .input-box {
        margin: 35px 0;
    }

    form button {
        margin: 35px 0;
    }

    .info-text {
        gap: 30px;
    }

    body::after {
        height: 20vh;
        background-size: 30% auto;
    }
}

/* Landscape orientation for tall screens */
@media screen and (min-width: 1080px) and (orientation: landscape) {
    .wrapper {
        flex-direction: row;
        max-height: 90vh;
    }

    #scrollable-section {
        max-height: 400px;
    }

    .form-box {
        padding: 40px !important;
    }
}
