.container {
  padding: 16px;
  padding-bottom: 100px;
  background: #f3f4f6;
  min-height: 100vh;
}

.loadingContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.moreButton {
  padding: 8px;
  margin-right: -8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: color 0.2s;

  &:hover {
    color: #111827;
  }
}

// 搜索和筛选区域
.filterSection {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #f3f4f6;
  padding-top: 8px;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.searchBox {
  position: relative;
  display: flex;
  align-items: center;
}

.searchIcon {
  position: absolute;
  left: 12px;
  font-size: 18px;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s;
}

.searchInput {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

  &::placeholder {
    color: #9ca3af;
  }

  &:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
  }

  &:focus + .searchIcon,
  &:focus ~ .searchIcon {
    color: #3b82f6;
  }
}

.filterButtons {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }
}

.filterButton {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;

  &:active {
    background: #f9fafb;
  }
}

.filterButtonActive {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 1px 2px 0 rgba(59, 130, 246, 0.3);

  &:active {
    background: #2563eb;
  }
}

.filterIcon {
  font-size: 16px;
  margin-left: 4px;
  display: flex;
  align-items: center;
}

// 群组列表
.groupsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.groupCard {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  cursor: pointer;

  &:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  }

  &:hover {
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
  }
}

.groupCardContent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.groupIconWrapper {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.groupIconImg,
.groupIconFallback {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
}

.groupIconImg {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.groupIconFallback {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
  letter-spacing: 0.5px;
}

.groupInfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.groupName {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.groupMeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
}

.memberCount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4b5563;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.4;
}

.createTime {
  color: #6b7280;
  font-weight: 400;
}

.emptyState {
  padding: 60px 20px;
  text-align: center;
}

.emptyText {
  font-size: 14px;
  color: #9ca3af;
}

.footer {
  margin-top: 32px;
  text-align: center;
  padding: 20px 0;
}

.footerText {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}
