body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px; /* Add padding for smaller screens */
    box-sizing: border-box; /* Include padding in element's total width/height */
}

.calculator-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px; /* Max width for the container */
    box-sizing: border-box; /* Include padding in element's total width/height */
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in element's total width */
    font-size: 1rem;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Add some space above the button */
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

.results-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.results-area h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.result-item:last-child {
    border-bottom: none;
}

.result-item label {
    color: #555;
    font-weight: bold;
}

.result-item span {
    color: #007bff;
    font-weight: bold;
    text-align: right;
}

.error-message {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
}

.center {
    text-align: center;
    font-weight: bold;
}

/* Basic responsiveness */
@media (max-width: 500px) {
    .calculator-container {
        padding: 20px;
    }
    h1 {
        font-size: 1.5rem;
    }
}

