/* Basic Reset & Body Styling */
body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure full viewport height */
    margin: 0;
    padding: 20px; /* Add padding for smaller screens */
    box-sizing: border-box; /* Include padding in element's total width/height */
}

/* Calculator Container Styling */
.calculator-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px; /* Max width for larger screens */
    width: 100%; /* Take full width on smaller screens */
}

h1 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Input Group Styling */
.input-group {
    margin-bottom: 20px;
    text-align: left; /* Align labels and inputs left */
}

.input-group label {
    display: block; /* Make label take its own line */
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.input-group input[type="number"] {
    width: 100%; /* Make input take full width of container */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in width */
    font-size: 1em;
}

/* Remove number input spinners (optional) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

/* Button Styling */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    width: 100%; /* Make button take full width */
    margin-top: 10px; /* Add some space above the button */
}

button:hover {
    background-color: #0056b3;
}

/* Result Area Styling */
.result-area {
    margin-top: 25px;
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
}

.result-area h2 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #495057;
}

#percentageText {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745; /* Green color for success/result */
    margin: 0;
}

/* Error Message Styling */
.error-message {
    color: #dc3545; /* Red color for errors */
    font-weight: bold;
    margin-top: 15px;
    min-height: 1.2em; /* Reserve space even when empty */
}