/* 全体のリセットと基本的なスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #f3f4f6;
    /* 薄いグレーの背景 */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* アプリケーションのメインコンテナ */
.app-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* タイトルのスタイル */
h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #1f2937;
}

/* 入力エリアのレイアウト */
.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* テキスト入力欄 */
#task-input {
    flex-grow: 1;
    padding: 12px boder: 1px solid #d1d5db;
    boder-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#task-input:focus {
    border-color: #3b82f6;
    /* フォーカス時に青枠にする */
}

/* 追加ボタン */
#add-button {
    padding: 0 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#add-button:hover {
    background-color: #2563eb;
    /* ホバー時に濃い青にする */
}

/* タスクのリスト(ul要素) */
.task-list {
    list-style: none;
    /* デフォルトの・を消す */
}

/* 個別のタスク(li要素) */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* タスクのテキスト部分 */
.task-text {
    flex-grow: 1;
    cursor: pointer;
}

/* 完了したタスクのスタイル（JavaScriptでこのクラスを付与します */
.task-item.completed{
    background-color: #e5e7eb;
    opacity: 0.7;
}

.task-item.completed .task-text {
    text-decoration: line-through;  /*取り消し線を引く*/
    color: #6b7280; 
}

/* 削除ボタン */
.delete-button {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 15px;
    padding: 10px;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #dc2626;
}