.task-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

/* Dark mode for task-card */
.dark .task-card {
    background: #374151;
    border-color: #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.task-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
    margin-right: 12px;
}

/* Dark mode for task-title */
.dark .task-title {
    color: #f9fafb;
}

.priority-badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px; /* 增加 icon 和文字間距 */
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-high i {
    color: #ef4444; /* 火焰圖標顏色 - 紅色 */
}

/* Dark mode for priority-high */
.dark .priority-high {
    background: #7f1d1d;
    color: #fca5a5;
}

.dark .priority-high i {
    color: #f87171; /* Dark mode 火焰圖標顏色 */
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-medium i {
    color: #f59e0b; /* 中等優先級圖標顏色 - 橙色 */
}

/* Dark mode for priority-medium */
.dark .priority-medium {
    background: #78350f;
    color: #fbbf24;
}

.dark .priority-medium i {
    color: #fbbf24;
}

.priority-low {
    background: #dcfce7;
    color: #16a34a;
}

.priority-low i {
    color: #22c55e; /* 低優先級圖標顏色 - 綠色 */
}

/* Dark mode for priority-low */
.dark .priority-low {
    background: #14532d;
    color: #4ade80;
}

.dark .priority-low i {
    color: #4ade80;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 8px;
}

.task-meta-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.task-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-date {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #9ca3af;
    gap: 12px;
}

.task-date .fa-calendar-plus {
    color: #6366f1; /* 旗幟圖標 - 藍色 */
}

/* Dark mode for task-date */
.dark .task-date {
    color: #d1d5db;
}

.dark .task-date .fa-calendar-plus{
    color: #818cf8;
}

.task-content {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Dark mode for task-content */
.dark .task-content {
    color: #d1d5db;
}

/* Task header layout */
.task-header {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Task meta icons styling */
.task-meta-right span {
    font-size: 1em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dark .task-meta-right span {
    color: #d1d5db;
}

/* Icon colors */
.task-meta-right .fa-comment {
    color: #10b981; /* 評論圖標 - 綠色 */
}

.task-meta-right .fa-paperclip {
    color: #f59e0b; /* 附件圖標 - 橙色 */
}

/* Dark mode icon colors */
.dark .task-meta-right .fa-comment {
    color: #34d399;
}

.dark .task-meta-right .fa-paperclip {
    color: #fbbf24;
}

/* 響應式調整 */
@media (max-width: 640px) {
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-meta-left {
        width: 100%;
        margin-bottom: 8px;
    }

    .task-meta-right {
        width: 100%;
        justify-content: flex-end;
    }

    .task-content {
        margin-bottom: 8px;
    }
}