/* --- CSS Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    height: 100vh;
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Main Container --- */
.main-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    max-height: 700px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* --- Left Side (Info) --- */
.info-side {
    flex-basis: 45%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6); /* Modern blue gradient */
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: left;
}

.info-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.8;
    margin: 0;
}

.info-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.2;
}

.info-content p {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.6;
}

/* --- Right Side (Form) --- */
.form-side {
    flex-basis: 55%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

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

.form-container h2 {
    color: #1e293b;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-container .subtitle {
    color: #64748b;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 50px; /* Make space for icon */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    color: #334155;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

button[type="submit"]:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* --- Message Styles --- */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}
.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 900px) {
    body {
        height: auto;
        padding: 20px 0;
    }
    .main-container {
        flex-direction: column;
        width: 90%;
        height: auto;
        max-height: none;
    }
    .info-side {
        flex-basis: auto;
        padding: 40px 30px;
        text-align: center;
    }
    .info-content h1 {
        font-size: 2.2rem;
    }
    .form-side {
        padding: 40px 30px;
    }
}