* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh; /* Changed from height to min-height */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

h1 {
    font-weight: bold;
    margin: 0;
    margin-bottom: 15px;
    color: #DB4437;
}

h2 {
    text-align: center;
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span {
    font-size: 14px;
    margin-bottom: 25px;
    color: #FF4B2B;
}

a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
    transition: 0.3s;
}

a:hover {
    color: #FF4B2B;
}

button {
    border-radius: 20px;
    border: 1px solid #FF4B2B;
    background: linear-gradient(to right, #FF4B2B, #FF416C);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background: #DB4437;
    border-color: #DB4437;
}

button:active {
    transform: scale(0.95);
}

button:focus {
    outline: none;
}

button.ghost {
    background-color: transparent;
    border-color: #FFFFFF;
}

button.ghost:hover {
    background-color: #FFFFFF;
    color: #FF4B2B;
}

form {
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: #eee;
    border: none;
    border-radius: 5px;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

input:focus {
    outline: 1px solid #DB4437;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    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: 100%;
    max-width: 900px;
    min-height: 700px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-up-container {
    width: 50%;
    z-index: 1;
}

.input-container {
    width: 100%;
    margin-bottom: 5px;
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 99;
    transition: all 0.6s ease-in-out; /* Add smooth transitions for better UX */
}

.overlay {
    background: linear-gradient(to right, #FF4B2B, #FF416C);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
}

.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%;
}

.overlay-right {
    right: 0;
}

.gmail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.3s;
}

.gmail-btn:hover {
    background-color: #f5f5f5;
    border-color: #DB4437;
}

.gmail-btn i {
    margin-right: 10px;
    color: #DB4437;
}

.back-home-btn {
    margin-top: 15px;
    color: #333;
}

.login-link {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

/* Error message styling */
.error-message {
    color: #DB4437;
    font-size: 14px;
    margin-top: 2px;
    margin-bottom: 5px;
    text-align: left;
    width: 100%;
    display: none;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        min-height: 800px;
    }
    
    .sign-up-container {
        width: 100%;
    }
    
    .overlay-container {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        display: block; /* Display the overlay below the form */
    }

    .overlay {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .overlay-panel {
        width: 100%;
        height: auto;
        padding: 20px;
    }
}