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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    padding-top: 100px;
    padding-bottom: 40px;
    background: #feead4;
    overflow-x: hidden;
}

body, input, button, select, textarea {
    font-family: 'Montserrat', sans-serif;
}

.container {
    position: relative;
    width: 100%;
    background-color: #fff;
    min-height: 100vh;
    overflow: hidden;
}

.forms-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.signin-signup {
    position: absolute;
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
    width: 50%;
    display: grid;
    grid-template-columns: 1fr;
    z-index: 100; /* Higher z-index to ensure clickability */
    pointer-events: auto; /* Ensure the form is clickable */
}

form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 5rem;
    overflow: hidden;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    transition: 0.2s 0.7s ease-in-out;
}

form.sign-in-form {
    z-index: 2;
    position: relative;
}

/* Mobile Sign Up Button */
.mobile-signup-btn {
    display: none; /* Hidden by default */
    width: 100%;
    max-width: 380px;
    height: 45px;
    margin: 10px auto;
    background: #f0f0f0;
    border: 2px solid #F86F03;
    color: #F86F03;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 41px;
}

.mobile-signup-btn:hover {
    background: #F86F03;
    color: white;
}

/* Show only on mobile */
@media (max-width: 870px) {
    .mobile-signup-btn {
        display: block;
    }
    
    /* Adjust form container for the extra button */
    form.sign-in-form {
        padding-bottom: 15px;
    }
}

form.sign-up-form {
    opacity: 0;
    z-index: 1;
}

.title {
    font-size: 2.2rem;
    color: #444;
    margin-bottom: 10px;
}

.input-field {
    max-width: 380px;
    width: 100%;
    height: 50px;
    background-color: #f0f0f0;
    margin: 8px 0;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 15% 85%;
    padding: 0 0.4rem;
    position: relative;
    transition: all 0.3s ease;
}

.input-field i {
    text-align: center;
    line-height: 55px;
    color: #acacac;
    font-size: 1.1rem;
}

.input-field input, 
.input-field select {
    background: none;
    outline: none;
    border: none;
    line-height: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    width: 100%;
    padding-right: 35px;
}

.input-field input::placeholder {
    color: #aaa;
    font-weight: 500;
}

.input-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.input-field .fa-eye,
.input-field .fa-eye-slash {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    z-index: 2;
}

/* Button Styles */
.btn {
    width: 150px;
    height: 49px;
    outline: none;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #F86F03, #FFA41B);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 111, 3, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: linear-gradient(45deg, #FF8C00, #FFA500);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 111, 3, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(248, 111, 3, 0.3);
}

/* Transparent Button (for panel toggles) */
.btn.transparent {
    margin: 0;
    background: none;
    border: 2px solid #fff;
    width: 130px;
    height: 41px;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn.transparent:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn.transparent:active {
    transform: translateY(0);
}

/* Submit Buttons */
input[type="submit"].submit {
    width: 150px;
    height: 49px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #F86F03, #FFA41B);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 111, 3, 0.3);
    position: relative;
    z-index: 101; /* Ensure button is above other elements */
    pointer-events: auto; /* Make sure button is clickable */
}

input[type="submit"].submit:hover {
    background: linear-gradient(45deg, #FF8C00, #FFA500);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 111, 3, 0.4);
}

input[type="submit"].submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(248, 111, 3, 0.3);
}

/* Button focus state */
.btn:focus,
input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(248, 111, 3, 0.3);
}

/* Disabled state */
.btn:disabled,
input[type="submit"]:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.panels-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-around;
    text-align: center;
    z-index: 10; /* Slightly higher than default but lower than forms */
    position: relative;
}

.left-panel {
    pointer-events: all;
    padding: 3rem 17% 2rem 12%;
}

.right-panel {
    pointer-events: none; /* This prevents clicks from being blocked */
    padding: 3rem 12% 2rem 17%;
}

.panel .content {
    color: #fff;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.6s;
}

.panel h3 {
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1;
}

.panel p {
    font-size: 0.95rem;
    padding: 0.7rem 0;
}

.image {
    width: 100%;
    transition: transform 1.1s ease-in-out;
    transition-delay: 0.4s;
    max-width: 100%;
    height: auto;
}

.right-panel .content,
.right-panel .image {
    transform: translateX(800px);
}

/* ANIMATION */
.container.sign-up-mode:before {
    transform: translate(100%, -50%);
    right: 52%;
}

.container.sign-up-mode .left-panel .image,
.container.sign-up-mode .left-panel .content {
    transform: translateX(-800px);
}

.container.sign-up-mode .right-panel .content,
.container.sign-up-mode .right-panel .image {
    transform: translateX(0px);
}

.container.sign-up-mode .left-panel {
    pointer-events: none;
}

.container.sign-up-mode .right-panel {
    pointer-events: all;
}

.container.sign-up-mode .signin-signup {
    left: 25%;
}

.container.sign-up-mode form.sign-in-form {
    opacity: 0;
    z-index: 1;
}

.container.sign-up-mode form.sign-up-form {
    opacity: 1;
    z-index: 100; /* Higher z-index */
    position: relative;
    pointer-events: auto; /* Make sure form is interactive */
}

.container:before {
    content: "";
    position: absolute;
    height: 2000px;
    width: 2000px;
    top: -10%;
    right: 48%;
    transform: translateY(-50%);
    background-image: linear-gradient(-45deg, #F86F03 0%, #FFA41B 100%);
    border-radius: 50%;
    z-index: 5; /* Lower than forms */
    transition: 1.8s ease-in-out;
}

/* ALERTS */
.alert {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .panel {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 2.5rem 8%;
    }

    .panel .content {
        padding-right: 0;
    }

    .panel h3 {
        font-size: 1.2rem;
    }

    .panel p {
        font-size: 0.7rem;
        padding: 0.5rem 0;
    }

    .btn.transparent {
        width: 110px;
        height: 35px;
        font-size: 0.7rem;
    }
}

@media (max-width: 870px) {
    .container {
        min-height: 800px;
        height: 100vh;
        position: relative;
    }

    .signin-signup {
        width: 100%;
        left: 50%;
        top: 95%;
        transform: translate(-50%, -100%);
        transition: 1s 0.8s ease-in-out;
    }

    .panels-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 2fr 1fr;
    }

    .panel {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 2.5rem 8%;
        grid-column: 1 / 2;
    }

    .right-panel {
        grid-row: 3 / 4;
    }

    .left-panel {
        grid-row: 1 / 2;
    }

    .image {
        width: 200px;
        transition: transform 0.9s ease-in-out;
        transition-delay: 0.6s;
    }

    .panel .content {
        padding-right: 15%;
        transition: transform 0.9s ease-in-out;
        transition-delay: 0.8s;
    }

    .panel h3 {
        font-size: 1.2rem;
    }

    .panel p {
        font-size: 0.7rem;
        padding: 0.5rem 0;
    }

    .btn.transparent {
        width: 110px;
        height: 35px;
        font-size: 0.7rem;
    }

    .container:before {
        width: 1500px;
        height: 1500px;
        left: 30%;
        bottom: 68%;
        transform: translateX(-50%);
        right: initial;
        top: initial;
        transition: 2s ease-in-out;
    }

    .container:before {
        content: none !important;
    }

    .container.sign-up-mode:before {
        transform: translate(-50%, 100%);
        bottom: 32%;
        right: initial;
    }

    .container.sign-up-mode .left-panel .image,
    .container.sign-up-mode .left-panel .content {
        transform: translateY(-300px);
    }

    .container.sign-up-mode .right-panel .image,
    .container.sign-up-mode .right-panel .content {
        transform: translateY(0);
    }

    .right-panel .image,
    .right-panel .content {
        transform: translateY(300px);
    }

    .right-panel .content,
    .right-panel .image,
    .container.sign-up-mode .right-panel .content,
    .container.sign-up-mode .right-panel .image {
        transform: none !important;
        transition: none !important;
    }

        .container.sign-up-mode .signin-signup {
        top: 5%;
        transform: translate(-50%, 0);
        left: 50%;
        z-index: 100; /* Higher z-index for mobile */
        pointer-events: auto; /* Ensure it's clickable */
    }
}

@media (max-width: 570px) {
    form {
        padding: 0 1.2rem;
    }

    .image {
        display: none;
    }

    .panel .content {
        padding: 0.3rem 0.8rem;
    }

    .container:before {
        bottom: 72%;
        left: 50%;
    }

    .container.sign-up-mode:before {
        bottom: 28%;
        left: 50%;
    }

    .container.sign-up-mode .signin-signup {
        top: 3%;
    }
    
    /* More compact form fields for mobile */
    .input-field {
        height: 45px !important;
        margin: 6px 0 !important;
    }
    
    .input-field i {
        line-height: 45px !important;
        font-size: 1rem !important;
    }
    
    .input-field input,
    .input-field select {
        font-size: 0.9rem !important;
        padding-right: 30px !important;
    }
    
    .input-field .fa-eye,
    .input-field .fa-eye-slash {
        right: 8px !important;
    }
    
    .title {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }
    
    .btn,
    input[type="submit"].submit {
        height: 44px !important;
        margin: 8px 0 !important;
        font-size: 0.85rem !important;
    }
    
    .btn.transparent {
        height: 38px !important;
        font-size: 0.75rem !important;
    }
    
    /* Adjust form container height */
    .container.sign-up-mode .signin-signup {
        height: 85% !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Make sure form is scrollable on small screens */
    .forms-container {
        height: 100%;
    }
    
    .signin-signup {
        height: 100%;
    }

}

/* Small Mobile Devices */
@media (max-width: 480px) {
    body {
        padding-top: 70px;
        padding-bottom: 20px;
    }
    
    .panel .content {
        padding: 0.3rem;
    }
    
    .panel h3 {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }
    
    .panel p {
        display: none;
    }
    
    /* Even more compact form fields for very small screens */
    .input-field {
        height: 42px !important;
        margin: 5px 0 !important;
    }
    
    .input-field i {
        line-height: 42px !important;
        font-size: 0.9rem !important;
    }
    
    .input-field input,
    .input-field select {
        font-size: 0.85rem !important;
        padding-right: 28px !important;
    }
    
    .title {
        font-size: 1.6rem !important;
        margin-bottom: 6px !important;
    }
    
    .btn,
    input[type="submit"].submit {
        height: 42px !important;
        margin: 6px 0 !important;
        font-size: 0.8rem !important;
        padding: 0 12px;
    }
    
    .btn.transparent {
        height: 36px !important;
        font-size: 0.7rem !important;
        padding: 0 10px;
    }
    
    /* Adjust form container for very small screens */
    .container.sign-up-mode .signin-signup {
        top: 2% !important;
        height: 88% !important;
    }
    
    .btn.transparent {
        width: 90px;
        height: 32px;
        font-size: 0.65rem;
    }
    
    .title {
        font-size: 1.5rem;
        margin: 8px 0;
    }
    
    .input-field {
        height: 45px;
        margin: 6px 0;
    }
    
    .input-field i {
        line-height: 45px;
        font-size: 1rem;
    }
    
    .input-field input,
    .input-field select {
        font-size: 0.9rem;
    }
    
    .submit {
        height: 45px;
        font-size: 0.9rem;
    }
    
    .alert {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    form.sign-in-form,
    form.sign-up-form {
        padding: 1.2rem 1.5rem !important;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    body {
        padding-top: 70px;
    }
    
    .panel .content {
        padding: 0.3rem;
    }
    
    .panel h3 {
        font-size: 0.9rem;
    }
    
    .btn.transparent {
        width: 80px;
        height: 30px;
        font-size: 0.6rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .input-field {
        height: 42px;
    }
    
    .input-field i {
        line-height: 42px;
    }
    
    .submit {
        height: 42px;
        font-size: 0.85rem;
    }
    
    form.sign-in-form,
    form.sign-up-form {
        padding: 1rem 1.2rem !important;
    }
}