:root {
    /* Canvaのスタイルに合わせた青と紫のカラー設定 */
    --primary-color: #a4f3f4;   /* 明るい青色 */
    --secondary-color: #f0ccf4; /* 明るい紫色 */
    --accent1-color: #A2B4FF;   /* 淡い青色 */
    --accent2-color: #DA70D6;   /* 淡い紫色 */
    
    /* フォント設定 */
    --heading-font: "Noto Sans Japanese";
    --paragraph-font: Roboto, Helvetica, sans-serif;

    /* テキストカラー設定 */
    --headline-color-on-white: #333333;  /* 白背景のヘッドライン */
    --headline-color-on-color: white; /* カラーバックグラウンドのヘッドライン */ 
    --paragraph-color-on-white: #333333; /* 白背景の段落テキスト */ 
    --paragraph-color-on-color: white; /* カラーバックグラウンドの段落テキスト */ 
    --paragraph-background-color: #F8F8F8;  /* 明るい背景色 */
    --nav-link-color: white;
    --nav-background-color: #6E8BFF; /* 明るい青色 */
    --nav-hover-link-color: #F8F8F8; /* ホバー時の明るい背景色 */
    --nav-hover-background-color: #8A2BE2; /* 明るい紫色 */
}

body {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #a4f3f4, #DA70D6); /* 明るい青と紫のグラデーション */
    transform: scale(1);
    overflow-x: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* ナビゲーションバーのスタイル */
nav {
    background: linear-gradient(135deg, var(--nav-background-color), var(--accent2-color)); /* 青紫のグラデーション */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

/* ナビゲーションリンクのスタイル */
nav a {
    color: var(--nav-link-color); /* 白色 */
    text-decoration: none;
    font-family: var(--heading-font);
    font-size: 16px;
    margin: 0 15px;
    padding: 10px;
    transition: background 0.3s, color 0.3s;
    border-radius: 6px;
}

/* ホバー時の効果 */
nav a:hover {
    background: var(--nav-hover-background-color); /* ホバー時の明るい紫色 */
    color: var(--nav-hover-link-color); /* 明るいテキスト色 */
}

.sidebar {
    width: 220px;
    background: linear-gradient(135deg, #A2B4FF, #DA70D6); /* 淡い青紫のグラデーション */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.sidebar h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #FFFFFF; /* 白色 */
    text-align: center;
}

.sidebar textarea, .sidebar input[type="date"] {
    width: 100%;
    border: 2px solid #6E8BFF; /* 明るい青色 */
    padding: 10px;
    border-radius: 8px;
    background-color: #FFFFFF; 
    color: #3A3A3A; 
}

.sidebar button {
    margin: 10px 0;
    padding: 12px;
    width: 100%;
    background: linear-gradient(135deg, #6E8BFF, #DA70D6); /* 青紫のグラデーション */
    color: #ffffff; 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.3s;
}

.sidebar button:hover {
    background: linear-gradient(135deg, #DA70D6, #A2B4FF); /* ホバー時の淡い青紫のグラデーション */
    transform: translateY(-2px); /* ホバー時にボタンが少し上に動く */
}

.matrix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; /* グリッドの間隔を広げて使いやすく */
    width: 80%;
    margin: 20px 0 20px 20px; /* 上、右、下、左の順にマージンを設定 */
}

.quadrant {
    border: 2px solid #A2B4FF; /* 淡い青色 */
    padding: 20px;
    background: #F8F8F8; /* 明るいグレー背景 */
    text-align: center;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    border-radius: 12px; 
    color: #3A3A3A; 
}

.tasks {
    margin-top: 10px;
}

.task {
    padding: 10px;
    background: #FFFFFF; /* 白色背景 */
    cursor: grab;
    border: 1px solid #6E8BFF; 
    border-radius: 8px;
    text-align: center;
    margin: 5px 0;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #3A3A3A;
}

.task:hover {
    background: linear-gradient(135deg, #A2B4FF, #DA70D6); /* ホバー時の淡い青紫のグラデーション */
    transform: scale(1.02); /* ホバー時にタスクが少し大きくなる */
}

.delete-button {
    background-color: #e74c3c; 
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px; 
    font-size: 14px;
    transition: background 0.3s;
}

.delete-button:hover {
    background-color: #c0392b; 
}

#progressContainer {
    margin-top: 20px;
    margin-left: 20px; /* 左に20pxのマージンを追加 */
}

progress {
    width: 100%;
    height: 20px; 
}

#progressBar {
    width: 100%; 
    height: 20px; 
}

.task.completed input[type="text"], 
.task.completed input[type="datetime-local"] {
    text-decoration: line-through;
    color: #888; 
}

.task.completed {
    background-color: #F3F4F6; 
}

/* CSS: お祝いメッセージ用 */
.celebration-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f0ccf4;
    color: #4a4747;
    padding: 20px;
    border: 2px solid #f0ccf4;
    border-radius: 10px;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
    display: none; /* 初期状態で非表示 */
}

/* CSS: アニメーション */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
.fade-out {
    animation: fadeOut 2.5s forwards; /* 2秒かけてフェードアウト */
}

/* 重要なタスクの強調スタイル */
#urgent-important {
    border: 2px solid #DA70D6;
    box-shadow: 0 0 15px rgba(218, 112, 214, 0.5);
    background-color: #fdf0fc;
}

#not-urgent-important {
    border: 2px solid #A2B4FF;
    box-shadow: 0 0 10px rgba(162, 180, 255, 0.5);
    background-color: #f0f9ff;
}

#urgent-not-important {
    border: 1px solid #ccc;
    background-color: #fafafa;
}

#not-urgent-not-important {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

/* タスクの視覚的強調 */
.task {
    border-radius: 5px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    transition: transform 0.2s, background-color 0.2s;
}

.task:hover {
    transform: scale(1.02);
    background-color: #f3f3f3;
}

/* 重要度に応じたタスクのラベル色 */
#tasks-urgent-important .task {
    border-left: 5px solid #DA70D6;
}

#tasks-not-urgent-important .task {
    border-left: 5px solid #A2B4FF;
}

#tasks-urgent-not-important .task {
    border-left: 5px solid #ccc;
}

#tasks-not-urgent-not-important .task {
    border-left: 5px solid #ddd;
}

/* 完了したタスクのスタイル */
.completed {
    text-decoration: line-through;
    opacity: 0.7;
}

.loss-aversion-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s;
}

.loss-aversion-message.fade-out {
    opacity: 0;
}
