body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    display: block;
}

/* main area takes all space except footer */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.contact-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 100px auto 50px auto;  /* centers it horizontally with margin */
    box-sizing: border-box;
    animation: fadeIn 0.8s ease-out;
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 2em;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-input {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-label {
    position: absolute;
    left: 10px;
    top: 14px;
    font-size: 1em;
    color: #888;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -10px;
    left: 8px;
    font-size: 0.8em;
    color: #007bff;
    background-color: #fff;
    padding: 0 5px;
}

.message-input {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background-color: #007bff;
    color: #ffffff;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

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

/* Responsive tweak */
@media (max-width: 600px) {
    .contact-container {
        width: 90%;     /* take almost full width */
        padding: 20px;  /* smaller padding */
        margin: 80px auto 30px auto;
    }
}