/*
 * 全体のスタイル
 * 背景のグラデーションアニメーションを設定
 */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(90deg, #FFDAB9, #F5DEB3, #A0522D, #FF8C00);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* 背景グラデーションのアニメーション定義 */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*
 * メインのToDoリストコンテナ
 */
.container {
    width: 100%;
    max-width: 500px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    position: relative;
}

h1 {
    text-align: center;
    color: #333;
}

/*
 * 進捗バーのスタイル
 */
#progress-bar {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/*
 * 入力エリアのスタイル
 */
.input-area {
    display: flex;
    margin-bottom: 20px;
}
#todo-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
#add-button {
    padding: 10px 20px;
    background-color: #5C6BC0;
    color: white;
    border: none;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
#add-button:hover {
    background-color: #3F51B5;
}

/*
 * 絞り込みボタンエリアのスタイル
 */
.filter-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.filter-area button {
    background-color: #eee;
    color: #555;
    border: 1px solid #ccc;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    margin: 0 5px;
}
.filter-area button:hover,
.filter-area button.active {
    background-color: #5C6BC0;
    color: white;
}

/*
 * リスト出力ボタンのスタイル
 */
#show-panel-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}
#show-panel-button:hover {
    background-color: #45a049;
}

/*
 * タスクリストのスタイル
 */
#todo-list {
    list-style-type: none;
    padding: 0;
}
.todo-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    /* 新規追加時のアニメーション */
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.todo-item .task-text {
    flex-grow: 1;
    font-size: 18px;
}
.todo-item.completed .task-text {
    text-decoration: line-through;
    color: #888;
}
.todo-item:last-child {
    border-bottom: none;
}
.delete-button, .toggle-button {
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}
.toggle-button {
    background-color: #2196F3;
}
.toggle-button:hover {
    background-color: #1e88e5;
}
.delete-button {
    background-color: #f44336;
}
.delete-button:hover {
    background-color: #e53935;
}

/*
 * リスト出力パネルのスタイル
 */
.output-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.5s ease-out;
}
.output-panel.is-visible {
    transform: translateX(-50%) translateY(0);
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f7f7f7;
    border-radius: 8px 8px 0 0;
}
.panel-header p {
    font-weight: bold;
    margin: 0;
}
#close-panel-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.panel-content {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}
.data-item {
    padding: 10px 0;
    border-bottom: 1px dashed #ddd;
}
.data-item:last-child {
    border-bottom: none;
}
.data-item.completed {
    color: #888;
    text-decoration: line-through;
}
