body {
  background-color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 80px 20px 20px; /* 顶部预留导航栏空间 */
}

#navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #2c2f36;
  z-index: 999;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* 筛选按钮区 */
.task-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
}

.task-filters button {
  padding: 6px 14px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.task-filters button:hover {
  background-color: #f0f0f0;
}

.task-filters button.active {
  border-color: #ff9800;
  color: #ff9800;
  font-weight: bold;
}

/* 任务卡片布局 */
.task-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding-bottom: 40px;
}

.task-card {
  width: 270px;
  border: 1px solid #eee;
  border-radius: 12px;
  background-color: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.task-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


.task-card-header .avatar {
  display: flex;
  align-items: center;
}

.task-card-header img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-right: 8px;
}

.task-card-header span {
  font-size: 14px;
  font-weight: 500;
}


/* banner图 */
.task-card .banner-wrapper {
  position: relative;
  width: 100%;
  padding-top: 50%; /* 高度 = 宽度的一半，保持2:1比例 */
  overflow: hidden;
  border-radius: 8px;
  background-color: #f5f5f5;
  margin: 10px 0;
}

.task-card .banner-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-content {
  padding: 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.task-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #111;
  user-select: none;
  caret-color: transparent;
  line-height: 1.4;
  height: 2.8em; /* 限制为两行高度 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 限制为两行 */
  -webkit-box-orient: vertical;
}


.task-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  white-space: nowrap;
}

.task-tags span {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #ff9800;
  color: white;
  user-select: none;
  white-space: nowrap;
}
.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 0;
}

.task-card-header .author-info {
  display: flex;
  align-items: center;
}

.task-card-header .avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

.nickname-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.nickname-row .nickname {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1;
}

.task-card-header .time-remaining {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
.nickname-row img {
  height: 14px;
  width: auto; /* 保持比例 */
  object-fit: contain;
  display: inline-block;
  vertical-align: bottom;
}
.v-icon {
  height: 14px;
  width: auto;
  object-fit: contain;
  margin-left: 4px;
  vertical-align: bottom;
}
.task-meta {
  font-size: 13px;
  color: #444;
  margin-bottom: 4px;
  line-height: 1.4;
  height: 2.8em; /* 保留两行高度 */
  display: -webkit-box;
  -webkit-line-clamp: 2;  /* 限制两行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}