/* pages/device/device.wxss */
.device-container {
  background-color: #f6f6f6;
  min-height: 100vh;
  padding-bottom: 120rpx;
}

.search-bar {
  display: flex;
  align-items: center;
  padding: 16rpx;
  background-color: #ffffff;
  border-bottom: 1rpx solid #f0f0f0;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  margin-right: 16rpx;
}

.search-input {
  width: 100%;
  height: 72rpx;
  background-color: #f5f5f5;
  border-radius: 36rpx;
  padding: 0 60rpx 0 24rpx;
  font-size: 28rpx;
  color: #303133;
}

.search-icon {
  position: absolute;
  right: 24rpx;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32rpx;
  color: #909399;
}

.clear-btn {
  font-size: 28rpx;
  color: #3cc51f;
  padding: 8rpx 16rpx;
}

.filter-bar {
  background-color: #ffffff;
  padding: 16rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.filter-group {
  margin-bottom: 16rpx;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-size: 24rpx;
  color: #606266;
  margin-bottom: 12rpx;
  font-weight: 500;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12rpx;
}

.filter-option {
  padding: 8rpx 16rpx;
  background-color: #f5f5f5;
  border-radius: 16rpx;
  font-size: 22rpx;
  color: #606266;
  white-space: nowrap;
  transition: all 0.3s;
}

.filter-option.active {
  background-color: #3cc51f;
  color: #ffffff;
}

.device-list {
  padding: 16rpx;
}

.device-item {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: 12rpx;
  padding: 24rpx;
  margin-bottom: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.device-item:active {
  transform: scale(0.98);
  box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.1);
}

.device-icon {
  width: 80rpx;
  height: 80rpx;
  background-color: #f0f9ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 24rpx;
  flex-shrink: 0;
}

.device-icon .icon {
  font-size: 40rpx;
}

.device-info {
  flex: 1;
  margin-right: 16rpx;
}

.device-name {
  font-size: 32rpx;
  font-weight: 500;
  color: #303133;
  margin-bottom: 8rpx;
}

.device-details {
  display: flex;
  flex-direction: column;
  margin-bottom: 8rpx;
}

.detail-item {
  font-size: 24rpx;
  color: #606266;
  margin-bottom: 4rpx;
}

.device-meta {
  display: flex;
  flex-direction: column;
}

.meta-item {
  font-size: 22rpx;
  color: #909399;
  margin-bottom: 2rpx;
}

.device-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.status-badge {
  padding: 6rpx 16rpx;
  border-radius: 12rpx;
  font-size: 20rpx;
  color: #ffffff;
  margin-bottom: 12rpx;
}

.device-actions {
  display: flex;
  flex-direction: column;
  gap: 8rpx;
}

.action-btn {
  padding: 6rpx 12rpx;
  border-radius: 8rpx;
  font-size: 20rpx;
  text-align: center;
  min-width: 60rpx;
}

.action-btn.edit {
  background-color: #e6f7ff;
  color: #1890ff;
}

.action-btn.delete {
  background-color: #fff2f0;
  color: #f5222d;
}

.empty-state {
  text-align: center;
  padding: 120rpx 32rpx;
}

.empty-icon {
  font-size: 120rpx;
  display: block;
  margin-bottom: 24rpx;
  opacity: 0.5;
}

.empty-text {
  font-size: 32rpx;
  color: #909399;
  margin-bottom: 32rpx;
  display: block;
}

.add-btn {
  background-color: #3cc51f;
  color: #ffffff;
  border-radius: 24rpx;
  padding: 16rpx 32rpx;
  font-size: 28rpx;
  border: none;
}

.add-btn:active {
  background-color: #2ea617;
}

.load-more {
  text-align: center;
  padding: 32rpx;
  font-size: 24rpx;
  color: #909399;
}

.no-more {
  text-align: center;
  padding: 32rpx;
  font-size: 24rpx;
  color: #c0c4cc;
}

.fab {
  position: fixed;
  right: 32rpx;
  bottom: 120rpx;
  width: 112rpx;
  height: 112rpx;
  background-color: #3cc51f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4rpx 16rpx rgba(60, 197, 31, 0.3);
  z-index: 100;
}

.fab:active {
  transform: scale(0.95);
}

.fab-icon {
  font-size: 48rpx;
  color: #ffffff;
  font-weight: bold;
}

.loading-container {
  text-align: center;
  padding: 120rpx 32rpx;
}

.loading-spinner {
  width: 48rpx;
  height: 48rpx;
  border: 4rpx solid #f0f0f0;
  border-top: 4rpx solid #3cc51f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16rpx;
}

.loading-text {
  font-size: 28rpx;
  color: #909399;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 375px) {
  .device-item {
    padding: 20rpx;
  }
  
  .device-icon {
    width: 70rpx;
    height: 70rpx;
    margin-right: 20rpx;
  }
  
  .device-icon .icon {
    font-size: 36rpx;
  }
  
  .device-name {
    font-size: 30rpx;
  }
  
  .detail-item {
    font-size: 22rpx;
  }
  
  .meta-item {
    font-size: 20rpx;
  }
  
  .fab {
    right: 24rpx;
    bottom: 100rpx;
    width: 100rpx;
    height: 100rpx;
  }
  
  .fab-icon {
    font-size: 44rpx;
  }
}
