body {
    font-family: 'Noto Sans JP', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f9;
}

h1 {
    color: #333;
    margin-bottom: 30px;
}

button {
    padding: 12px 25px;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#countButton {
    background-color: #2196F3; /* 緑(#4CAF50)から青(#2196F3)に変更 */
    color: white;
}

#countButton:hover {
    background-color: #0b7dda; /* ホバー時の色も変更 */
}

#saveButton {
    background-color: #4CAF50; /* 保存ボタンは緑色に */
    color: white;
}

#saveButton:hover {
    background-color: #45a049;
}

#resetButton {
    background-color: #f44336;
    color: white;
}

#resetButton:hover {
    background-color: #d32f2f;
}

.counter {
    font-size: 28px;
    margin: 20px 0 10px;
    font-weight: bold;
}

.cost-info {
    font-size: 24px;
    margin: 0 0 20px;
    color: #e53935;
    font-weight: bold;
}

.period-costs {
    width: 80%;
    max-width: 600px;
    margin: 0 0 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 5px;
    border-left: 4px solid #2196F3;
}

.period-cost-item {
    font-size: 18px;
    margin: 10px 0;
    color: #0d47a1;
}

.period-cost-item:first-child {
    margin-top: 0;
}

.period-cost-item:last-child {
    margin-bottom: 0;
}

.time-info {
    margin: 15px 0;
    font-size: 18px;
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    text-align: center;
}

.button-group {
    display: flex;
    margin: 20px 0;
}

.history {
    margin-top: 30px;
    width: 90%;
    max-width: 600px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.history h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

.date-selector {
    margin: 15px 0;
}

#dateSelect {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#historyList {
    list-style-type: none;
    padding: 0;
}

#historyList li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

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

.saved-history {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

.saved-history h3 {
    margin-top: 0;
    color: #2e7d32;
    border-bottom: 1px solid #c8e6c9;
    padding-bottom: 10px;
}

/* 手入力フォームのスタイル */
.manual-input {
    margin: 20px 0;
    width: 90%;
    max-width: 600px;
    background-color: #fff3e0;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.manual-input h2 {
    color: #e65100;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffe0b2;
    padding-bottom: 10px;
}

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

.input-group label {
    width: 100px;
    font-weight: bold;
    color: #333;
}

.input-group input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#manualSaveButton {
    background-color: #ff9800;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    width: 100%;
}

#manualSaveButton:hover {
    background-color: #f57c00;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .time-info, .history {
        width: 95%;
    }
    
    .button-group {
        flex-direction: column;
    }
}