body {
    font-family: sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #005a9c;
    text-align: center;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px 0;
    width: 90%;
    max-width: 400px;
}

h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid #005a9c;
    padding-bottom: 5px;
}

#balance-display {
    font-size: 2em;
    font-weight: bold;
    color: #005a9c;
    text-align: center;
}

input[type="number"], input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.feedback-area {
    background-color: #eaf5ff;
    border: 1px solid #007bff;
}

#feedback-message {
    text-align: center;
    font-weight: bold;
    color: #005a9c;
}

#history-list {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

#history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

#history-list li:last-child {
    border-bottom: none;
}

.delete-btn {
    background-color: #dc3545; /* 赤色 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
    width: auto; /* 横幅を自動調整 */
}

.delete-btn:hover {
    background-color: #c82333;
}

.income-amount {
    color: #28a745; /* 緑色 */
    font-weight: bold;
}

.expense-amount {
    color: #dc3545; /* 赤色 */
    font-weight: bold;
}

#history-list li span:first-child {
    flex-grow: 1; /* 用途名のエリアを広げる */
}