* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: #f7f4ea;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ================= CONTAINER ================= */

.container {
    width: 900px;
    height: 550px;
    background: white;
    border-radius: 20px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ================= IMAGE PANEL ================= */

.image-panel {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #c0b9dd;
    transition: transform 0.6s ease-in-out;
}

.image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Purple inner border */
.image-panel::before {
    content: "";
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    border: 3px solid #8475BD;
    border-radius: 15px;
    pointer-events: none;
}

/* ================= FORM BOX ================= */

.form-box {
    position: absolute;
    width: 50%;
    height: 100%;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.6s ease-in-out;
}


.form-box h2 {
    margin-bottom: 25px;
    color: #8475BD;
}

.form-box input {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ded9e2;
    border-radius: 8px;
    outline: none;
}

.form-box input:focus {
    border-color: #8475BD;
    box-shadow: 0 0 6px rgba(132,117,189,0.3);
}

.form-box button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #8475BD;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
}

.form-box button:hover {
    background: #6f61a8;
}

.form-box p {
    margin-top: 15px;
    font-size: 14px;
}

.switch {
    color: #8475BD;
    cursor: pointer;
    font-weight: 500;
}

/* ================= REGISTER POSITION ================= */

.register {
    position: absolute;
    left: 100%;
    top: 0;
}
.login {
    left: 50%;
}

.register {
    left: -50%;
}


/* ================= SLIDING EFFECT ================= */


.container.active .image-panel {
    transform: translateX(100%);
}

.container.active .login {
    transform: translateX(100%);
}

.container.active .register {
    transform: translateX(100%);
}




/* ================= MOBILE RESPONSIVE FIX ================= */

@media (max-width: 768px) {

    body {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    .container {
        width: 100%;
        max-width: 400px;
        height: auto;
        border-radius: 25px;
        flex-direction: column;
    }

    .image-panel {
        display: none;
    }

    .form-box {
        position: static !important;
        width: 100%;
        height: auto;
        padding: 30px 20px;
        transform: none !important;
        left: 0 !important;
    }

    .login,
    .register {
        left: 0 !important;
    }

    .register {
        display: none;
    }

    .container.active .login {
        display: none;
    }

    .container.active .register {
        display: flex;
    }

    .form-box button {
        width: 100%;
    }
}




