/* General body styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #4e73df, #1cc88a); /* Soft blue-green gradient */
    color: #333;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Container to hold header, form, and results */
.container {
    width: 100%;
    max-width: 270px; /* Keep original width */
    padding: 15px 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Header Styling */
h2 {
    font-size: 1.3em;
    font-weight: 600;
    color: #4e73df; /* Blue color for heading */
    text-align: center;
    margin-bottom: 12px; /* Reduced bottom margin to shorten height */
}

/* Form Styling */
#loanForm {
    width: 100%;
}

/* Input Fields */
input[type="number"] {
    width: 100%;
    padding: 6px; /* Slightly smaller padding */
    margin: 5px 0 10px; /* Reduced margin between input fields */
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    font-size: 0.9em;
    color: #333;
    box-sizing: border-box;
}

input[type="number"]:focus {
    outline: none;
    border-color: #1cc88a;
    background-color: #fff;
}

/* Button Styling */
button {
    background-color: #1cc88a;
    color: white;
    border: none;
    padding: 8px;
    font-size: 0.9em;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

button:hover {
    background-color: #17a673;
}

/* Results Section Styling */
.results {
    margin-top: 15px; /* Reduced space between form and results */
}

h3 {
    font-size: 1.1em; /* Slightly smaller font size */
    color: #333;
    text-align: center;
    margin-bottom: 8px; /* Reduced margin to save space */
}

p {
    font-size: 0.9em; /* Smaller font size for results */
    color: #333;
    text-align: center;
}

/* Error message (optional) */
#errorMessage {
    color: red;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* Media Query for Small Screens */
@media (max-width: 400px) {
    .container {
        padding: 10px 15px;
        width: 90%;
        max-width: 90%;
    }

    h2 {
        font-size: 1.1em;
    }

    button {
        font-size: 0.9em;
    }

    p {
        font-size: 0.9em;
    }
}
