body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

#calculator-title {
    font-size: 30px;
    font-family: Georgia, serif;
}

#calculate-button {
    width: 100%;
    background-color: #2222AA;
    color: white;
}

.calculator-container {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    padding: 30px;
    padding-top: 0;
    text-align: center;
    margin-bottom: 46px;
    margin-top: 16px;
}

.calculator-content {
    color: #333;
    font-size: 18px;
}

.annuity-equation {
    margin-top: 20px;
    font-size: 48px;
    color: #000;
}

#error-n, #error-i {
    color: red;
}

.input-container {
    margin-top: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.input-container label {
    margin-right: 10px;
    font-size: 18px;
}

.input-container input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    flex: 1;
    font-size: 18px;
}

/* Disable input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Style input number fields */
.input-container input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    flex: 1;
    font-size: 18px;
    appearance: textfield; /* Firefox appearance fix */
}

.toggle-button-container {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.toggle-button {
    background-color: #f0f0f0;
    border: none;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-button:hover {
    background-color: #ddd;
}

.toggle-button.active-toggle {
    background-color: #333;
    color: white;
}



.credits {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #f2f2f2;
    padding: 10px 0;
    text-align: center;
    font-size: 16px;
    color: #777;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}


/* Style the entire table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 5px;
    text-align: center;
}

/* Style the table header (th) */
th {
    background-color: #f2f2f2;
    text-align: left;
    padding: 10px;
    border: 1px solid #ddd;
    font-weight: bold;
    text-align: center;
}

/* Style the table rows (tr) */
tr {
    background-color: #fff;
    border: 1px solid #ddd;
}



/* Style table cells (td) */
td {
    border: 1px solid #ddd;
    user-select: none;
}


/* Style the table container */
#table-container {
    max-width: 600px; /* Adjust as needed */
    margin: 0 auto;
    padding: 0px;
}


/* Hide arrows for all number input fields */
td input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}



/* Add a subtle box shadow and change border color on hover */
/* Remove the input outline (border) */
table td input[type="number"] {
    width: 100%;
    border: none; /* Remove the border */
    background-color: #FAFAFA;
    transition: box-shadow 0.3s;
    font-family: Arial, sans-serif;
    font-size: 16px;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    font-size: 18px;
    margin:0;
}


#result{
    font-size: 36px;
    margin: 16px;
    text-align: center;
    font-family: Arial, sans-serif;
}