body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    min-height: 90vh;
    margin: 0;
    padding: 0px;
    background-color: #FFFFFF;
}

.calculators {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 10px; /* Reduced horizontal padding */
    width: 100%;
    box-sizing: border-box;
}

.calculators.bottom-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px; /* Reduced vertical spacing to the next row */
}

.calculator {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    padding: 10px; /* Reduced padding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1 1 200px; /* Reduced flex basis */
    max-width: 270px; /* Reduced max-width */
    box-sizing: border-box;
}

.calculator h2 {
    font-size: 1em; /* Reduced font-size */
    margin-bottom: 10px; /* Reduced margin-bottom */
    text-align: center;
}

.calculator label {
    display: block;
    margin-bottom: 6px; /* Reduced margin-bottom */
    font-size: 0.9em; /* Reduced font-size */
}

.calculator input[type="number"],
.calculator input[type="text"] {
    width: 100%;
    padding: 6px; /* Reduced padding */
    margin-bottom: 10px; /* Reduced margin-bottom */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em; /* Reduced font-size */
}

.calculator button {
    width: 100%;
    padding: 8px; /* Reduced padding */
    background-color: #6E98AD;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9em; /* Reduced font-size */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calculator button:hover {
    background-color: #053856;
}

.unit-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px; /* Reduced margin-bottom */
}

.unit-container span {
    margin-left: 5px; /* Reduced margin-left */
    font-size: 1em; /* Reduced font-size */
}

.radio-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1px; /* Reduced margin-bottom */
}

.overlay {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.overlay-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px; /* Reduced padding */
    border-radius: 8px;
    text-align: center;
    color: #6E98AD;
    max-width: 100%;
    font-size: 0.8em; /* Reduced font-size */
    box-sizing: border-box;
}

.overlay-content button {
    margin-top: 5px;
    padding: 8px 10px;
    background-color: #6E98AD;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.overlay-content button:hover {
    background-color: #053856;
}

@media (max-width: 768px) {
    .calculator {
        flex: 1 1 100%;
        max-width: none;
    }
}
