* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 400px;
}

h2, h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.balance-card {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.balance-card h1 {
    margin: 10px 0;
}

.summary {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
}

.summary h4 {
    margin: 0;
    font-size: 14px;
    color: #bdc3c7;
}

.summary p {
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: bold;
}

.income p { color: #2ecc71; }
.expense p { color: #e74c3c; }

.list {
    list-style-type: none;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.list li {
    background: #f9f9f9;
    color: #333;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    border-right: 5px solid #2ecc71;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.list li.minus {
    border-right-color: #e74c3c;
}

.delete-btn {
    background: #e74c3c;
    border: 0;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.list li:hover .delete-btn {
    opacity: 1;
}

.form-control {
    margin-bottom: 15px;
}

.form-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.tip {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: normal;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn {
    background: #3498db;
    color: white;
    border: 0;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.btn:hover {
    background: #2980b9;
}

/* (保留你原本的 CSS，並在下方加入以下內容) */

.chart-section {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.form-control select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}