@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    filter: blur(50px);
    z-index: -1;
}

body::before {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 15%;
}

body::after {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 20%;
}


.container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 90%;
    min-height: 480px;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
    color: #333;
}

.container span {
    font-size: 12px;
    color: #555;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.container button {
    background-color: rgba(97, 72, 173, 0.7);
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container button:hover {
    background-color: rgba(81, 45, 168, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.container button.ghost {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
}

.container button.ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 1);
}

.container form {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
    text-align: center;
}

.container h1 {
    color: #333;
}

.container input {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
    color: #333;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.container input::placeholder {
    color: #666;
}

.container input:focus {
    background-color: rgba(255, 255, 255, 0.7);
    border-color: rgba(97, 72, 173, 0.7);
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
    opacity: 1;
    /* Explicitly set opacity */
}

.container.active .sign-in {
    transform: translateX(100%);
    opacity: 0;
    /* <<< FIX: Fade out the sign-in form */
    z-index: 1;
    /* <<< FIX: Move sign-in behind sign-up */
}

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    /* Start hidden */
    z-index: 1;
}

.container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    /* Show the sign-up form */
    z-index: 5;
    /* Bring sign-up to the front */
    animation: move 0.6s;
}

@keyframes move {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    border: 1px solid rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
    color: #333;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: linear-gradient(to right, rgba(92, 107, 192, 0.7), rgba(81, 45, 168, 0.7));
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.container.active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.active .overlay-right {
    transform: translateX(20%);
}