* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #333; /* Dark grey background */
    color: #ccc; /* Light grey text */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    opacity: 0; /* Initial opacity for fade-in */
    animation: fadeIn 3s forwards; /* 3-second fade-in effect */
}

h1 {
    font-weight: bold;
    margin: 0;
    color: #fff; /* White color for headings */
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

a {
    color: #999; /* Light grey color for links */
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

button {
    border-radius: 20px;
    border: 1px solid #444; /* Dark grey border */
    background-color: #444; /* Dark grey background */
    color: #fff; /* White text */
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
    cursor: pointer;
}

button.ghost {
    background-color: transparent;
    border-color: #ccc; /* Light grey border for ghost button */
}

button:hover {
    background-color: #28a745; /* Green hover effect */
    transform: scale(1.05);
    border-color: #fff; /* Matching border on hover */
}

.back-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: none;
}

.container.right-panel-active .back-button {
    display: block;
}

form {
    background-color: #222; /* Very dark grey background for form */
    color: #ccc; /* Light grey text for form */
    display: flex;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

input {
    background-color: #555; /* Dark grey input fields */
    border: none;
    color: #fff; /* White text for inputs */
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

.logo-img {
    position: absolute;
    top: 20px; /* Adjust the value to control the vertical position */
    left: 50%;
    transform: translateX(-50%);
    max-width: 100px; /* Adjust the size of the image */
    height: auto;
    z-index: 101; /* Ensure it stays on top */
}

.container {
    position: relative;
    padding-top: 80px; /* Adjust the padding to avoid overlap with the image */
    background-color: #333; /* Dark grey background */
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 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;
}

.overlay {
    background: #444; /* Dark grey background for overlay */
    background: -webkit-linear-gradient(to right, #444, #888); /* Gradient from dark to lighter grey */
    background: linear-gradient(to right, #444, #888);
    color: #fff; /* White text */
    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;
    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.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.social-button {
    border-radius: 20px;
    border: 1px solid #555; /* Dark grey border for social buttons */
    background-color: #333; /* Dark grey background for social buttons */
    color: #ccc; /* Light grey text for social buttons */
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
    cursor: pointer;
    margin: 10px 0;
}

.social-button:hover {
    background-color: #444; /* Slightly lighter grey on hover */
    border-color: #666; /* Slightly lighter border on hover */
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #222; /* Very dark grey background for footer */
    color: #ccc; /* Light grey text for footer */
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* Fade-in animation */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .container {
        width: 90%;
        min-height: 400px;
    }

    .form-container {
        padding: 0 20px;
    }

    input {
        padding: 10px;
    }

    button {
        padding: 10px 30px;
    }

    .logo-img {
        max-width: 80px; /* Adjust size for smaller screens */
    }

    .social-button {
        padding: 10px 30px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        min-height: 300px;
    }

    .form-container {
        padding: 0 10px;
    }

    input {
        padding: 8px;
    }

    button {
        padding: 8px 20px;
    }

    .logo-img {
        max-width: 60px; /* Further adjust size for very small screens */
    }

    .social-button {
        padding: 8px 20px;
    }
}
