body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 20px;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.hidden {
    display: none;
}

#new-member-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

input[type="text"], select {
    padding: 10px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.table-section {
    margin-bottom: 80px; /* 間隔を増やしました */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    font-size: 16px;
}

th {
    background-color: #f2f2f2;
}

th:nth-child(1), td:nth-child(1) {
    width: 15%; /* 削除列を広げました */
}

th:nth-child(2), td:nth-child(2) {
    width: 60%; /* 名前列を広くし、太字にしました */
    font-weight: bold;
}

th:nth-child(3), td:nth-child(3) {
    width: 25%;
}

th:nth-child(4), td:nth-child(4) {
    width: 25%;
}

button.delete-member {
    background-color: #ff4d4d;
    border: none;
    padding: 10px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

button.delete-member:hover {
    background-color: #ff1a1a;
}

.mile-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.button-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.mile-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mile-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.mile-button.selected {
    background-color: #ff9933;
}

.mile-button:hover {
    background-color: #ff9933;
}

input[type="number"] {
    padding: 10px;
    width: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#reason-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#reason-select, #reason {
    padding: 10px;
    width: 220px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#submit-reason-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#submit-reason-button:hover {
    background-color: #218838;
}

#selected-member-name {
    margin: 0;
    font-size: 18px;
}

#message-container, #confirmation-container {
    text-align: center;
    margin-top: 20px;
    font-size: 20px;
    color: green;
}

#confirmation-container button {
    padding: 10px 20px;
    margin: 5px;
    font-size: 16px;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%; /* 幅を広げる */
    width: 90%; /* 幅を広げる */
    position: relative;
    max-height: 80%;
    overflow-y: auto;
}

.popup-content h2 {
    margin-top: 0;
}

.popup-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}

.scrollable-content {
    max-height: 300px;
    overflow-y: auto;
}

.positive {
    color: red;
    font-weight: bold;
}

.negative {
    color: blue;
    font-weight: bold;
}

.mile-change {
    width: 10%;
}

.date-time {
    width: 20%; /* 日時列を広げました */
    white-space: nowrap;
}

button.earn {
    background-color: #FF6347;
    color: white;
    margin-right: 10px; /* 獲得と消費の間にスペースを追加 */
}

button.spend {
    background-color: #1E90FF;
    color: white;
}

button.earn:hover {
    background-color: #FF4500;
}

button.spend:hover {
    background-color: #1C86EE;
}

.edit-history, .delete-history {
    margin-right: 10px; /* 編集と削除の間にスペースを追加 */
}
