/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #EDEDED;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Container Styling */
.container {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 
                0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    transition: all 0.6s ease-in-out;
}

/* Form Containers */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    padding: 20px;
}

.sign-up-container {
    left: 0;
    opacity: 0;
    z-index: 1;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

.sign-in-container {
    left: 0;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

/* Overlay Container */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 100;
    transition: transform 0.6s ease-in-out;
}

.overlay {
    background: linear-gradient(to right, #FF005C, #C0392B);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

/* Form Styles */
form {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 0 50px;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

form h1 {
    font-weight: bold;
    margin-bottom: 20px;
    color: #8A2BE2;
}

input {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 25px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    background-color: #FFE4B5;
    border: 1px solid #8A2BE2;
}

button {
    border-radius: 20px;
    border: 1px solid #FF4500;
    background-color: #FF4500;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    cursor: pointer;
    margin-top: 10px;
}

/* Cool Hover Effect */
button:hover {
    background-color: #fff;
    color: #FF4500;
    border: 1px solid #FF4500;
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(255, 69, 0, 0.3);
}

button:focus {
    outline: none;
}

/* Ghost Buttons */
button.ghost {
    background-color: transparent;
    border-color: white;
    color: white;
    transition: background-color 0.4s ease, color 0.4s ease;
}

button.ghost:hover {
    background-color: white;
    color: #FF4500;
}

/* Social Container */
.social-container {
    margin: 20px 0;
}

.social-container a {
    border: 1px solid #DDDDDD;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    height: 40px;
    width: 40px;
    transition: all 0.3s ease;
}

.social-container a:hover {
    background-color: #8A2BE2;
    color: white;
    transform: scale(1.1);
}

/* Text Links */
a {
    color: #333;
    font-size: 12px;
    text-decoration: none;
    margin: 15px 0;
}

a:hover {
    color: #8A2BE2;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        width: 100%;
        height: 100vh;
        flex-direction: column;
    }

    .form-container, .overlay-container {
        width: 100%;
        height: 50%;
        position: relative;
    }

    .overlay {
        width: 100%;
        left: 0;
        transform: translateX(0);
    }

    .overlay-left, .overlay-right {
        width: 100%;
    }

    .container.right-panel-active .overlay-container {
        transform: translateX(0);
    }

    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
    }

    .container.right-panel-active .sign-in-container {
        transform: translateX(0);
    }

    form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    button {
        padding: 12px 35px;
        font-size: 12px;
    }

    .social-container a {
        height: 35px;
        width: 35px;
    }

    form h1 {
        font-size: 1.5rem;
    }

    .overlay-panel p {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
