@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f7ff;
}

.container {
    position: relative;
    width: 850px;
    height: 550px;
    background: #FFFFFF;
    border: 2px solid #E9F4FF;
    box-shadow: 0 0 50px rgba(79, 163, 255, 0.5);
    border-radius: 20px;
    overflow: hidden;
    /* Entry Transition */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container .form-box {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.form-box.Login {
    left: 0;
    padding: 0 40px;
}

.form-box.Login .animation {
    transform: translateX(0%);
    transition: .7s;
    opacity: 1;
    transition-delay: calc(.1s * var(--S));
}

.container.active .form-box.Login .animation {
    transform: translateX(-120%);
    opacity: 0;
    transition-delay: calc(.1s * var(--D));
}

.form-box.Register {
    /* display: none; */
    right: 0;
    padding: 0 60px;
}

.form-box.Register .animation {
    transform: translateX(120%);
    transition: .7s ease;
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--S));
}

.container.active .form-box.Register .animation {
    transform: translateX(0%);
    opacity: 1;
    filter: blur(0px);
    transition-delay: calc(.1s * var(--li));
}

.form-box h2 {
    font-size: 32px;
    text-align: center;
    color: #4FA3FF;
}

.form-box .input-box {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 25px;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #E9F4FF;
    padding-right: 23px;
    transition: .5s;
    text-align: right;
}

.input-box input:focus,
.input-box input:valid {
    border-bottom: 2px solid #4FA3FF;
}

.input-box label {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    transition: .5s;
    pointer-events: none;
}

.input-box input:focus~label,
.input-box input:valid~label {
    top: -5px;
    color: #4FA3FF;
}

.input-box box-icon {
    position: absolute;
    top: 50%;
    left: 0;
    font-size: 18px;
    transform: translateY(-50%);
    color: #aaa;
}

.input-box input:focus~box-icon,
.input-box input:valid~box-icon {
    color: #4FA3FF;
}

.btn {
    position: relative;
    width: 100%;
    height: 45px;
    background: linear-gradient(135deg, #F4B400, #E0A800);
    border-radius: 40px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border: none;
    overflow: hidden;
    z-index: 1;
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 180, 0, 0.4);
}

.btn::before {
    content: "";
    position: absolute;
    height: 300%;
    width: 100%;
    background: linear-gradient(#F4B400, #E0A800, #F4B400, #E0A800);
    top: -100%;
    left: 0;
    z-index: -1;
    transition: .5s;
}

.btn:hover:before {
    top: 0;
}

.regi-link {
    font-size: 14px;
    text-align: center;
    margin: 20px 0 10px;
}

.regi-link a {
    text-decoration: none;
    color: #4FA3FF;
    font-weight: 600;
}

.regi-link a:hover {
    text-decoration: underline;
}

.info-content {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.info-content.Login {
    right: 0;
    text-align: right;
    padding: 0 40px 60px 150px;
}

.info-content.Login .animation {
    transform: translateX(0);
    transition: .7s ease;
    transition-delay: calc(.1s * var(--S));
    opacity: 1;
    filter: blur(0px);
}

.container.active .info-content.Login .animation {
    transform: translateX(120%);
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--D));
}

.info-content.Register {
    /* display: none; */
    left: 0;
    text-align: left;
    padding: 0 150px 60px 38px;
    pointer-events: none;
}

.info-content.Register .animation {
    transform: translateX(-120%);
    transition: .7s ease;
    opacity: 0;
    filter: blur(10PX);
    transition-delay: calc(.1s * var(--S));
}

.container.active .info-content.Register .animation {
    transform: translateX(0%);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--li));
}

.info-content h2 {
    text-transform: uppercase;
    font-size: 36px;
    line-height: 1.3;
}

.info-content p {
    font-size: 16px;
    color: #fff;
}

.info-content h2 {
    color: #fff;
}

.container .curved-shape {
    position: absolute;
    right: 0;
    top: -5px;
    height: 700px;
    width: 950px;
    background: linear-gradient(45deg, #4FA3FF, #2563eb);
    /*transform: rotate(10deg) skewY(40deg);*/
    transform: rotate(10deg) skewY(40deg);
    transform-origin: bottom right;
    transition: 1.5s ease;
    transition-delay: 1.6s;
}

.container.active .curved-shape {
    transform: rotate(0deg) skewY(0deg);
    transition-delay: .5s;
}

.container .curved-shape2 {
    position: absolute;
    left: 250px;
    top: 100%;
    height: 800px;
    width: 950px;
    background: #fff;
    border-top: 3px solid #4FA3FF;
    transform: rotate(0deg) skewY(0deg);
    transform-origin: bottom left;
    transition: 1.5s ease;
    transition-delay: .5s;
}

.container.active .curved-shape2 {
    transform: rotate(-11deg) skewY(-41deg);
    transition-delay: 1.2s;
}

.social-container {
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.social-container a {
    border: 1px solid #DDDDDD;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
    font-size: 18px;
}

.social-container a:hover {
    background-color: #eee;
    color: #4FA3FF;
    border-color: #4FA3FF;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 400px;
        height: 600px;
        box-shadow: none;
        border: none;
        background: transparent;
        overflow: hidden;
        perspective: none;
    }

    .container .curved-shape,
    .container .curved-shape2 {
        display: none;
    }

    /* The Curtain Overlay */
    .container::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #4fa3ff, #007bff);
        /* Blue theme matching buttons */
        z-index: 100;
        transform: translateX(-100%);
        /* Start hidden left */
        transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    }

    .container.active::after {
        transform: translateX(100%);
        /* Move to hidden right */
        /* To make it wipe back on remove, we rely on the same transition reversing */
    }

    .container .form-box {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        padding: 20px;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        position: absolute;
        transition: opacity 0.1s ease, visibility 0.1s ease;
        /* Instant swap hidden behind curtain */
    }

    .form-box.Login {
        z-index: 2;
        opacity: 1;
        visibility: visible;
        transition-delay: 0.35s;
        /* Wait for curtain to cover (approx 40-50% of 0.8s) */
    }

    .container.active .form-box.Login {
        opacity: 0;
        visibility: hidden;
        transition-delay: 0.35s;
    }

    .form-box.Register {
        z-index: 1;
        opacity: 0;
        visibility: hidden;
        transition-delay: 0.35s;
    }

    .container.active .form-box.Register {
        opacity: 1;
        visibility: visible;
        z-index: 2;
        transition-delay: 0.35s;
    }

    .info-content {
        display: none;
    }

    .form-box .animation {
        transform: translateX(0) !important;
        opacity: 1 !important;
        filter: blur(0) !important;
        transition: none !important;
    }
}