/* TendPulse 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 400px; /* 设置页面最小宽度为400px */
}

/* 卡片样式 */
.todo-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.todo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.todo-card.completed {
    opacity: 0.7;
}

.todo-card.completed .todo-title {
    text-decoration: line-through;
    color: #6b7280;
}

/* 编辑按钮在第一行内垂直居中 */
.todo-card .flex.justify-between {
    align-items: center;
}

/* 进度圆环 */
.progress-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s, stroke 0.35s;
}

/* 过期任务样式 */
.todo-card.expired {
    border-left: 4px solid #ef4444;
}

.todo-card.expired .todo-title {
    color: #ef4444;
}

/* 未开始任务样式 */
.todo-card.not-started {
    border-left: 4px solid #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.todo-card.not-started .todo-title {
    color: #10b981;
}

/* 剩余时间样式 */
.remaining-time {
    font-size: 0.875rem;
}

.remaining-time.urgent {
    color: #ef4444;
    font-weight: 500;
}

.remaining-time.warning {
    color: #f59e0b;
}

.remaining-time.normal {
    color: #6b7280;
}

/* 按钮样式 */
.btn-icon {
    transition: color 0.2s, background-color 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 模态框样式 */
.modal {
    backdrop-filter: blur(4px);
}

/* 统计卡片悬停效果 */
.stats-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 确保选中的卡片在悬停时保持绿色边框 */
.stats-card.ring-2.ring-green-500.ring-offset-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stats-card:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 过滤器按钮样式 */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #10b981;
    color: white;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .todo-card {
        padding: 1rem;
    }
    
    .todo-actions {
        flex-direction: column;
    }
    
    .todo-actions button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}