@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #e0e5ec; /* Soft, light gray for a modern feel */
    --form-background: #ffffff;
    --text-color: #333;
    --input-border-color: #d1d9e6; /* Lighter border for inputs */
    --input-focus-color: #6a11cb;
    --link-color: #2575fc;
    --link-hover-color: #6a11cb;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Subtle gradient background */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
    overflow: auto; /* Allow scrollbars if content overflows */
}

.split-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background-color: var(--form-background);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); /* Stronger shadow for depth */
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.branding-panel {
    background: linear-gradient(to bottom right, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 50%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.branding-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05); /* Subtle overlay for texture */
    transform: rotate(45deg);
    pointer-events: none;
}

.branding-panel .logo {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.branding-panel h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.branding-panel p {
    font-size: 1.15rem;
    font-weight: 400;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.form-panel {
    padding: 4rem;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--form-background);
}

.form-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
}

.input-group {
    margin-bottom: 1.5rem; /* Reduced margin */
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem; /* Reduced margin */
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
}

.input-group label.required::after {
    content: '*';
    color: var(--error-color);
    margin-left: 5px;
}

.input-group input {
    width: 100%;
    padding: 1rem; /* Reduced padding */
    border: 1px solid var(--input-border-color);
    border-radius: 10px; /* Slightly more rounded corners */
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    background-color: #f9f9f9; /* Slightly off-white input background */
}

.input-group input:focus {
    outline: none;
    border-color: var(--input-focus-color);
    box-shadow: 0 0 0 4px rgba(106, 17, 203, 0.2); /* More prominent focus shadow */
    background-color: #ffffff;
}

.input-group .error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    display: none;
    margin-top: 5px;
}

.input-group.error input {
    border-color: var(--error-color);
}

.input-group.error .error-message {
    display: block;
}

button {
    width: 100%;
    padding: 1.1rem; /* Reduced padding */
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 10px; /* Slightly more rounded corners */
    font-size: 1.1rem; /* Reduced font size */
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    margin-top: 1.2rem; /* Reduced margin */
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25); /* Stronger shadow on hover */
    background: linear-gradient(to right, #7b20dc, #3a85ff); /* Slightly different gradient on hover */
}

.form-container p {
    margin-top: 2rem; /* Reduced margin */
    font-size: 0.95rem; /* Reduced font size */
    color: #666;
    text-align: center;
}

.form-container p a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.form-container p a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

@media (max-width: 992px) {
    .split-container {
        flex-direction: column;
        min-height: auto;
        width: 90%;
        max-width: 500px;
        margin: 20px auto; /* Add some margin for better spacing on smaller screens */
    }

    .branding-panel {
        width: 100%;
        padding: 3rem;
        text-align: center;
        align-items: center;
    }

    .branding-panel h1 {
        font-size: 2.5rem;
    }

    .branding-panel p {
        font-size: 1.05rem;
    }

    .form-panel {
        width: 100%;
        padding: 3rem;
    }

    .form-container h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .branding-panel,
    .form-panel {
        padding: 1.5rem; /* Further reduce padding on very small screens */
    }

    .branding-panel h1 {
        font-size: 2rem;
    }

    .branding-panel p {
        font-size: 0.9rem;
    }

    .form-container h2 {
        font-size: 1.8rem;
    }

    .input-group {
        margin-bottom: 1rem; /* Further reduce margin */
    }

    .input-group label {
        font-size: 0.85rem;
    }

    .input-group input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    button {
        padding: 0.9rem;
        font-size: 1rem;
        margin-top: 1rem;
    }

    .form-container p {
        margin-top: 1.5rem;
        font-size: 0.85rem;
    }
}
