@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");

.auth-body {
    height: 100vh;
    /* background: #e9ebee; */
    /* Use LuxeSplit background or generic */
    background: #ecfdf5;
    /* emerald-50 */
    color: #1d2129;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    perspective: 1500px;
    overflow: hidden;
}

#container {
    width: 95%;
    max-width: 900px;
    /* Increased width for more fields */
    height: 650px;
    /* Increased height for register form */
    position: relative;
    border-radius: 20px;
    box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.1), 0 10px 10px -10px rgba(0, 0, 0, 0.02);
    transform-style: preserve-3d;
    background: #fff;
}

#container>div {
    position: absolute;
    width: 50%;
    min-width: 350px;
    height: 100%;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.content {
    width: 100%;
    padding: 2em 4em;
    text-align: center;
}

.content h1 {
    font-weight: 700;
    font-size: 2.5em;
    /* Adjusted size */
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    /* Or app's heading font */
    color: #064e3b;
    /* emerald-900 */
}

.content p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #4b5563;
}

/* Forms */
.login {
    left: 0;
    background: #ffffff;
    border-radius: 20px 0 0 20px;
    z-index: 1;
    /* Default */
}

.register {
    right: 0;
    z-index: 1;
    border-radius: 0 20px 20px 0;
    background: #ffffff;
}

/* Buttons */
button.auth-action-btn {
    display: block;
    margin: 1em auto;
    border-radius: 40px;
    border: 1px solid #059669;
    /* emerald-600 */
    background: #059669;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    padding: 0.8em 2em;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in, background-color 0.3s;
    cursor: pointer;
    width: 100%;
}

button.auth-action-btn:hover {
    background: #047857;
    /* emerald-700 */
}

button.auth-action-btn:active {
    transform: scale(0.95);
}

button.ghost {
    background: transparent;
    border-color: #fff;
    margin-top: 20px;
}

/* Inputs */
form input {
    background: #f3f4f6;
    /* slate-100 */
    border: 1px solid #e5e7eb;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    font-size: 1em;
    border-radius: 8px;
    outline: none;
}

form input:focus {
    border-color: #10b981;
    /* emerald-500 */
    background: #fff;
}

/* Page Panels (Overlay) */
.page {
    right: 0;
    color: #fff;
    border-radius: 0 20px 20px 0;
    transform-origin: left center;
    transition: animation 1s linear;
}

.front {
    background: linear-gradient(-45deg, #34d399 0%, #059669 100%) no-repeat 0 0/200%;
    /* Emerald Gradient */
    z-index: 3;
}

.back {
    background: linear-gradient(-45deg, #059669 0%, #34d399 100%) no-repeat 0 0/200%;
    /* Emerald Gradient */
    z-index: 2;
}

.back .content {
    transform: rotateY(180deg);
}

/* Animations */
.active .front {
    animation: rot-front 0.6s ease-in-out normal forwards;
}

.active .back {
    animation: rot-back 0.6s ease-in-out normal forwards;
}

.close .front {
    animation: close-rot-front 0.6s ease-in-out normal forwards;
}

.close .back {
    animation: close-rot-back 0.6s ease-in-out normal forwards;
}

@keyframes rot-front {
    from {
        transform: translateZ(2px) rotateY(0deg);
    }

    to {
        transform: translateZ(1px) rotateY(-180deg);
    }
}

@keyframes close-rot-front {
    from {
        transform: translateZ(1px) rotateY(-180deg);
    }

    to {
        transform: translateZ(2px) rotateY(0deg);
    }
}

@keyframes rot-back {
    from {
        transform: translateZ(1px) rotateY(0deg);
    }

    to {
        transform: translateZ(2px) rotateY(-180deg);
    }
}

@keyframes close-rot-back {
    from {
        transform: translateZ(2px) rotateY(-180deg);
    }

    to {
        transform: translateZ(1px) rotateY(0deg);
    }
}

/* Visibility toggles for form content */
.active .register .content {
    animation: show 0.7s ease-in-out normal forwards;
}

.close .register .content {
    animation: hide 0.7s ease-in-out normal forwards;
}

.active .login .content {
    animation: hide 0.7s ease-in-out normal forwards;
}

.close .login .content {
    animation: show 0.7s ease-in-out normal forwards;
}

@keyframes show {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hide {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }

    #container>div {
        width: 100%;
        min-width: unset;
    }

    .page {
        display: none;
        /* Hide flip effect on mobile, fallback to simple toggle or stack */
        /* Actually, simple toggle is better for mobile with this specific CSS. 
           But this CSS heavily relies on the side-by-side flip. 
           For mobile, we might need a simpler tab switch. 
           For now, I'll keep it as is but be aware it might break on small screens.
           Let's just scale it down.
        */
    }
}