* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(to right, #74ebd5, #acb6e5);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 350px;
}

h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 14px;
    color: #333;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #5b9bd5;
    outline: none;
}

button {
    background-color: #5b9bd5;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

button:hover {
    background-color: #4a8bc4;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f1f1f1;
    border-radius: 8px;
}

.result p {
    font-size: 18px;
    color: #333;
}

#interest-value, #monthly-payment, #total-payment {
    font-weight: bold;
    color: #5b9bd5;
    font-size: 20px;
}

.button-group {
    margin-top: 15px;
    display: flex;
    gap: 10px; /* space between buttons */
}

.btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #5b9bd5;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #4a8ac1;
}

.logo {
    text-align: center;
    margin-bottom: 15px;
}

.logo-img {
    max-width: 80px; /* adjust size */
    height: auto;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #ddd;
}

/* ✅ Error Message Styling */
#error-msg {
    color: #d9534f;          /* Red text */
    font-size: 13px;         /* Small but readable */
    font-weight: 600;        /* Bold */
    margin: -5px 0 10px 0;   /* Tight above inputs */
    display: none;           /* Hidden by default */
    text-align: center;        /* Align left like labels */
}

/* Center text in Principal, Rate, and Term fields */
#principal,
#rate,
#time {
  text-align: center;
}
