body, div, input, li, p, span, td, textarea {
    font-family: arial, helvetica, sans-serif;
    font-size: 16px;
}

.calculator-container {
    background-color: white;
    width: 90%;
    max-width: 550px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 5px #ccc;
}

.input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.input-container label {
    width: 45%;
    text-align: right;
    margin-right: 4%;
}

.input-container input {
    width: 46%;
    padding: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    border: 1px solid #cfd1d8;
    border-radius: 3px;
    outline: none;
    margin-right: 10%;
}

.input-container input::placeholder {
    font-size: 0.8em;
}

.debt-list {
    margin: 20px 0;
}

.debt-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
}

.debt-item h4 {
    margin: 0 0 10px 0;
    color: #084288;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-debt {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-debt:hover {
    background: #c82333;
}

.debt-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.debt-fields input {
    padding: 8px;
    border: 1px solid #cfd1d8;
    border-radius: 3px;
    font-size: 0.9rem;
}

.debt-fields input::placeholder {
    font-size: 0.85em;
}

.add-debt-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 15px;
}

.add-debt-btn:hover {
    background: #218838;
}

#button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#button-container button {
    padding: 10px 20px;
    border: 0;
    color: #fff;
    font-size: 16px;
    background: #084288;
    border-radius: 3px;
    margin: 0 10px;
    cursor: pointer;
}

#button-container button:hover {
    background-color: #434c6d;
}

#result {
    margin-top: 20px;
}

#result h3 {
    text-align: center;
    color: #084288;
    margin-bottom: 15px;
}

.result-highlight {
    background: linear-gradient(135deg, #084288, #0a5cb8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
}

.result-highlight .big-number {
    font-size: 2em;
    font-weight: bold;
    display: block;
    margin: 10px 0;
}

.result-highlight .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.result-summary {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.result-summary p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.result-summary strong {
    color: #084288;
}

.payoff-order {
    margin-top: 20px;
}

.payoff-order h4 {
    text-align: center;
    color: #084288;
    margin-bottom: 15px;
}

.payoff-table {
    width: 100%;
    border-collapse: collapse;
}

.payoff-table th, .payoff-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.85em;
}

.payoff-table th {
    background: #084288;
    color: white;
}

.payoff-table tr:nth-child(even) {
    background: #f9f9f9;
}

.payoff-table tr:hover {
    background: #e9e9e9;
}

.payoff-table .paid-off {
    background: #d4edda;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .debt-fields {
        grid-template-columns: 1fr;
    }
}
