*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial;
}

body{
    background: linear-gradient(135deg, #ffffff, #f3f6fa);
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
    font-family: Arial, sans-serif;
}

/* CONTAINER */
.container{
    background:#fff;
    border-radius:30px;
    position:relative;
    overflow:hidden;
    width:900px;
    max-width:100%;
    min-height:600px;
    box-shadow:0 20px 50px rgba(0,0,0,0.12);
}

/* FORM */
.form-container{
    position:absolute;
    top:0;
    height:100%;
    transition:all 0.6s ease-in-out;
}

.sign-in{
    left:0;
    width:50%;
    z-index:2;
}

.container.active .sign-in{
    transform:translateX(100%);
}

.sign-up{
    left:0;
    width:50%;
    opacity:0;
    z-index:1;
}

.container.active .sign-up{
    transform:translateX(100%);
    opacity:1;
    z-index:5;
}

/* FORM STYLE */
form{
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    padding:40px;
    height:100%;
}

.title-h1 {
    margin-bottom:20px;
    color:#19516B;
}

/* INPUT */
input,
select,
textarea{
    background:#f4f7fb;
    border:none;
    margin:8px 0;
    padding:12px 15px;
    width:100%;
    border-radius:10px;
    outline:none;
    transition:0.3s;
}

input:focus,
select:focus,
textarea:focus{
    box-shadow:0 0 0 2px rgba(25,81,107,0.2);
}

/* TEXTAREA */
textarea{
    resize:none;
    height:80px;
    text-transform: capitalize;
}

/* BUTTON */
button{
    background:#19516B;
    color:white;
    border:none;
    padding:12px 45px;
    border-radius:30px;
    margin-top:15px;
    cursor:pointer;
    transition:0.3s ease;
    font-weight:600;
}

button:hover{
    background:#143d52;
    transform:translateY(-2px);
}

/* OPTIONAL OUTLINE BUTTON */
.hidden{
    background:transparent;
    border:2px solid white;
}

/* TOGGLE */
.toggle-container{
    position:absolute;
    top:0;
    left:50%;
    width:50%;
    height:100%;
    overflow:hidden;
    transition:all 0.6s ease-in-out;
    border-radius:150px 0 0 100px;
    z-index:1000;
}

.container.active .toggle-container{
    transform:translateX(-100%);
    border-radius:0 150px 100px 0;
}

.toggle{
    background:linear-gradient(135deg,#19516B,#2c6f8f);
    height:100%;
    color:white;
    position:relative;
    left:-100%;
    width:200%;
    transition:all 0.6s ease-in-out;
}

.container.active .toggle{
    transform:translateX(50%);
}

.toggle-panel{
    position:absolute;
    width:50%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    padding:40px;
    text-align:center;
    top:0;
}

.toggle-left{
    transform:translateX(-200%);
}

.toggle-left-h1{
    margin-bottom:20px;
    color:#fff;
}

.container.active .toggle-left{
    transform:translateX(0);
}

.toggle-right{
    right:0;
    transform:translateX(0);
}

.container.active .toggle-right{
    transform:translateX(200%);
}

/* MESSAGE */
.message{
    position:absolute;
    top:20px;
    padding:10px 20px;
    border-radius:10px;
    color:white;
}

.error{
    background:#e74c3c;
}

.success{
    background:#2ecc71;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 768px) {

    body {
        padding: 15px;
        height: 100vh;
    }

    .container {
        width: 100%;
        min-height: 550px;
    }

    /* KEEP SPLIT LAYOUT (IMPORTANT) */
    .sign-in,
    .sign-up {
        width: 50%;
    }

    form {
        padding: 25px 15px;
    }

    h1 {
        font-size: 20px;
    }

    input,
    select,
    textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    button {
        padding: 10px 30px;
    }

    /* toggle stays visible */
    .toggle-container {
        display: block;
    }
}

@media (max-width: 600px) {

    .container {
        min-height: 500px;
    }

    .sign-in,
    .sign-up {
        width: 50%; /* STILL split */
    }

    form {
        padding: 20px 10px;
    }

    h1 {
        font-size: 18px;
    }

    button {
        width: auto; /* jangan full width */
    }
}

@media (max-width: 400px) {

    .container {
        border-radius: 20px;
    }

    .sign-in,
    .sign-up {
        width: 50%;
    }

    input,
    select,
    textarea {
        font-size: 13px;
    }
}